@attributes
attributeset_name
, but the attributeset_name may be empty.
The attributeset section contains several lines. Each of them starts with an attribute and then a the value for the id. #include <lemon/lemon_reader.h>
Public Member Functions | |
AttributeReader (LemonReader &_reader, const std::string &_name=std::string()) | |
Constructor. | |
virtual | ~AttributeReader () |
Destructor. | |
template<typename Value > | |
AttributeReader & | readAttribute (const std::string &label, Value &value) |
template<typename ItemReader , typename Value > | |
AttributeReader & | readAttribute (const std::string &label, Value &value, const ItemReader &ir=ItemReader()) |
Protected Member Functions | |
bool | header (const std::string &line) |
Gives back true when the SectionReader can process the section with the given header line. | |
void | read (std::istream &is) |
Reader function of the section. |
AttributeReader | ( | LemonReader & | _reader, | |
const std::string & | _name = std::string() | |||
) | [inline] |
Constructor for AttributeReader. It creates the AttributeReader and attach it into the given LemonReader. The reader process a section only if the section_name
and the _name
are the same.
virtual ~AttributeReader | ( | ) | [inline, virtual] |
Destructor for AttributeReader.
AttributeReader& readAttribute | ( | const std::string & | label, | |
Value & | value | |||
) | [inline] |
Add an attribute reader command for the reader.
AttributeReader& readAttribute | ( | const std::string & | label, | |
Value & | value, | |||
const ItemReader & | ir = ItemReader() | |||
) | [inline] |
Add an attribute reader command for the reader.
bool header | ( | const std::string & | line | ) | [inline, protected, virtual] |
It gives back true when the header line start with @attributes
, and the header line's id and the attributeset's id are the same.
Implements SectionReader.
void read | ( | std::istream & | is | ) | [inline, protected, virtual] |
It reads the content of the section.
Implements SectionReader.