pelib  2.0.0
pelib::AlgebraDataParser Class Reference

#include <AlgebraDataParser.hpp>

Inheritance diagram for pelib::AlgebraDataParser:

List of all members.

Public Member Functions

virtual std::string getDetailedPattern ()=0
virtual std::string getGlobalPattern ()=0
virtual AlgebraDataparse (std::istream &in)=0

Static Public Member Functions

template<class Target >
static Target convert (std::string element, bool strict=0)

Static Protected Member Functions

static bool is_decimal (const std::type_info &var)
static bool is_integer (const std::type_info &var)

Detailed Description

Base class of any class able to parse a text into a data structure that can be contained in an instance of Algebra. This class must be derived to be used

Definition at line 42 of file AlgebraDataParser.hpp.

Member Function Documentation

template<class Target >
static Target pelib::AlgebraDataParser::convert ( std::string  element,
bool  strict = 0 
) [inline, static]

Converts a string into an instance of T and throws a ParseException upon conversion error. If T is a numeric base type (int, float and derivatives) and strict is true, then an attempt to convert a string that matches an integer value into a float or double results in throwing a NoDecimalException

Definition at line 49 of file AlgebraDataParser.hpp.

Returns a boost regular expression that extracts all data in the text to parse, that is stored in the corresponding data structure produced, such as its name or its values.

Implemented in pelib::AmplInputSet< Value, Key >, pelib::AmplInputVector< Key, Value >, pelib::AmplInputScalar< Value >, pelib::AmplOutputMatrix< Col, Row, Value >, pelib::AmplInputMatrix< Col, Row, Value >, pelib::AmplOutputSet< Value, Key >, pelib::AmplOutputVector< Key, Value >, and pelib::AmplOutputScalar< Value >.

static bool pelib::AlgebraDataParser::is_decimal ( const std::type_info &  var) [inline, static, protected]

Definition at line 303 of file AlgebraDataParser.hpp.

static bool pelib::AlgebraDataParser::is_integer ( const std::type_info &  var) [inline, static, protected]

Definition at line 310 of file AlgebraDataParser.hpp.

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