| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Public Types | Public Member Functions | Public Attributes | List of all members
Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT > Class Template Reference

The valid represenation of map are: More...

`#include <Grammars.h>`

Inheritance diagram for Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >:
[legend]
Collaboration diagram for Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >:
[legend]

## Classes
struct | definition
struct | Operations
struct | tag_key
struct | tag_mapped

## Public Types
typedef KeyGrammarT::ResultT | KeyT
typedef ValueGrammarT::ResultT | ValueT
typedef std::map< KeyT, ValueT > | ResultT
typedef MapT | ResultT
typedef MapT::key_type | KeyT
typedef MapT::mapped_type | MappedT
typedef std::pair< KeyT, MappedT > | PairT
typedef std::vector< PairT > | VectorPairT

## 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
| MapGrammar ()

## Public Attributes
Grammar_< Iterator, typename MapT::key_type, Skipper > ::Grammar | key
Grammar_< Iterator, typename MapT::mapped_type, Skipper > ::Grammar | value
qi::rule< Iterator, PairT(), Skipper > | pair
qi::rule< Iterator, VectorPairT(), Skipper > | list
qi::rule< Iterator, ResultT(), Skipper > | map
ph::function< Operations > | op

## 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 Alexa.nosp@m.nder.nosp@m..Mazu.nosp@m.rov@.nosp@m.gmail.nosp@m..com
  Vanya BELYAEV ibely.nosp@m.aev@.nosp@m.physi.nosp@m.cs.s.nosp@m.yr.ed.nosp@m.u

Date
  2006-05-14

Definition at line 472 of file Grammars.h.

## Member Typedef Documentation

template<typename KeyGrammarT , typename ValueGrammarT >

typedef MapT::key_type Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::KeyT

Definition at line 292 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

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

Definition at line 483 of file Grammars.h.

template<typename KeyGrammarT , typename ValueGrammarT >

typedef MapT::mapped_type Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::MappedT

Definition at line 293 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

typedef std::pair<KeyT, MappedT> Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::PairT

Definition at line 294 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

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

Definition at line 291 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

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

Definition at line 485 of file Grammars.h.

template<typename KeyGrammarT , typename ValueGrammarT >

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

Definition at line 484 of file Grammars.h.

template<typename KeyGrammarT , typename ValueGrammarT >

typedef std::vector<PairT> Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::VectorPairT

Definition at line 296 of file GrammarsV2.h.

## Constructor & Destructor Documentation

template<typename KeyGrammarT , typename ValueGrammarT >

Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::MapGrammar | ( |  | ) |
| inline

Definition at line 322 of file GrammarsV2.h.

: MapGrammar::base_type(map) {
pair = key[op(qi::_val,qi::_1, tag_key())] > (qi::lit(':') | '=') >
value[op(qi::_val,qi::_1, tag_mapped())];
list = -(pair % enc::char_(','));
map = (('[' >> list >> ']')
| ('{' >> list >> '}'))[op(qi::_val,qi::_1)];
}

## Member Function Documentation

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 494 of file Grammars.h.

{ this->attrs().first = value ; }
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 488 of file Grammars.h.

{
//this->val().insert(this->attrs());
this->val()[this->attrs().first] = this->attrs().second ;
}
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 496 of file Grammars.h.

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

## Member Data Documentation

template<typename KeyGrammarT , typename ValueGrammarT >

Grammar_<Iterator, typename MapT::key_type, Skipper>::Grammar Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::key

Definition at line 331 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

qi::rule<Iterator, VectorPairT(), Skipper> Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::list

Definition at line 335 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

qi::rule<Iterator, ResultT(), Skipper> Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::map

Definition at line 336 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

ph::function<Operations> Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::op

Definition at line 337 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

qi::rule<Iterator, PairT(), Skipper> Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::pair

Definition at line 334 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

Grammar_<Iterator, typename MapT::mapped_type, Skipper>::Grammar Gaudi::Parsers::MapGrammar< KeyGrammarT, ValueGrammarT >::value

Definition at line 333 of file GrammarsV2.h.

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

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