libept  0.5.25
Classes | Public Member Functions | List of all members
ept::core::record::Parser Struct Reference

#include <record.h>

Inheritance diagram for ept::core::record::Parser:
Inheritance graph
[legend]
Collaboration diagram for ept::core::record::Parser:
Collaboration graph
[legend]

Classes

struct  Default

Public Member Functions

bool parseBool (bool &def, const std::string &str) const
 Parser ()
 Parser (const std::string &str)
template<PropertyId p>
PropertyType< p >::T parse (typename PropertyType< p >::T def, std::string data)
template<typename T >
parse (const T &def, const std::string &field) const
template<PropertyId p>
PropertyType< p >::T get (const typename PropertyType< p >::T &def=Default< typename PropertyType< p >::T >::def) const
template<>
std::string get (const std::string &def) const
template<>
std::string get (const std::string &def) const
template<>
int parse (const int &def, const std::string &str) const
- Public Member Functions inherited from ept::core::record::RecordParser
 RecordParser ()
 RecordParser (const std::string &str)
void scan (const std::string &str)
 Index a new record.
size_t index (const std::string &str) const
 Get the index of the field with the given name.
std::string field (size_t idx) const
 Return the field by its index.
std::string name (size_t idx) const
 Return the name of a field by its index.
std::string lookup (size_t idx) const
 Return the content of a field by its index.
std::string lookup (const std::string &name) const
 Return the content of a field by its name.
std::string operator[] (size_t idx) const
 Return the content of a field by its index.
std::string operator[] (const std::string &name) const
 Return the content of a field by its name.
const std::string & record () const
 Return the entire record.
std::string record ()
 Return the entire record.
size_t size () const
 Return the number of fields in the record.

Constructor & Destructor Documentation

ept::core::record::Parser::Parser ( )
inline
ept::core::record::Parser::Parser ( const std::string &  str)
inline

Member Function Documentation

template<PropertyId p>
PropertyType< p >::T ept::core::record::Parser::get ( const typename PropertyType< p >::T &  def = Default< typename PropertyType< p >::T >::def) const
inline
template<>
std::string ept::core::record::Parser::get ( const std::string &  def) const
inline
template<>
std::string ept::core::record::Parser::get ( const std::string &  def) const
inline
template<PropertyId p>
PropertyType< p >::T ept::core::record::Parser::parse ( typename PropertyType< p >::T  def,
std::string  data 
)
template<typename T >
T ept::core::record::Parser::parse ( const T &  def,
const std::string &  field 
) const
template<>
int ept::core::record::Parser::parse ( const int &  def,
const std::string &  str 
) const
inline
bool ept::core::record::Parser::parseBool ( bool &  def,
const std::string &  str 
) const
inline

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