Parameter Class Reference

stores triple (paramater name, value, comment) and print order information order_m. It is also possible to mark used parameters with markUsed(). An application is for example detecting typing errors in input parameters. More...

#include <Parameterlist.h>

Collaboration diagram for Parameter:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Parameter (const string &name, const string &value, const string &comment, bool fromDefault=false)
data access

std::string getName ()
void setName (const string &value)
std::string & getValue ()
std::string & getValueAsString ()
void setValue (const string &value)
unsigned short getPrintOrder () const
void setPrintOrder (unsigned short order)
bool isUsed () const
bool isDefaultValue () const
void markUsed ()
IO

ostream & printParameter (ostream &os) const
 print format is <name> = ;<newline>
ostream & printParameterWithComment (ostream &os) const
 print format is <name> = ; --<comment><newline>
ostream & printParameterDetailed (ostream &os) const
 print format is <name> = ; --<comment><newline>
--'order' (<name>)=<print order>=""><newline>

Static Public Member Functions

print ordering

static bool compareParameterOrder (Parameter *const &par1, Parameter *const &par2)

Public Attributes

data

string name_m
string value_m
string comment_m
bool bUsed_m
bool bDefaultValue_m
unsigned short order_m

Friends

class Parameterlist

Detailed Description

Definition at line 25 of file Parameterlist.h.


Constructor & Destructor Documentation

Parameter::Parameter ( const string &  name,
const string &  value,
const string &  comment,
bool  fromDefault = false 
)

Definition at line 10 of file Parameterlist.cc.


Member Function Documentation

static bool Parameter::compareParameterOrder ( Parameter *const &  par1,
Parameter *const &  par2 
) [inline, static]
Note:
ehem. Fehlerursache: Idee aus der String-compare-funktion abgeleitet gehabt hier muss aber nur ein wahrheitswert zurueckgegeben werden!

Definition at line 71 of file Parameterlist.h.

References order_m.

Referenced by Parameterlist::printUsedParameters().

std::string Parameter::getName (  ) 

Definition at line 80 of file Parameterlist.cc.

References name_m.

unsigned short Parameter::getPrintOrder (  )  const

Definition at line 46 of file Parameterlist.cc.

References order_m.

string & Parameter::getValue (  ) 

Definition at line 61 of file Parameterlist.cc.

References value_m.

std::string & Parameter::getValueAsString (  ) 
bool Parameter::isDefaultValue (  )  const

Definition at line 91 of file Parameterlist.cc.

References bDefaultValue_m.

bool Parameter::isUsed (  )  const

Definition at line 86 of file Parameterlist.cc.

References bUsed_m.

void Parameter::markUsed (  ) 
ostream & Parameter::printParameter ( ostream &  os  )  const

Definition at line 22 of file Parameterlist.cc.

References name_m, and value_m.

Referenced by operator<<().

ostream & Parameter::printParameterDetailed ( ostream &  os  )  const

Definition at line 34 of file Parameterlist.cc.

References comment_m, name_m, order_m, and value_m.

ostream & Parameter::printParameterWithComment ( ostream &  os  )  const

Definition at line 28 of file Parameterlist.cc.

References comment_m, name_m, and value_m.

void Parameter::setName ( const string &  value  ) 
void Parameter::setPrintOrder ( unsigned short  order  ) 
void Parameter::setValue ( const string &  value  ) 

Friends And Related Function Documentation

friend class Parameterlist [friend]

Definition at line 27 of file Parameterlist.h.


Member Data Documentation

Definition at line 37 of file Parameterlist.h.

Referenced by isDefaultValue().

Definition at line 36 of file Parameterlist.h.

Referenced by isUsed(), and markUsed().

Definition at line 35 of file Parameterlist.h.

Referenced by printParameterDetailed(), and printParameterWithComment().

unsigned short Parameter::order_m

The documentation for this class was generated from the following files:
Generated on Tue Nov 23 13:10:53 2010 for centerfocus by  doxygen 1.6.3