pelib
2.0.0
|
#include <AmplOutput.hpp>
Public Member Functions | |
AmplOutput (std::pair< std::vector< AmplOutputDataParser * >, std::vector< AmplOutputDataOutput * > > handlers) | |
virtual | ~AmplOutput () |
Algebra | parse (std::istream &data) const |
virtual void | dump (std::ostream &o, const Algebra &record) const |
virtual void | dump (std::ostream &o, const AlgebraData *data) const |
virtual void | dump (std::ostream &o, const AlgebraData &data) const |
virtual AmplOutput & | operator= (const AmplOutput &rhs) |
Static Public Member Functions | |
static std::vector < AmplOutputDataParser * > | floatParsers () |
static std::vector < AmplOutputDataOutput * > | floatOutputs () |
static std::pair< std::vector < AmplOutputDataParser * > , std::vector < AmplOutputDataOutput * > > | floatHandlers () |
static std::vector < AmplOutputDataParser * > | intFloatParsers () |
static std::vector < AmplOutputDataOutput * > | intFloatOutputs () |
static std::pair< std::vector < AmplOutputDataParser * > , std::vector < AmplOutputDataOutput * > > | intFloatHandlers () |
static std::vector < AmplOutputDataParser * > | stringParsers () |
static std::vector < AmplOutputDataOutput * > | stringOutputs () |
static std::pair< std::vector < AmplOutputDataParser * > , std::vector < AmplOutputDataOutput * > > | stringHandlers () |
Protected Member Functions | |
void | deleteParsers () |
void | deleteOutputs () |
Protected Attributes | |
std::vector < AmplOutputDataParser * > | parsers |
std::vector < AmplOutputDataOutput * > | outputs |
Parser and output class of a collection of algebraic data structures, in AMPL output format
Definition at line 40 of file AmplOutput.hpp.
pelib::AmplOutput::AmplOutput | ( | std::pair< std::vector< AmplOutputDataParser * >, std::vector< AmplOutputDataOutput * > > | handlers | ) |
Constructor
handlers | A pair of collections of Algebraic Data parsers and Output. May include parsers and output for scalars, vector, set or matrices for int, float, double or any other basic type. |
Definition at line 68 of file AmplOutput.cpp.
pelib::AmplOutput::~AmplOutput | ( | ) | [virtual] |
Destructor
Definition at line 74 of file AmplOutput.cpp.
void pelib::AmplOutput::deleteOutputs | ( | ) | [protected] |
Flushes all outputs in this instance. used by assignement operator
Definition at line 90 of file AmplOutput.cpp.
void pelib::AmplOutput::deleteParsers | ( | ) | [protected] |
Flushes all parsers in this instance. used by assignement operator
Definition at line 81 of file AmplOutput.cpp.
void pelib::AmplOutput::dump | ( | std::ostream & | o, |
const Algebra & | record | ||
) | const [virtual] |
Writes all derived instance of pelib::AlgebraData in the container to output stream in AMPL output text format
Implements pelib::AlgebraOutput.
Definition at line 223 of file AmplOutput.cpp.
void pelib::AmplOutput::dump | ( | std::ostream & | o, |
const AlgebraData * | data | ||
) | const [virtual] |
Writes a single derived instance of pelib::Algebradata to output stream in AMPL output format
Implements pelib::AlgebraOutput.
Definition at line 233 of file AmplOutput.cpp.
void pelib::AmplOutput::dump | ( | std::ostream & | o, |
const AlgebraData & | data | ||
) | const [virtual] |
Writes a single derived instance of pelib::Algebradata to output stream in AMPL output format
Definition at line 275 of file AmplOutput.cpp.
std::pair< std::vector< AmplOutputDataParser * >, std::vector< AmplOutputDataOutput * > > pelib::AmplOutput::floatHandlers | ( | ) | [static] |
Returns parsers and output specialized into floating-point content
Definition at line 304 of file AmplOutput.cpp.
std::vector< AmplOutputDataOutput * > pelib::AmplOutput::floatOutputs | ( | ) | [static] |
Returns output specialized into floating-point content
Definition at line 292 of file AmplOutput.cpp.
std::vector< AmplOutputDataParser * > pelib::AmplOutput::floatParsers | ( | ) | [static] |
Returns parsers specialized into floating-point content
Definition at line 280 of file AmplOutput.cpp.
std::pair< std::vector< AmplOutputDataParser * >, std::vector< AmplOutputDataOutput * > > pelib::AmplOutput::intFloatHandlers | ( | ) | [static] |
Returns parsers and output specialized into integer and floating-point content
Definition at line 369 of file AmplOutput.cpp.
std::vector< AmplOutputDataOutput * > pelib::AmplOutput::intFloatOutputs | ( | ) | [static] |
Returns output specialized into integer and floating-point content
Definition at line 353 of file AmplOutput.cpp.
std::vector< AmplOutputDataParser * > pelib::AmplOutput::intFloatParsers | ( | ) | [static] |
Returns parsers specialized into integer and floating-point content
Definition at line 338 of file AmplOutput.cpp.
AmplOutput & pelib::AmplOutput::operator= | ( | const AmplOutput & | rhs | ) | [virtual] |
Assignment operator. Copies all parsers and output handlers to the recipient instance
Definition at line 99 of file AmplOutput.cpp.
Algebra pelib::AmplOutput::parse | ( | std::istream & | data | ) | const [virtual] |
Reads input stream and produces a collection of pelib::AlgebraData derived class instances such as Scalar, Vector, Set and Matrix. Warning, this can be a ver slow process with large inputs
Implements pelib::AlgebraParser.
Definition at line 118 of file AmplOutput.cpp.
std::pair< std::vector< AmplOutputDataParser * >, std::vector< AmplOutputDataOutput * > > pelib::AmplOutput::stringHandlers | ( | ) | [static] |
Returns parsers and outputs specialized into string content
Definition at line 333 of file AmplOutput.cpp.
std::vector< AmplOutputDataOutput * > pelib::AmplOutput::stringOutputs | ( | ) | [static] |
Returns outputs specialized into string content
Definition at line 321 of file AmplOutput.cpp.
std::vector< AmplOutputDataParser * > pelib::AmplOutput::stringParsers | ( | ) | [static] |
Returns parsers specialized into string content. Used when no other parser can parse some content
Definition at line 309 of file AmplOutput.cpp.
std::vector<AmplOutputDataOutput*> pelib::AmplOutput::outputs [protected] |
Definition at line 98 of file AmplOutput.hpp.
std::vector<AmplOutputDataParser*> pelib::AmplOutput::parsers [protected] |
Definition at line 97 of file AmplOutput.hpp.