unit::ComposedGrammar Class Reference

spirit grammar for a composed unit More...

#include <Unit.h>

List of all members.

Public Member Functions

 ComposedGrammar (std::vector< std::string > &_symbols, std::vector< long > &_numerators, std::vector< long > &_denominators)
 constructor

Private Attributes

std::vector< std::string > & symbols
 the unit component symbols
std::vector< long > & numerators
 the unit component exponent numerators
std::vector< long > & denominators
 the unit component exponent denominators

Static Private Attributes

static
boost::spirit::int_parser
< long > 
long_p
 a special boost::spirit int_parser to parse a long integer
static
boost::spirit::uint_parser
< long > 
ulong_p
 a special boost::spirit int_parser to parse a unsigned long integer

Classes

struct  definition
 grammar definition More...


Detailed Description

spirit grammar for a composed unit

defines the boost::spirit grammer for a unit symbol including the required semantic actions; the component symbols, as well as numerator and denominator int values are stored in std::vectors. long_p and ulong_p are used for parsing the long integers of the exponent; note that the denominator must be a long without sign

Definition at line 1396 of file Unit.h.


Constructor & Destructor Documentation

unit::ComposedGrammar::ComposedGrammar ( std::vector< std::string > &  _symbols,
std::vector< long > &  _numerators,
std::vector< long > &  _denominators 
) [inline]

constructor

supplies references to the symbol, numerator and denominator vectors

Definition at line 1414 of file Unit.h.


Member Data Documentation

std::vector<std::string>& unit::ComposedGrammar::symbols [private]

the unit component symbols

Definition at line 1400 of file Unit.h.

Referenced by unit::ComposedGrammar::definition< ScannerT >::definition().

std::vector<long>& unit::ComposedGrammar::numerators [private]

the unit component exponent numerators

Definition at line 1402 of file Unit.h.

Referenced by unit::ComposedGrammar::definition< ScannerT >::definition().

std::vector<long>& unit::ComposedGrammar::denominators [private]

the unit component exponent denominators

Definition at line 1404 of file Unit.h.

Referenced by unit::ComposedGrammar::definition< ScannerT >::definition().

boost::spirit::int_parser< long > unit::ComposedGrammar::long_p [static, private]

a special boost::spirit int_parser to parse a long integer

Definition at line 1406 of file Unit.h.

Referenced by unit::ComposedGrammar::definition< ScannerT >::definition().

boost::spirit::uint_parser< long > unit::ComposedGrammar::ulong_p [static, private]

a special boost::spirit int_parser to parse a unsigned long integer

Definition at line 1408 of file Unit.h.

Referenced by unit::ComposedGrammar::definition< ScannerT >::definition().


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

Generated on Wed Apr 11 18:07:13 2012 for Quantities by  doxygen 1.5.6