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

#include <AmplOutputSet.hpp>

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

List of all members.

Public Member Functions

 AmplOutputSet (bool strict=true)
virtual AmplOutputSetclone () 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 Value, class Key = size_t>
class pelib::AmplOutputSet< Value, Key >

Definition at line 35 of file AmplOutputSet.hpp.


Constructor & Destructor Documentation

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

Constructor

Parameters:
strictIf elements in Set are floating-point numeric values and strict is true, then parser fails if any element parsed is written as an integer. A trailing .0 (e.g. 52.0) can force an integer to be parsed as floating-point without failure.

Definition at line 44 of file AmplOutputSet.hpp.


Member Function Documentation

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

Returns a pointer to a copy of this class instance

Implements pelib::AmplOutputDataOutput.

Definition at line 52 of file AmplOutputSet.hpp.

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

Write the content of an instance of pelib::Set into output stream in AMPL output format

Parameters:
oOutput stream where the set is written to in AMPL output format
dataInstance of pelib::Set to write to output stream

Implements pelib::AlgebraDataOutput.

Definition at line 153 of file AmplOutputSet.hpp.

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

Returns a boost::regex regular expression able to match a AMPL output format Set and extract its elements

Implements pelib::AlgebraDataParser.

Definition at line 60 of file AmplOutputSet.hpp.

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

Returns a boost::regex regular expression able to match a AMPL output format Set

Implements pelib::AlgebraDataParser.

Definition at line 68 of file AmplOutputSet.hpp.

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

Parses input stream in AMPL output format and builds an instance of pelib::Set from the data extracted

Parameters:
ininput stream to read data from

Implements pelib::AlgebraDataParser.

Definition at line 78 of file AmplOutputSet.hpp.


Member Data Documentation

template<class Value , class Key = size_t>
bool pelib::AmplOutputSet< Value, Key >::strict [protected]

Defines if parsing operation happens in strict mode or not

Definition at line 181 of file AmplOutputSet.hpp.


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