#include <NameAttributeValue.h>
Public Member Functions | |
virtual | ~NameAttributeValue () |
Destructor. | |
NameAttributeValue () | |
Default constructor, all members are initialize to an empty string. | |
NameAttributeValue (const char *str) | |
string | get_attribute (void) |
return the attribute of the object | |
string | get_name (void) const |
return the name of the object | |
string | get_value (void) const |
return the pointer to the value of the object | |
void | init_NameAttributeValue (const char *str) |
Set the name, attribute and value. | |
virtual void | print (ostream &os=cerr) |
Print the content of the object to a stream. | |
void | set_attribute (const char *a) |
set the attribute of the object. | |
void | set_name (const char *n) |
set the name of the object. | |
void | set_value (const char *v) |
set the value of the object. | |
Protected Attributes | |
string | name |
string | attribute |
string | value |
Friends | |
ostream & | operator<< (ostream &os, NameAttributeValue &a) |
ostream & | operator<< (ostream &os, NameAttributeValue *a) |
The class parses a string of the form : name.attribute=value, name+, name-, --name for the name `name', attribute `attribute' and value `value'.
Definition at line 40 of file NameAttributeValue.h.
virtual NameAttributeValue::~NameAttributeValue | ( | ) | [inline, virtual] |
NameAttributeValue::NameAttributeValue | ( | ) | [inline] |
Default constructor, all members are initialize to an empty string.
Definition at line 64 of file NameAttributeValue.h.
NameAttributeValue::NameAttributeValue | ( | const char * | str | ) | [inline] |
Parse a string, str, into name, attribute and value. Equivalent to calling the default constructor then initialize_NameAttributeValue.
Definition at line 70 of file NameAttributeValue.h.
References init_NameAttributeValue().
string NameAttributeValue::get_attribute | ( | void | ) | [inline] |
string NameAttributeValue::get_name | ( | void | ) | const [inline] |
string NameAttributeValue::get_value | ( | void | ) | const [inline] |
void NameAttributeValue::init_NameAttributeValue | ( | const char * | str | ) |
Set the name, attribute and value.
Definition at line 70 of file NameAttributeValue.cc.
Referenced by NameAttributeValue().
void NameAttributeValue::print | ( | ostream & | os = cerr |
) | [virtual] |
void NameAttributeValue::set_attribute | ( | const char * | a | ) | [inline] |
void NameAttributeValue::set_name | ( | const char * | n | ) | [inline] |
void NameAttributeValue::set_value | ( | const char * | v | ) | [inline] |
ostream& operator<< | ( | ostream & | os, | |
NameAttributeValue & | a | |||
) | [friend] |
Output operator. This operator outputs the contents of the object.
Definition at line 45 of file NameAttributeValue.h.
ostream& operator<< | ( | ostream & | os, | |
NameAttributeValue * | a | |||
) | [friend] |
Output operator. This operator outputs the contents of the object.
Definition at line 53 of file NameAttributeValue.h.