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

#include <AmplInputScalar.hpp>

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

List of all members.

Public Member Functions

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

Protected Attributes

bool strict

Detailed Description

template<class Value>
class pelib::AmplInputScalar< Value >

Base class for a parser or output class of a scalar in AMPL input data format

Definition at line 36 of file AmplInputScalar.hpp.


Constructor & Destructor Documentation

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

Constructor

Parameters:
strictIf true and parsing floating point values, fails when reading any integer value if not written with a trailing decimal 0, e.g. 52.0

Definition at line 43 of file AmplInputScalar.hpp.


Member Function Documentation

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

Return a pointer to a copy of this class instance

Implements pelib::AmplInputDataOutput.

Definition at line 51 of file AmplInputScalar.hpp.

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

Writes an instance of class that derives from pelib::AlgebraData to output stream

Parameters:
streamOutput stream that receives the written output of AlgebraData
dataInstance of a class derived from AlgebraData to write to output stream

Implements pelib::AlgebraDataOutput.

Definition at line 93 of file AmplInputScalar.hpp.

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

Matches a data structure written in AMPL input data format and extract its name and content

Implements pelib::AlgebraDataParser.

Definition at line 110 of file AmplInputScalar.hpp.

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

Matches a data structure written in AMPL input data format

Implements pelib::AlgebraDataParser.

Definition at line 118 of file AmplInputScalar.hpp.

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

Parse input stream in AMPL input format and builds an instance of a derivative class of pelib::AlgebraData containing the values read

Implements pelib::AlgebraDataParser.

Definition at line 59 of file AmplInputScalar.hpp.


Member Data Documentation

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

Defines if parsing should be performed in strict mode

Definition at line 125 of file AmplInputScalar.hpp.


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