| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

Public Types | Public Member Functions | Private Attributes

# Gaudi::Parsers::Units Class Reference

`#include <Units.h>`

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

List of all members.

## 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,
|  | double & | result
| ) |  | const

Definition at line 22 of file Units.cpp.

                                                                  {

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

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;
    }

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_v23r1/GaudiCoreSvc/src/JobOptionsSvc/Units.h
- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v23r1/GaudiCoreSvc/src/JobOptionsSvc/Units.cpp

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines