paramxx  1.0.7
NameAttributeValue Class Reference

#include <NameAttributeValue.h>

+ Collaboration diagram for NameAttributeValue:

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)
 

Detailed Description

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'.

Constructor & Destructor Documentation

◆ ~NameAttributeValue()

virtual NameAttributeValue::~NameAttributeValue ( )
inlinevirtual

Destructor.

◆ NameAttributeValue() [1/2]

NameAttributeValue::NameAttributeValue ( )
inline

Default constructor, all members are initialize to an empty string.

◆ NameAttributeValue() [2/2]

NameAttributeValue::NameAttributeValue ( const char *  str)
inline

Parse a string, str, into name, attribute and value. Equivalent to calling the default constructor then initialize_NameAttributeValue.

Member Function Documentation

◆ get_attribute()

string NameAttributeValue::get_attribute ( void  )
inline

return the attribute of the object

◆ get_name()

string NameAttributeValue::get_name ( void  ) const
inline

return the name of the object

Referenced by ParFile::init_ParFile(), ParFile::pgetstring(), and ParFile::print().

◆ get_value()

string NameAttributeValue::get_value ( void  ) const
inline

return the pointer to the value of the object

Referenced by ParFile::pgetstring(), and ParFile::print().

◆ init_NameAttributeValue()

void NameAttributeValue::init_NameAttributeValue ( const char *  str)

Set the name, attribute and value.

◆ print()

void NameAttributeValue::print ( ostream &  os = cerr)
virtual

Print the content of the object to a stream.

◆ set_attribute()

void NameAttributeValue::set_attribute ( const char *  a)
inline

set the attribute of the object.

◆ set_name()

void NameAttributeValue::set_name ( const char *  n)
inline

set the name of the object.

◆ set_value()

void NameAttributeValue::set_value ( const char *  v)
inline

set the value of the object.

Friends And Related Function Documentation

◆ operator<< [1/2]

ostream& operator<< ( ostream &  os,
NameAttributeValue a 
)
friend

Output operator. This operator outputs the contents of the object.

◆ operator<< [2/2]

ostream& operator<< ( ostream &  os,
NameAttributeValue a 
)
friend

Output operator. This operator outputs the contents of the object.


The documentation for this class was generated from the following files: