| # Gaudi Framework, version v22r2 |

Home |  | Generated: Tue May 10 2011

Classes | Public Types | Public Member Functions | Private Attributes

# Gaudi::Parsers::RealUnitsGrammar Class Reference

The valid represenation of reals with units are

- 1, 1.0, 1.0e+2, 1e-2, 0.5mm, 0.5 mm, 0.5*mm.

More...

`#include <ParserGrammar.h>`

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

List of all members.

## Classes
struct | definition
## Public Types
typedef long double | ResultT
## Public Member Functions
| RealUnitsGrammar ()
void | matchRealUnits () const
void | matchReal (ResultT value) const
void | matchPosition (IteratorT value) const
void | matchUnit (const std::string &unit) const
void | setParser (Parser *parser)
| Set up pointer to Parser.
## Private Attributes
Parser * | m_parser

## Detailed Description

The valid represenation of reals with units are

- 1, 1.0, 1.0e+2, 1e-2, 0.5mm, 0.5 mm, 0.5*mm.

Author:
  Alexander MAZUROV Alexander.Mazurov@gmail.com
  Vanya BELYAEV ibelyaev@physics.syr.edu

Date:
  2006-05-14

Definition at line 137 of file ParserGrammar.h.

## Member Typedef Documentation

typedef long double Gaudi::Parsers::RealUnitsGrammar::ResultT

Definition at line 142 of file ParserGrammar.h.

## Constructor & Destructor Documentation

Gaudi::Parsers::RealUnitsGrammar::RealUnitsGrammar | ( | ) | `[inline]`

Definition at line 143 of file ParserGrammar.h.

    :m_parser(NULL){}

## Member Function Documentation

void Gaudi::Parsers::RealUnitsGrammar::matchPosition | ( | IteratorT | value ) | const`[inline]`

Definition at line 178 of file ParserGrammar.h.

          { attrs().get<0>()=value; }

void Gaudi::Parsers::RealUnitsGrammar::matchReal | ( | ResultT | value ) | const`[inline]`

Definition at line 174 of file ParserGrammar.h.

          { attrs().get<1>()=value; }

void Gaudi::Parsers::RealUnitsGrammar::matchRealUnits | ( | ) | const`[inline]`

Definition at line 168 of file ParserGrammar.h.

          {
            val() = Gaudi::Utils::toString ( attrs().get<1>() );
          }

void Gaudi::Parsers::RealUnitsGrammar::matchUnit | ( | const std::string & | unit ) | const`[inline]`

Definition at line 182 of file ParserGrammar.h.

          {
            if (NULL == m_parser) return;
            file_position fpos = attrs().get<0>().get_position();
            Position pos(fpos.file,fpos.line,fpos.column);

            attrs().get<1>() *= m_parser->matchUnit(unit,pos);
          }

void Gaudi::Parsers::RealUnitsGrammar::setParser | ( | Parser * | parser ) | `[inline]`

Set up pointer to Parser.

Parameters:

  parser | Pouinter to parser

Definition at line 194 of file ParserGrammar.h.

    {m_parser = parser;}

## Member Data Documentation

Parser* Gaudi::Parsers::RealUnitsGrammar::m_parser`[private]`

Definition at line 196 of file ParserGrammar.h.

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

- /afs/.cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v22r2/GaudiSvc/src/JobOptionsSvc/ParserGrammar.h

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