paramxx
1.0.7
|
#include <NameAttributeValue.h>
Public Member Functions | |
virtual | ~NameAttributeValue () |
Destructor. More... | |
NameAttributeValue () | |
Default constructor, all members are initialize to an empty string. More... | |
NameAttributeValue (const char *str) | |
string | get_attribute (void) |
return the attribute of the object More... | |
string | get_name (void) const |
return the name of the object More... | |
string | get_value (void) const |
return the pointer to the value of the object More... | |
void | init_NameAttributeValue (const char *str) |
Set the name, attribute and value. More... | |
virtual void | print (ostream &os=cerr) |
Print the content of the object to a stream. More... | |
void | set_attribute (const char *a) |
set the attribute of the object. More... | |
void | set_name (const char *n) |
set the name of the object. More... | |
void | set_value (const char *v) |
set the value of the object. More... | |
Protected Attributes | |
string | name |
string | attribute |
string | value |
Friends | |
ostream & | operator<< (ostream &os, NameAttributeValue &a) |
ostream & | operator<< (ostream &os, NameAttributeValue *a) |
Parse the name, attribute (if any) and value from a string.
The class parses a string of the form : name.attribute=value, name+, name-, –name for the name `name', attribute `attribute' and value `value'.
|
inlinevirtual |
Destructor.
|
inline |
Default constructor, all members are initialize to an empty string.
|
inline |
Parse a string, str, into name, attribute and value. Equivalent to calling the default constructor then initialize_NameAttributeValue.
|
inline |
return the attribute of the object
|
inline |
return the name of the object
Referenced by ParFile::init_ParFile(), ParFile::pgetstring(), and ParFile::print().
|
inline |
return the pointer to the value of the object
Referenced by ParFile::pgetstring(), and ParFile::print().
void NameAttributeValue::init_NameAttributeValue | ( | const char * | str | ) |
Set the name, attribute and value.
|
virtual |
Print the content of the object to a stream.
|
inline |
set the attribute of the object.
|
inline |
set the name of the object.
|
inline |
set the value of the object.
|
friend |
Output operator. This operator outputs the contents of the object.
|
friend |
Output operator. This operator outputs the contents of the object.