pelib  2.0.0
pelib::AmplOutputScalar< Value > Class Template Reference

#include <AmplOutputScalar.hpp>

Inheritance diagram for pelib::AmplOutputScalar< Value >:
[legend]

List of all members.

Public Member Functions

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

Protected Attributes

bool strict

Detailed Description

template<class Value>
class pelib::AmplOutputScalar< Value >

Parser and output class for a pelib::Scalar in AMPL output format

Definition at line 35 of file AmplOutputScalar.hpp.


Constructor & Destructor Documentation

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

Constuctor

Parameters:
strictIf true and parsing floating point values, fails in any element parsed is an integer. An integer written as a float (e.g. 52.0) doesn't make the parser to fail.

Definition at line 42 of file AmplOutputScalar.hpp.


Member Function Documentation

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

Returns a pointer to a copy of this instance

Implements pelib::AmplOutputDataOutput.

Definition at line 50 of file AmplOutputScalar.hpp.

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

Writes the name and value of a pelib::Scalar to output stream in AMPL output format

Implements pelib::AlgebraDataOutput.

Definition at line 91 of file AmplOutputScalar.hpp.

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

Returns a boost::regex string able to match a scalar in AMPL output format and extract its name and value

Implements pelib::AlgebraDataParser.

Definition at line 58 of file AmplOutputScalar.hpp.

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

Returns a boost::regex string able to match a scalar in AMPL output format

Implements pelib::AlgebraDataParser.

Definition at line 66 of file AmplOutputScalar.hpp.

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

Reads input stream and builds an instance of pelib::Scalar containing the name and value read

Implements pelib::AlgebraDataParser.

Definition at line 74 of file AmplOutputScalar.hpp.


Member Data Documentation

template<class Value >
bool pelib::AmplOutputScalar< Value >::strict [protected]

Definition at line 106 of file AmplOutputScalar.hpp.


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