pelib
2.0.0
|
#include <AmplOutputScalar.hpp>
Public Member Functions | |
AmplOutputScalar (bool strict=true) | |
virtual AmplOutputScalar * | clone () const |
virtual std::string | getDetailedPattern () |
virtual std::string | getGlobalPattern () |
virtual AlgebraData * | parse (std::istream &in) |
virtual void | dump (std::ostream &stream, const AlgebraData *data) const |
Protected Attributes | |
bool | strict |
Parser and output class for a pelib::Scalar in AMPL output format
Definition at line 35 of file AmplOutputScalar.hpp.
pelib::AmplOutputScalar< Value >::AmplOutputScalar | ( | bool | strict = true | ) | [inline] |
Constuctor
strict | If true and parsing floating point values, fails in any element parsed is an integer. An integer written as a float (e.g. 52.0) doesn't make the parser to fail. |
Definition at line 42 of file AmplOutputScalar.hpp.
virtual AmplOutputScalar* pelib::AmplOutputScalar< Value >::clone | ( | ) | const [inline, virtual] |
Returns a pointer to a copy of this instance
Implements pelib::AmplOutputDataOutput.
Definition at line 50 of file AmplOutputScalar.hpp.
virtual void pelib::AmplOutputScalar< Value >::dump | ( | std::ostream & | stream, |
const AlgebraData * | data | ||
) | const [inline, virtual] |
Writes the name and value of a pelib::Scalar to output stream in AMPL output format
Implements pelib::AlgebraDataOutput.
Definition at line 91 of file AmplOutputScalar.hpp.
virtual std::string pelib::AmplOutputScalar< Value >::getDetailedPattern | ( | ) | [inline, virtual] |
Returns a boost::regex string able to match a scalar in AMPL output format and extract its name and value
Implements pelib::AlgebraDataParser.
Definition at line 58 of file AmplOutputScalar.hpp.
virtual std::string pelib::AmplOutputScalar< Value >::getGlobalPattern | ( | ) | [inline, virtual] |
Returns a boost::regex string able to match a scalar in AMPL output format
Implements pelib::AlgebraDataParser.
Definition at line 66 of file AmplOutputScalar.hpp.
virtual AlgebraData* pelib::AmplOutputScalar< Value >::parse | ( | std::istream & | in | ) | [inline, virtual] |
Reads input stream and builds an instance of pelib::Scalar containing the name and value read
Implements pelib::AlgebraDataParser.
Definition at line 74 of file AmplOutputScalar.hpp.
bool pelib::AmplOutputScalar< Value >::strict [protected] |
Definition at line 106 of file AmplOutputScalar.hpp.