NIREP

VariableList Class Reference

Stores the variables in the display description and replaces variables with values. More...

Collaboration diagram for VariableList:

List of all members.

Public Member Functions

void ClearList ()
std::string GetVariable (std::string key)
 Retrieve the value for a variable.
std::map< std::string,
std::string > * 
GetVariableList ()
int Read (const std::string &fileName)
void SetVariable (std::string key, std::string value)
 Add a new variable to the variable list.
std::string UpdateString (const std::string &source)
 Updates a string, replacing variables with values (from the vList)
 VariableList (const std::string &fileName)
 VariableList ()
 Class constructor.
 ~VariableList ()
 Class destructor.

Detailed Description

Stores the variables in the display description and replaces variables with values.

Notes
  • Work in progress
Dependencies
  • Libraries: STL map, string, vector, wxprec
Bugs
  • None
Change Log
  • Created, ker, 27/4/09

Constructor & Destructor Documentation

VariableList::VariableList ( ) [inline]

Class constructor.

VariableList::VariableList ( const std::string &  fileName)
VariableList::~VariableList ( ) [inline]

Class destructor.


Member Function Documentation

void VariableList::ClearList ( ) [inline]
VariableList::GetVariable ( std::string  key) [inline]

Retrieve the value for a variable.

Parameters:
keystd::string the reference name of the variable
Return values:
std::stringthe value of the variable
std::map<std::string,std::string>* VariableList::GetVariableList ( ) [inline]
int VariableList::Read ( const std::string &  fileName)
VariableList::SetVariable ( std::string  key,
std::string  value 
) [inline]

Add a new variable to the variable list.

If the variable already exists in the variable list, the task is updated.

Parameters:
keystd::string the reference name of the variable. ex: source
valuestd::string the value of the vairable. ex: 08
VariableList::UpdateString ( const std::string &  source)

Updates a string, replacing variables with values (from the vList)

ex: "Source: na${source}" => "Source: na08"

Parameters:
sourcestd::string the string to be updated
Return values:
std::stringupdated string
 All Classes Functions Variables Typedefs Enumerations Enumerator