inlib  1.2.0
Public Member Functions | Protected Member Functions
inlib::sg::write_exsg Class Reference
Inheritance diagram for inlib::sg::write_exsg:
Inheritance graph
[legend]
Collaboration diagram for inlib::sg::write_exsg:
Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual io::iwbufbuffer ()
virtual bool beg_node (const node &a_node)
virtual bool end_node (const node &a_node)
 write_exsg (std::ostream &a_out)
virtual ~write_exsg ()
bool open_buffer ()
bool close_buffer ()
bool write_file (const std::string &a_file) const

Protected Member Functions

 write_exsg (const write_exsg &a_from)
write_exsgoperator= (const write_exsg &a_from)

Detailed Description

Definition at line 18 of file write_exsg.


Constructor & Destructor Documentation

inlib::sg::write_exsg::write_exsg ( std::ostream &  a_out) [inline]

Definition at line 36 of file write_exsg.

  : write_action(a_out),m_buffer(a_out)
  {}
virtual inlib::sg::write_exsg::~write_exsg ( ) [inline, virtual]

Definition at line 39 of file write_exsg.

{}
inlib::sg::write_exsg::write_exsg ( const write_exsg a_from) [inline, protected]

Definition at line 41 of file write_exsg.

  : write_action(a_from)
  ,m_buffer(a_from.m_out)
  {}

Member Function Documentation

virtual bool inlib::sg::write_exsg::beg_node ( const node a_node) [inline, virtual]

Implements inlib::sg::write_action.

Definition at line 21 of file write_exsg.

                                            {
    std::string s;
    s  += "<";
    s  += a_node.s_cls();
    s  += ">\n";
    return m_buffer.write_verbatim(s.c_str());
  }
virtual io::iwbuf& inlib::sg::write_exsg::buffer ( ) [inline, virtual]

Implements inlib::sg::write_action.

Definition at line 20 of file write_exsg.

{return m_buffer;}
bool inlib::sg::write_exsg::close_buffer ( ) [inline]

Definition at line 61 of file write_exsg.

                      {
   {std::string s;
    s  += "</exsg>\n";
    if(!m_buffer.write_verbatim(s.c_str())) return false;}
    return true;
  }
virtual bool inlib::sg::write_exsg::end_node ( const node a_node) [inline, virtual]

Implements inlib::sg::write_action.

Definition at line 28 of file write_exsg.

                                            {
    std::string s;
    s  += "\n</";
    s  += a_node.s_cls();
    s  += ">\n";
    return m_buffer.write_verbatim(s.c_str());
  }
bool inlib::sg::write_exsg::open_buffer ( ) [inline]

Definition at line 50 of file write_exsg.

                     {
    m_buffer.reset_pos();

    //NOTE : if changing the header, change inlib::file::is_exsg().
   {std::string s;
    s  += "<exsg>\n";
    if(!m_buffer.write_verbatim(s.c_str())) return false;}

    return true;
  }
write_exsg& inlib::sg::write_exsg::operator= ( const write_exsg a_from) [inline, protected]

Definition at line 45 of file write_exsg.

                                                 {
    write_action::operator=(a_from);
    return *this;
  }
bool inlib::sg::write_exsg::write_file ( const std::string &  a_file) const [inline]

Definition at line 68 of file write_exsg.

                                                 {
    return file::write_bytes(a_file,m_buffer.buf(),m_buffer.length());
  }

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines