pelib  2.0.0
pelib::Algebra Class Reference

#include <Algebra.hpp>

Inheritance diagram for pelib::Algebra:
[legend]

List of all members.

Public Member Functions

 Algebra ()
 Algebra (const std::map< std::string, const AlgebraData *const > &elements)
 Algebra (const Algebra &rhs)
 Algebra (const Algebra *rhs)
virtual ~Algebra ()
const std::map< std::string,
const AlgebraData *const > & 
getAllRecords () const
virtual Algebra merge (const Algebra &) const
template<class T >
std::map< std::string, const T
*const > 
getRecords () const
template<class T >
const T *const find (std::string key) const
Algebra filter (const std::set< std::string > &list) const
void insert (const Data *data)
virtual void insert (const pelib::AlgebraData *data)
virtual void remove (const std::string name)
virtual Algebraoperator= (const Algebra &rhs)
virtual Algebraclone () const

Protected Member Functions

void deleteRecords ()

Protected Attributes

std::map< std::string, const
AlgebraData *const > 
records

Detailed Description

Container of AMPL data structures such as Scalars, Vectors, Matrices and Sets.

Definition at line 42 of file Algebra.hpp.


Constructor & Destructor Documentation

Creates an empty AMPL data container

Definition at line 39 of file Algebra.cpp.

pelib::Algebra::Algebra ( const std::map< std::string, const AlgebraData *const > &  elements)

Creates a AMPL data container from Algebra elements found in the map collect given as argument. Note that the string element in each pair element in the collection must match the name of the corresponding AlgebraData data structure.

pelib::Algebra::Algebra ( const Algebra rhs)

Copy constructor

Definition at line 51 of file Algebra.cpp.

pelib::Algebra::Algebra ( const Algebra rhs)

Definition at line 56 of file Algebra.cpp.

pelib::Algebra::~Algebra ( ) [virtual]

Destroys all elements in the collection and destroys the collection itself

Definition at line 46 of file Algebra.cpp.


Member Function Documentation

Algebra * pelib::Algebra::clone ( ) const [virtual]

Implements pelib::Record.

Definition at line 62 of file Algebra.cpp.

Flushes all elements in this collection

Definition at line 149 of file Algebra.cpp.

Algebra pelib::Algebra::filter ( const std::set< std::string > &  list) const

Removes all records whose name does not appear in the list

Definition at line 161 of file Algebra.cpp.

template<class T >
const T* const pelib::Algebra::find ( std::string  key) const [inline]

Returns the element of type T whose name matches the key argument

Definition at line 99 of file Algebra.hpp.

const map< string, const AlgebraData *const > & pelib::Algebra::getAllRecords ( ) const

Returns all elements of any type contained in this collection instance

Definition at line 90 of file Algebra.cpp.

template<class T >
std::map<std::string, const T* const> pelib::Algebra::getRecords ( ) const [inline]

Returns all elements in the collection that match type T

Definition at line 70 of file Algebra.hpp.

void pelib::Algebra::insert ( const Data data) [inline]

Does nothing at all

Definition at line 128 of file Algebra.hpp.

void pelib::Algebra::insert ( const pelib::AlgebraData data) [virtual]

Copies and insert a AlgebraData element in the collection

Definition at line 96 of file Algebra.cpp.

Algebra pelib::Algebra::merge ( const Algebra record) const [virtual]

Builds a new collection from all elements in this collection and in the collection given as argument

Definition at line 68 of file Algebra.cpp.

Algebra & pelib::Algebra::operator= ( const Algebra rhs) [virtual]

Flushes all elements in this collection, performs a copy of all elements found in the collection given as argument and place the copies in this collection

Definition at line 129 of file Algebra.cpp.

void pelib::Algebra::remove ( const std::string  name) [virtual]

Finds and remove a AlgebraData element from this collection, based on its name

Definition at line 117 of file Algebra.cpp.


Member Data Documentation

Map container of all elements in the collection

Definition at line 146 of file Algebra.hpp.


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