#include <lemon/lemon_writer.h>
Inherits CommonSectionWriterBase.
Inheritance diagram for AttributeWriter:
@attributes
attributeset_id
, but the attributeset_id may be empty.The attributeset section contains several lines. Each of them starts with the name of attribute and then the value.
Public Member Functions | |
AttributeWriter (LemonWriter &_writer, const std::string &_id=std::string()) | |
Constructor. | |
virtual | ~AttributeWriter () |
Destructor. | |
template<typename Value> | |
AttributeWriter & | writeAttribute (const std::string &id, const Value &value) |
Add an attribute writer command for the writer. | |
template<typename Writer, typename Value> | |
AttributeWriter & | writeAttribute (const std::string &name, const Value &value, const Writer &writer=Writer()) |
Add an attribute writer command for the writer. | |
Protected Member Functions | |
std::string | header () |
The header of section. | |
void | write (std::ostream &os) |
Writer function of the section. |
|
Constructor for AttributeWriter. It creates the AttributeWriter and attach it into the given LemonWriter. |
|
Destructor for AttributeWriter. |
|
Add an attribute writer command for the writer. |
|
Add an attribute writer command for the writer. |
|
It gives back the header of the section. Implements LemonWriter::SectionWriter. |
|
Write the content of the section. Implements LemonWriter::SectionWriter. |