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

#include <AmplInputVector.hpp>

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

List of all members.

Public Member Functions

 AmplInputVector (bool strict=true)
virtual AmplInputVectorclone () const
virtual AlgebraDataparse (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

Detailed Description

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

Parser and Outputer of a Pelib::Vector in AMPL input format

Definition at line 39 of file AmplInputVector.hpp.


Constructor & Destructor Documentation

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

Constructor

Parameters:
strictif 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.


Member Function Documentation

template<class Key , class Value >
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.

template<class Key , class Value >
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

Parameters:
oOutput stream where is written the vector in AMPL input data format
datapelib::Vector to be written to output stream

Implements pelib::AlgebraDataOutput.

Definition at line 130 of file AmplInputVector.hpp.

template<class Key , class Value >
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.

template<class Key , class Value >
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.

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

Parses the input stream into a instance of Pelib::Vector

Parameters:
ininput stream in AMPL input data format to be parsed

Implements pelib::AlgebraDataParser.

Definition at line 66 of file AmplInputVector.hpp.


Member Data Documentation

template<class Key , class Value >
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.


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