SymbolForest

class SymbolForest

Similar to a symbol table, except instead of a name / value, we have a name / tree, where the tree is the root of an ASTNode tree.

The rationality behind this will be covered in the paper, but briefly its required because we are dealing with a declarative language in which the rules can be defined in any order.

This class does not own anything, it just has const pointers to a set of ASTNodes which are owned either by the sbml model, or some containing class.

This class basically stores the name / value of all the re-write rules (assigment or initial assigment).

Public Types

typedef std::map<std::string, const libsbml::ASTNode*> Map
typedef std::map<std::string, const libsbml::ASTNode*>::const_iterator _const_iterator

Public Functions

inline const ConstIterator find(const std::map<std::string, const libsbml::ASTNode*>::key_type &x) const

find and end are designed to work identically to the std::map::find.

Note that the resulting iterator is not iteratable, it is only suitable for comparing with end() and getting the value out of it.

inline const ConstIterator &end() const

Public Members

std::map<std::string, const libsbml::ASTNode*> floatingSpecies
std::map<std::string, const libsbml::ASTNode*> boundarySpecies
std::map<std::string, const libsbml::ASTNode*> compartments
std::map<std::string, const libsbml::ASTNode*> globalParameters
std::map<std::string, const libsbml::ASTNode*> speciesReferences

Private Members

ConstIterator _end
class ConstIterator

syntatically the same as a std::map<std::string, const libsbml::ASTNode*>::const_iterator

Designed so that the SymbolForest can behave like a std::map.

Public Functions

inline const ConstIterator *operator->() const
inline bool operator!=(const ConstIterator &other) const
inline ConstIterator &operator=(const ConstIterator &o)
inline ConstIterator(const ConstIterator &o)

Public Members

const libsbml::ASTNode *second

Private Functions

inline ConstIterator(_const_iterator i)

not end, created from a valid iterator.

inline ConstIterator()

the end

Private Members

bool end

Friends

friend class SymbolForest