|
pelib
2.0.0
|
#include <AmplInputSet.hpp>
Public Member Functions | |
| AmplInputSet (bool strict=true) | |
| virtual AmplInputSet * | clone () const |
| virtual AlgebraData * | parse (std::istream &in) |
| virtual void | dump (std::ostream &o, const AlgebraData *data) const |
| virtual std::string | getDetailedPattern () |
| virtual std::string | getGlobalPattern () |
Protected Attributes | |
| bool | strict |
Parser and output class for Set in AMPL input data text format
Definition at line 36 of file AmplInputSet.hpp.
| pelib::AmplInputSet< Value, Key >::AmplInputSet | ( | bool | strict = true | ) | [inline] |
Constructor
| strict | If true and Value is a floating-point numeric type, fails if one element is an integer. An integer written as a float (e.g. 52.0) doesn't make the parser to fail |
Definition at line 45 of file AmplInputSet.hpp.
| virtual AmplInputSet* pelib::AmplInputSet< Value, Key >::clone | ( | ) | const [inline, virtual] |
Returns a pointer to a copy of this class instance
Implements pelib::AmplInputDataOutput.
Definition at line 53 of file AmplInputSet.hpp.
| virtual void pelib::AmplInputSet< Value, Key >::dump | ( | std::ostream & | o, |
| const AlgebraData * | data | ||
| ) | const [inline, virtual] |
Output all values of instance of pelib::set into output stream in AMPL input data format
| o | Output stream to write to in AMPL input data format |
| data | Instance of pelib::Set whose values are to be written to output stream |
Implements pelib::AlgebraDataOutput.
Definition at line 141 of file AmplInputSet.hpp.
| virtual std::string pelib::AmplInputSet< Value, Key >::getDetailedPattern | ( | ) | [inline, virtual] |
Returns a boost::regex regular expression that matches a Set in AMPL input data format and able to extract its elements
Implements pelib::AlgebraDataParser.
Definition at line 170 of file AmplInputSet.hpp.
| virtual std::string pelib::AmplInputSet< Value, Key >::getGlobalPattern | ( | ) | [inline, virtual] |
Returns a boost::regex regular expression that matches a Set in AMPL input data format
Implements pelib::AlgebraDataParser.
Definition at line 178 of file AmplInputSet.hpp.
| virtual AlgebraData* pelib::AmplInputSet< Value, Key >::parse | ( | std::istream & | in | ) | [inline, virtual] |
Parse input stream in AMPL input data format into a pointer to an instance of pelib::Set
| in | Input stream in AMPL input data format to be parsed |
Implements pelib::AlgebraDataParser.
Definition at line 63 of file AmplInputSet.hpp.
bool pelib::AmplInputSet< Value, Key >::strict [protected] |
Defines if parsin operation should fail upon the parsing of an integer when the Set holds floating-point numeric values
Definition at line 185 of file AmplInputSet.hpp.