fipa_acl  1.4
Public Member Functions | Public Attributes | List of all members
acl::grammar::DateTime< Iterator > Struct Template Reference

#include <grammar_common.h>

Inherits grammar< Iterator, fipa::acl::Time(), qi::locals< std::string > >.

Public Member Functions

 DateTime ()
 

Public Attributes

CodedNumber< Iterator > codedNumber
 
qi::rule< Iterator,
fipa::acl::Time(), qi::locals
< std::string > > 
date_time_rule
 
qi::rule< Iterator, std::string() > year
 
CodedNumber< Iterator > month
 
CodedNumber< Iterator > day
 
CodedNumber< Iterator > hour
 
CodedNumber< Iterator > minute
 
CodedNumber< Iterator > second
 
qi::rule< Iterator, std::string() > millisecond
 

Detailed Description

template<typename Iterator>
struct acl::grammar::DateTime< Iterator >

Definition at line 829 of file grammar_common.h.

Constructor & Destructor Documentation

template<typename Iterator >
acl::grammar::DateTime< Iterator >::DateTime ( )
inline

Definition at line 831 of file grammar_common.h.

831  : DateTime::base_type(date_time_rule, "DateTime-bitefficient_grammar")
832  {
833 
834  // Construct/Fill Time()
835  // First read the standard input for struct tm
836  // then fill the extended millisecond field
837 
838  // Fixme: label::_a = string, label::_a += "-" will return only label::_a as "-"
839  // Currently using a workaround with 'buildString'
840  date_time_rule = (( ( year [ label::_a = buildString(label::_1,"-","") ]) //, label::_a = label::_1, label::_a += "-" ])//, print("yearinBinDate:", label::_1) ]*/ )
841  >> ( month [ label::_a = buildString(label::_a, label::_1,"-") ])
842  >> ( day [ label::_a = buildString(label::_a, label::_1,"T") ])
843  >> ( hour [ label::_a = buildString(label::_a, label::_1,":") ])
844  >> ( minute [ label::_a = buildString(label::_a, label::_1,":") ])
845  >> ( second [ label::_a = buildString(label::_a, label::_1,"") ])
846  )
847  >> ( millisecond [ label::_val = convertToTime(label::_a, label::_1) ])
848  )
849  ;
850 
851  year = ( codedNumber [ label::_val = label::_1] )
852  >> ( codedNumber [ label::_val += label::_1 ])
853  ;
854  // same format as year
855  millisecond = year.alias();
856 
857  #ifdef BOOST_SPIRIT_DEBUG
858  BOOST_SPIRIT_DEBUG_NODE(year);
859  BOOST_SPIRIT_DEBUG_NODE(millisecond);
860  #endif // BOOST_SPIRIT_DEBUG
861 
863  }
qi::rule< Iterator, std::string() > year
CodedNumber< Iterator > day
CodedNumber< Iterator > month
CodedNumber< Iterator > second
CodedNumber< Iterator > minute
CodedNumber< Iterator > codedNumber
phoenix::function< convertToTimeImpl > convertToTime
qi::rule< Iterator, std::string() > millisecond
#define FIPA_DEBUG_RULE(X)
CodedNumber< Iterator > hour
qi::rule< Iterator, fipa::acl::Time(), qi::locals< std::string > > date_time_rule
phoenix::function< buildStringImpl > buildString

Member Data Documentation

template<typename Iterator >
CodedNumber<Iterator> acl::grammar::DateTime< Iterator >::codedNumber

Definition at line 865 of file grammar_common.h.

template<typename Iterator >
qi::rule<Iterator, fipa::acl::Time(), qi::locals<std::string> > acl::grammar::DateTime< Iterator >::date_time_rule

Definition at line 867 of file grammar_common.h.

template<typename Iterator >
CodedNumber<Iterator> acl::grammar::DateTime< Iterator >::day

Definition at line 870 of file grammar_common.h.

template<typename Iterator >
CodedNumber<Iterator> acl::grammar::DateTime< Iterator >::hour

Definition at line 871 of file grammar_common.h.

template<typename Iterator >
qi::rule<Iterator, std::string() > acl::grammar::DateTime< Iterator >::millisecond

Definition at line 874 of file grammar_common.h.

template<typename Iterator >
CodedNumber<Iterator> acl::grammar::DateTime< Iterator >::minute

Definition at line 872 of file grammar_common.h.

template<typename Iterator >
CodedNumber<Iterator> acl::grammar::DateTime< Iterator >::month

Definition at line 869 of file grammar_common.h.

template<typename Iterator >
CodedNumber<Iterator> acl::grammar::DateTime< Iterator >::second

Definition at line 873 of file grammar_common.h.

template<typename Iterator >
qi::rule<Iterator, std::string() > acl::grammar::DateTime< Iterator >::year

Definition at line 868 of file grammar_common.h.


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