| The Gaudi Framework v30r0 (c919700c)

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

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

Public Types | Public Member Functions | Private Attributes | List of all members
Gaudi::Parsers::Units Class Referencefinal

`#include <src/JobOptionsSvc/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 (std::string name, double value)
bool | Add (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 20 of file Units.h.

## Member Typedef Documentation

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

Definition at line 23 of file Units.h.

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

Definition at line 24 of file Units.h.

## Member Function Documentation

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

Definition at line 8 of file Units.cpp.

8 { return Add( std::move( name ), value, Position() ); }
std::move
T move(T...args)
Gaudi::Parsers::Units::Add
bool Add(std::string name, double value)
Definition: Units.cpp:8

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

Definition at line 10 of file Units.cpp.

11 {
12 return units_.emplace( std::move( name ), ValueWithPosition( value, pos ) ).second;
13 }
Gaudi::Parsers::Units::units_
Container units_
Definition: Units.h:34
std::move
T move(T...args)
std::map::emplace
T emplace(T...args)
Gaudi::Parsers::Units::ValueWithPosition
Container::mapped_type ValueWithPosition
Definition: Units.h:24

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

Definition at line 23 of file Units.cpp.

24 {
25 auto it = units_.find( name );
26 if ( it == units_.end() ) return false;
27 result = it->second;
28 return true;
29 }
Gaudi::Parsers::Units::units_
Container units_
Definition: Units.h:34
std::map::end
T end(T...args)
std::map::find
T find(T...args)

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

Definition at line 15 of file Units.cpp.

16 {
17 ValueWithPosition r;
18 if ( !Find( name, r ) ) return false;
19 result = r.first;
20 return true;
21 }
Gaudi::Parsers::Units::Find
bool Find(const std::string &name, ValueWithPosition &result) const
Definition: Units.cpp:23
Gaudi::Parsers::Units::ValueWithPosition
Container::mapped_type ValueWithPosition
Definition: Units.h:24

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

## Member Data Documentation

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

Definition at line 34 of file Units.h.

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

- GaudiCoreSvc/src/JobOptionsSvc/Units.h
- GaudiCoreSvc/src/JobOptionsSvc/Units.cpp