| # 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 | Private Attributes | List of all members
Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT > Class Template Reference

The valid represenation of pairs are: ("abc",123) or ("abc","def") Inner types of pair depends on KeyGrammarT and ValueGrammarT grammars. More...

`#include <Grammars.h>`

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

## Classes
struct | definition
struct | first
struct | second

## Public Types
typedef KeyGrammarT::ResultT | KeyT
typedef ValueGrammarT::ResultT | ValueT
typedef std::pair< KeyT, ValueT > | ResultT
typedef PairT | ResultT
typedef PairT::first_type | first_type
typedef PairT::second_type | second_type

## Public Member Functions
| PairGrammar (const std::string &delim=",")
| Constructor.
void | matchFirst (const KeyT &first) const
| callback. Action when we match first value
void | matchSecond (const ValueT &second) const
| callback. Action when we match second value
const std::string & | delim () const
void | setDelim (const std::string &delim)
| Set delimiters for pair values.
| PairGrammar ()
| PairGrammar (const std::string &delimeter)
void | init (const std::string &delimeter)

## Public Attributes
Grammar_< Iterator, typename PairT::first_type, Skipper > ::Grammar | key
Grammar_< Iterator, typename PairT::second_type, Skipper > ::Grammar | value
qi::rule< Iterator, char()> | begin
qi::rule< Iterator, void(char)> | end
qi::rule< Iterator, ResultT(), qi::locals< char >, Skipper > | pair
qi::rule< Iterator, ResultT(), Skipper > | pair_in

## Private Attributes
std::string | m_delim

## Detailed Description

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

The valid represenation of pairs are: ("abc",123) or ("abc","def") Inner types of pair depends on KeyGrammarT and ValueGrammarT grammars.

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

## Member Typedef Documentation

template<typename KeyGrammarT , typename ValueGrammarT >

typedef PairT::first_type Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::first_type

Definition at line 243 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

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

Definition at line 367 of file Grammars.h.

template<typename KeyGrammarT , typename ValueGrammarT >

typedef PairT Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::ResultT

Definition at line 242 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

typedef std::pair<KeyT,ValueT> Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::ResultT

Definition at line 369 of file Grammars.h.

template<typename KeyGrammarT , typename ValueGrammarT >

typedef PairT::second_type Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::second_type

Definition at line 244 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

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

Definition at line 368 of file Grammars.h.

## Constructor & Destructor Documentation

template<typename KeyGrammarT , typename ValueGrammarT >

Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::PairGrammar | ( | const std::string & | delim = `","` | ) |
| inline

Constructor.

Parameters

  delim | Delimiter for pair values

Definition at line 374 of file Grammars.h.

: m_delim(delim) {}
template<typename KeyGrammarT , typename ValueGrammarT >

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

Definition at line 246 of file GrammarsV2.h.

: PairGrammar::base_type(pair) {
init(",");
}
template<typename KeyGrammarT , typename ValueGrammarT >

Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::PairGrammar | ( | const std::string & | delimeter | ) |
| inline

Definition at line 250 of file GrammarsV2.h.

: PairGrammar::base_type(pair) {
init(delimeter);
}

## Member Function Documentation

template<typename KeyGrammarT , typename ValueGrammarT >

const std::string& Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::delim | ( |  | ) | const
| inline

Returns
  Delimiter for pair values

Definition at line 403 of file Grammars.h.

{ return m_delim ; }
template<typename KeyGrammarT , typename ValueGrammarT >

void Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::init | ( | const std::string & | delimeter | ) |
| inline

Definition at line 256 of file GrammarsV2.h.

{
begin = enc::char_('(')[qi::_val=')']
|
enc::char_('[')[qi::_val=']'];
end = qi::char_(qi::_r1);
pair = begin[qi::_a = qi::_1] >> pair_in[qi::_val = qi::_1] >> end(qi::_a);
pair_in = key >> qi::lit(delimeter) >> value;
}
template<typename KeyGrammarT , typename ValueGrammarT >

void Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::matchFirst | ( | const KeyT & | first | ) | const
| inline

callback. Action when we match first value

Definition at line 378 of file Grammars.h.

{ this->val().first = first; }
template<typename KeyGrammarT , typename ValueGrammarT >

void Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::matchSecond | ( | const ValueT & | second | ) | const
| inline

callback. Action when we match second value

Definition at line 380 of file Grammars.h.

{ this->val().second = second; }
template<typename KeyGrammarT , typename ValueGrammarT >

void Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::setDelim | ( | const std::string & | delim | ) |
| inline

Set delimiters for pair values.

Parameters

  delim | Delimiter

Definition at line 407 of file Grammars.h.

{ m_delim = delim;}

## Member Data Documentation

template<typename KeyGrammarT , typename ValueGrammarT >

qi::rule<Iterator, char()> Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::begin

Definition at line 270 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

qi::rule<Iterator, void(char)> Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::end

Definition at line 271 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

Grammar_<Iterator, typename PairT::first_type, Skipper>::Grammar Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::key

Definition at line 266 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

std::string Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::m_delim
| private

Definition at line 409 of file Grammars.h.

template<typename KeyGrammarT , typename ValueGrammarT >

qi::rule<Iterator, ResultT(), qi::locals<char>, Skipper> Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::pair

Definition at line 272 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

qi::rule<Iterator, ResultT(), Skipper> Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::pair_in

Definition at line 273 of file GrammarsV2.h.

template<typename KeyGrammarT , typename ValueGrammarT >

Grammar_<Iterator, typename PairT::second_type, Skipper>::Grammar Gaudi::Parsers::PairGrammar< KeyGrammarT, ValueGrammarT >::value

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