roadrunner  2.6.0
Fast simulator for SBML models
Public Member Functions | List of all members
rrllvm::ASTNodeFactory Class Reference

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...
 

Detailed Description

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.

Member Function Documentation

◆ create() [1/3]

libsbml::ASTNode * rrllvm::ASTNodeFactory::create ( const libsbml::ASTNode &  orig)

Copy constructor; creates a deep copy of the given ASTNode.

Parameters
origthe ASTNode to be copied.

◆ create() [2/3]

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).

Parameters
typean optional type code indicating the type of node to create.

◆ create() [3/3]

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.

Parameters
tokenthe Token to add.

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