NameAttributeValue Class Reference

#include <NameAttributeValue.h>

List of all members.

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)


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

Definition at line 40 of file NameAttributeValue.h.


Constructor & Destructor Documentation

virtual NameAttributeValue::~NameAttributeValue (  )  [inline, virtual]

Destructor.

Definition at line 61 of file NameAttributeValue.h.

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().


Member Function Documentation

string NameAttributeValue::get_attribute ( void   )  [inline]

return the attribute of the object

Definition at line 73 of file NameAttributeValue.h.

string NameAttributeValue::get_name ( void   )  const [inline]

return the name of the object

Definition at line 76 of file NameAttributeValue.h.

string NameAttributeValue::get_value ( void   )  const [inline]

return the pointer to the value of the object

Definition at line 79 of file NameAttributeValue.h.

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]

Print the content of the object to a stream.

Definition at line 103 of file NameAttributeValue.cc.

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

set the attribute of the object.

Definition at line 88 of file NameAttributeValue.h.

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

set the name of the object.

Definition at line 91 of file NameAttributeValue.h.

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

set the value of the object.

Definition at line 94 of file NameAttributeValue.h.


Friends And Related Function Documentation

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.


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

Generated on Thu Oct 2 17:54:23 2008 for paramxx by  doxygen 1.5.6