roadrunner
2.6.0
Fast simulator for SBML models
|
Manages a set of ASTNodes. More...
#include <ASTNodeFactory.h>
Public Member Functions | |
libsbml::ASTNode * | create (libsbml::ASTNodeType_t type=libsbml::AST_UNKNOWN) |
Creates and returns a new ASTNode. More... | |
libsbml::ASTNode * | create (libsbml::Token_t *token) |
Creates a new ASTNode from the given Token. More... | |
libsbml::ASTNode * | create (const libsbml::ASTNode &orig) |
Copy constructor; creates a deep copy of the given ASTNode. More... | |
Manages a set of ASTNodes.
This class provides a createASTNode which creates a new ASTNode, but it retains a reference to it. When this class is destroyed, all the nodes that it created are destroyed as well.
TODO: There might be a standard way of doing this, look it up and replace if there exists such a thing.
libsbml::ASTNode * rrllvm::ASTNodeFactory::create | ( | const libsbml::ASTNode & | orig | ) |
Copy constructor; creates a deep copy of the given ASTNode.
orig | the ASTNode to be copied. |
libsbml::ASTNode * rrllvm::ASTNodeFactory::create | ( | libsbml::ASTNodeType_t | type = libsbml::AST_UNKNOWN | ) |
Creates and returns a new ASTNode.
Unless the argument type
is given, the returned node will by default have a type of AST_UNKNOWN. If the type isn't supplied when caling this constructor, the caller should set the node type to something else as soon as possible using ASTNode::setType(int).
type | an optional type code indicating the type of node to create. |
libsbml::ASTNode * rrllvm::ASTNodeFactory::create | ( | libsbml::Token_t * | token | ) |
Creates a new ASTNode from the given Token.
The resulting ASTNode will contain the same data as the Token.
token | the Token to add. |