| The Gaudi Framework v32r1 (f65d50dc)

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 18 of file Units.h.

## Member Typedef Documentation

## ◆ Container

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

Definition at line 20 of file Units.h.

## ◆ ValueWithPosition

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

Definition at line 21 of file Units.h.

## Member Function Documentation

## ◆ Add() [1/2]

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() ); }
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
std::move
T move(T... args)
Gaudi::Parsers::Units::Add
bool Add(std::string name, double value)
Definition: Units.cpp:8

## ◆ Add() [2/2]

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

Definition at line 10 of file Units.cpp.

10 {
11 return units_.emplace( std::move( name ), ValueWithPosition( value, pos ) ).second;
12 }
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
Gaudi::Parsers::Units::units_
Container units_
Definition: Units.h:31
std::move
T move(T... args)
std::map::emplace
T emplace(T... args)
Gaudi::Parsers::Units::ValueWithPosition
Container::mapped_type ValueWithPosition
Definition: Units.h:21

## ◆ Find() [1/2]

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

Definition at line 21 of file Units.cpp.

21 {
22 auto it = units_.find( name );
23 if ( it == units_.end() ) return false;
24 result = it->second;
25 return true;
26 }
gaudiComponentHelp.name
name
Definition: gaudiComponentHelp.py:41
Gaudi::Parsers::Units::units_
Container units_
Definition: Units.h:31
std::map::end
T end(T... args)
std::map::find
T find(T... args)

## ◆ Find() [2/2]

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

Definition at line 14 of file Units.cpp.

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

## ◆ ToString()

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

## Member Data Documentation

## ◆ units_

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

Definition at line 31 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