| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Types | Public Member Functions | Private Attributes | List of all members
Gaudi::Parsers::Units Class Reference

`#include <Units.h>`

Collaboration diagram for Gaudi::Parsers::Units:
[legend]

## Public Types
typedef std::map< std::string, std::pair< double, Position > > | Container
typedef Container::mapped_type | ValueWithPosition

## Public Member Functions
bool | Add (const std::string &name, double value)
bool | Add (const std::string &name, double value, const Position &pos)
bool | Find (const std::string &name, ValueWithPosition &result) const
bool | Find (const std::string &name, double &result) const
std::string | ToString () const

## Private Attributes
Container | units_

## Detailed Description

Definition at line 18 of file Units.h.

## Member Typedef Documentation

typedef std::map<std::string, std::pair<double, Position> > Gaudi::Parsers::Units::Container

Definition at line 20 of file Units.h.

typedef Container::mapped_type Gaudi::Parsers::Units::ValueWithPosition

Definition at line 21 of file Units.h.

## Member Function Documentation

bool Gaudi::Parsers::Units::Add | ( | const std::string & | name,
|  | double | value
| ) |  |

Definition at line 9 of file Units.cpp.

{
return Add(name, value, Position());
}

bool Gaudi::Parsers::Units::Add | ( | const std::string & | name,
|  | double | value,
|  | const Position & | pos
| ) |  |

Definition at line 13 of file Units.cpp.

{
std::pair<Container::iterator,bool> result =
units_.insert(
Container::value_type(name,ValueWithPosition(value, pos))
);
return result.second;
}

bool Gaudi::Parsers::Units::Find | ( | const std::string & | name,
|  | ValueWithPosition & | result
| ) |  | const

Definition at line 32 of file Units.cpp.

{
Container::const_iterator it = units_.find(name);
if (it != units_.end()) {
result = it->second;
return true;
}
return false;
}

bool Gaudi::Parsers::Units::Find | ( | const std::string & | name,
|  | double & | result
| ) |  | const

Definition at line 22 of file Units.cpp.

{
ValueWithPosition r;
if (Find(name,r)){
result = r.first;
return true;
}
return false;
}

std::string Gaudi::Parsers::Units::ToString | ( |  | ) | const

## Member Data Documentation

Container Gaudi::Parsers::Units::units_
| private

Definition at line 30 of file Units.h.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiCoreSvc/src/JobOptionsSvc/Units.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiCoreSvc/src/JobOptionsSvc/Units.cpp