inlib
1.2.0
|
Public Member Functions | |
virtual io::iwbuf & | buffer () |
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_exsg & | operator= (const write_exsg &a_from) |
Definition at line 18 of file write_exsg.
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) {}
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] |
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()); }