|
pelib
2.0.0
|
#include <AmplInputVector.hpp>
Public Member Functions | |
| AmplInputVector (bool strict=true) | |
| virtual AmplInputVector * | 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 Outputer of a Pelib::Vector in AMPL input format
Definition at line 39 of file AmplInputVector.hpp.
| pelib::AmplInputVector< Key, Value >::AmplInputVector | ( | bool | strict = true | ) | [inline] |
Constructor
| strict | if Value is a floating-point number, fails if any element parsed is an integer (but succeeds if it is written as a float, i.e., 52.0 |
Definition at line 48 of file AmplInputVector.hpp.
| virtual AmplInputVector* pelib::AmplInputVector< Key, Value >::clone | ( | ) | const [inline, virtual] |
Returns a pointer to a copy of this class instance
Implements pelib::AmplInputDataOutput.
Definition at line 56 of file AmplInputVector.hpp.
| virtual void pelib::AmplInputVector< Key, Value >::dump | ( | std::ostream & | o, |
| const AlgebraData * | data | ||
| ) | const [inline, virtual] |
Dumps the content of a pelib::Vector into an output stream in AMPL input data format
| o | Output stream where is written the vector in AMPL input data format |
| data | pelib::Vector to be written to output stream |
Implements pelib::AlgebraDataOutput.
Definition at line 130 of file AmplInputVector.hpp.
| virtual std::string pelib::AmplInputVector< Key, Value >::getDetailedPattern | ( | ) | [inline, virtual] |
Returns a boost::regex regular expression that matches a AMPL input data vector data structure and can extract all its elements
Implements pelib::AlgebraDataParser.
Definition at line 149 of file AmplInputVector.hpp.
| virtual std::string pelib::AmplInputVector< Key, Value >::getGlobalPattern | ( | ) | [inline, virtual] |
Returns a boost::regex regular expression that matches a AMPL input data vector data structure
Implements pelib::AlgebraDataParser.
Definition at line 157 of file AmplInputVector.hpp.
| virtual AlgebraData* pelib::AmplInputVector< Key, Value >::parse | ( | std::istream & | in | ) | [inline, virtual] |
Parses the input stream into a instance of Pelib::Vector
| in | input stream in AMPL input data format to be parsed |
Implements pelib::AlgebraDataParser.
Definition at line 66 of file AmplInputVector.hpp.
bool pelib::AmplInputVector< Key, Value >::strict [protected] |
Internal record of the strict or not strict parsing policy of this vector parser instance
Definition at line 164 of file AmplInputVector.hpp.