| # Gaudi Framework, version v21r7 |

Home |  | Generated: 22 Jan 2010

# Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT > Class Template Reference

The valid represenation of map are:

- {"file1":"path1","something":"nothing"}
- {"file1"="path1","something"="nothing"}
- ["file1":10,"something":20]
- ["file1"=30,"something"=40] Inner key type depends on KeyGrammarT grammar Inner value type depends on ValueGrammarT grammar.

More...

`#include <Grammars.h>`

List of all members.

## Public Types
typedef KeyGrammarT::ResultT | KeyT
typedef ValueGrammarT::ResultT | ValueT
typedef std::map< KeyT, ValueT > | ResultT
## Public Member Functions
void | matchItem () const
| call backs. Action when we match pair in map
void | matchFirst (const KeyT &value) const
| call backs. Action when we match key of pair
void | matchSecond (const ValueT &value) const
| call backs. Action when we match value pf pair
## Classes
struct | definition

## Detailed Description

### template<typename KeyGrammarT, typename ValueGrammarT>
class Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >

The valid represenation of map are:

- {"file1":"path1","something":"nothing"}
- {"file1"="path1","something"="nothing"}
- ["file1":10,"something":20]
- ["file1"=30,"something"=40] Inner key type depends on KeyGrammarT grammar Inner value type depends on ValueGrammarT grammar.

Author:
  Alexander MAZUROV Alexander.Mazurov@gmail.com

  Vanya BELYAEV ibelyaev@physics.syr.edu

Date:
  2006-05-14

Definition at line 467 of file Grammars.h.

## Member Typedef Documentation

template<typename KeyGrammarT, typename ValueGrammarT>

typedef KeyGrammarT::ResultT Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::KeyT

Definition at line 478 of file Grammars.h.

template<typename KeyGrammarT, typename ValueGrammarT>

typedef ValueGrammarT::ResultT Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::ValueT

Definition at line 479 of file Grammars.h.

template<typename KeyGrammarT, typename ValueGrammarT>

typedef std::map<KeyT,ValueT> Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::ResultT

Definition at line 480 of file Grammars.h.

## Member Function Documentation

template<typename KeyGrammarT, typename ValueGrammarT>

void Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::matchItem | ( |  | ) | const`[inline]`

call backs. Action when we match pair in map

Definition at line 483 of file Grammars.h.

    00484       {
    00485         //this->val().insert(this->attrs());
    00486         this->val()[this->attrs().first] = this->attrs().second ;
    00487       }

template<typename KeyGrammarT, typename ValueGrammarT>

void Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::matchFirst | ( | const KeyT & | value | ) | const`[inline]`

call backs. Action when we match key of pair

Definition at line 489 of file Grammars.h.

    00489 {  this->attrs().first = value ; }

template<typename KeyGrammarT, typename ValueGrammarT>

void Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::matchSecond | ( | const ValueT & | value | ) | const`[inline]`

call backs. Action when we match value pf pair

Definition at line 491 of file Grammars.h.

    00491 { this->attrs().second = value ; }

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v21r7/GaudiKernel/GaudiKernel/Grammars.h