Relacs Options Library  0.9.8
Classes | Typedefs | Functions | Variables
relacs Namespace Reference

Classes

class  ConfigClass
 
class  ConfigureClasses
 
class  Options
 
class  Parameter
 
class  Str
 
class  StrQueue
 

Typedefs

typedef deque< StrStrDeque
 

Functions

ostream & operator<< (ostream &str, const ConfigureClasses &c)
 
bool operator== (const Options &o1, const Options &o2)
 
bool operator== (const Options &o, const string &name)
 
bool operator< (const Options &o1, const Options &o2)
 
ostream & operator<< (ostream &str, const Options &o)
 
istream & operator>> (istream &str, Options &o)
 
bool operator== (const Parameter &p1, const Parameter &p2)
 
bool operator== (const Parameter &p, const string &name)
 
ostream & operator<< (ostream &str, const Parameter &p)
 
bool operator== (const StrQueue &sq1, const StrQueue &sq2)
 
ostream & operator<< (ostream &str, const StrQueue &sq)
 

Variables

const int NUnits = 50
 
string UnitPref [NUnits]
 
double UnitFac [NUnits]
 

Typedef Documentation

typedef deque< Str > StrDeque

Function Documentation

ostream& relacs::operator<< ( ostream &  str,
const ConfigureClasses &  c 
)

Write the names of all configuration files to str. The file names of each configuration group are written in a single line, levels are separated by ','.

Parameters
[in]strthe output stream.
[in]cthe ConfigureClasses instance.
bool relacs::operator== ( const Options &  o1,
const Options &  o2 
)

Returns true if the two Options o1 and o2 are equal, i.e. they have the same number of Parameter with identical name and value (as returned by Parameter::text()) and the same sections with identical name and type.

References Options::begin(), Options::end(), Options::sectionsBegin(), Options::sectionsEnd(), and Options::size().

bool relacs::operator== ( const Options &  o,
const string &  name 
)

Returns true if the name() of the Options o equals name.

References Options::name().

bool relacs::operator< ( const Options &  o1,
const Options &  o2 
)

Returns true if the Option o1 is smaller than o2, i.e. o2 has less elements than o1, an name of o2 is smaller than the corresponding one in o1, or a value of o2 is smaller than the corresponding one in o1. This function is provided just to define some ordering of Options, as is needed for example for an stl::map.

References Options::begin(), Options::end(), Options::sectionsBegin(), and Options::sectionsEnd().

ostream& relacs::operator<< ( ostream &  str,
const Options &  o 
)

Write names and their values to stream str

References Options::save().

istream& relacs::operator>> ( istream &  str,
Options &  o 
)

Read a single line from stream str and set options.

References Options::read().

bool relacs::operator== ( const Parameter &  p1,
const Parameter &  p2 
)

Returns true if the two Parameters p1 and p2 are equal, i.e. they have the same name.

References Parameter::name().

bool relacs::operator== ( const Parameter &  p,
const string &  name 
)

Returns true if the Parameter p has an name equal to name.

References Parameter::name().

ostream& relacs::operator<< ( ostream &  str,
const Parameter &  p 
)

Write parameter to stream str using save()

References Parameter::save().

bool relacs::operator== ( const StrQueue &  sq1,
const StrQueue &  sq2 
)

Compare two StrQueue. Returns true if they contain the same number of strings and all of the strings are equal.

References StrQueue::size().

ostream& relacs::operator<< ( ostream &  str,
const StrQueue &  sq 
)

Write the whole StrQueue into stream str.

References StrQueue::save().

Variable Documentation

const int NUnits = 50

Referenced by Parameter::changeUnit().

string UnitPref[NUnits]
Initial value:
= { "Deka", "deka", "Hekto", "hekto", "kilo", "Kilo",
"Mega", "mega", "Giga", "giga", "Tera", "tera",
"Peta", "peta", "Exa", "exa",
"Dezi", "dezi", "Zenti", "centi", "Micro", "micro",
"Milli", "milli", "Nano", "nano", "Piko", "piko",
"Femto", "femto", "Atto", "atto",
"da", "h", "K", "k", "M", "G", "T", "P", "E",
"d", "c", "mu", "u", "m", "n", "p", "f", "a" }

Referenced by Parameter::changeUnit().

double UnitFac[NUnits]
Initial value:
= { 1.0, 1.0, 2.0, 2.0, 3.0, 3.0,
6.0, 6.0, 9.0, 9.0, 12.0, 12.0,
15.0, 15.0, 18.0, 18.0,
-1.0, -1.0, -2.0, -2.0, -6.0, -6.0,
-3.0, -3.0, -9.0, -9.0, -12.0, -12.0,
-15.0, -15.0, -18.0, -18.0,
1.0, 2.0, 3.0, 3.0, 6.0, 9.0, 12.0, 15.0, 18.0,
-1.0, -2.0, -6.0, -6.0, -3.0, -9.0, -12.0, -15.0, -18.0 }

Referenced by Parameter::changeUnit().