pelib  2.0.0
pelib::AmplOutputVector< Key, Value > Class Template Reference

#include <AmplOutputVector.hpp>

Inheritance diagram for pelib::AmplOutputVector< Key, Value >:
[legend]

List of all members.

Public Member Functions

 AmplOutputVector (bool strict=true)
virtual AmplOutputVectorclone () const
virtual std::string getDetailedPattern ()
virtual std::string getGlobalPattern ()
virtual AlgebraDataparse (std::istream &in)
virtual void dump (std::ostream &o, const AlgebraData *data) const

Protected Attributes

bool strict

Detailed Description

template<class Key, class Value>
class pelib::AmplOutputVector< Key, Value >

Parser and output class in AMPL output format for pelib algebraic Vector data structure

Definition at line 35 of file AmplOutputVector.hpp.


Constructor & Destructor Documentation

template<class Key , class Value >
pelib::AmplOutputVector< Key, Value >::AmplOutputVector ( bool  strict = true) [inline]

Constructor

Parameters:
strictIf true and parsing a floating-point values-collection, fails if any element is an integer but succeeds if integers are written with a trailing decimal 0 (e.g. 52.0)

Definition at line 44 of file AmplOutputVector.hpp.


Member Function Documentation

template<class Key , class Value >
virtual AmplOutputVector* pelib::AmplOutputVector< Key, Value >::clone ( ) const [inline, virtual]

Returns a pointer to a opy of this class instance

Implements pelib::AmplOutputDataOutput.

Definition at line 52 of file AmplOutputVector.hpp.

template<class Key , class Value >
virtual void pelib::AmplOutputVector< Key, Value >::dump ( std::ostream &  o,
const AlgebraData data 
) const [inline, virtual]

Writes an instance of pelib::Vector into an output stream in AMPL output format

Parameters:
oOutput stream
dataInstance of pelib::Vector to be written

Implements pelib::AlgebraDataOutput.

Definition at line 149 of file AmplOutputVector.hpp.

template<class Key , class Value >
virtual std::string pelib::AmplOutputVector< Key, Value >::getDetailedPattern ( ) [inline, virtual]

Uses a boost::regex regular expression to match a vector written in AMPL output format and extract its name and value

Implements pelib::AlgebraDataParser.

Definition at line 60 of file AmplOutputVector.hpp.

template<class Key , class Value >
virtual std::string pelib::AmplOutputVector< Key, Value >::getGlobalPattern ( ) [inline, virtual]

Uses a boost::regex regular expression to match a vector written in AMPL output format

Implements pelib::AlgebraDataParser.

Definition at line 68 of file AmplOutputVector.hpp.

template<class Key , class Value >
virtual AlgebraData* pelib::AmplOutputVector< Key, Value >::parse ( std::istream &  in) [inline, virtual]

Reads input stream in AMPL output format and builds an instance of pelib::Vector containing all values

Parameters:
inInput stream to read AMPL output text from
Returns:
An instance of pelib::Vector containing all values read from input

Implements pelib::AlgebraDataParser.

Definition at line 79 of file AmplOutputVector.hpp.


Member Data Documentation

template<class Key , class Value >
bool pelib::AmplOutputVector< Key, Value >::strict [protected]

Defines if parsing operations are performed in strict mode (see constructor)

Definition at line 167 of file AmplOutputVector.hpp.


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