Public Member Functions | Public Attributes | Private Attributes

SyntaxNodeIDREF Class Reference

A node on the tree representing a reference to a ModelComp. More...

#include <nodes.h>

Inheritance diagram for SyntaxNodeIDREF:
SyntaxNode

List of all members.

Public Member Functions

 SyntaxNodeIDREF (ModelComp *r=NULL, SyntaxNode *val1=NULL)
 Default constructor.
 SyntaxNodeIDREF (int opCode, ModelComp *r)
 Constructor.
SyntaxNodeIDREFclone ()
 Creates a shallow copy: points to the same components as the original.
SyntaxNodeIDREFdeep_copy ()
 Creates a copy using all new datastructures (does not duplicate ref).
std::ostream & put (std::ostream &s) const
int getStochParent () const
 Retrieve the level of the parent stage.
void setStochParent (int parent)
 Set the level of the parent stage.
ModelCompgetModelComp () const

Public Attributes

ModelCompref
 Pointer to the ModelComp referred to by this node.

Private Attributes

int stochparent
 Levels above this one for which the reference is.

Detailed Description

A node on the tree representing a reference to a ModelComp.

IDREF is a SyntaxNode that represents a reference to a ModelComponent.


Constructor & Destructor Documentation

SyntaxNodeIDREF::SyntaxNodeIDREF ( ModelComp r = NULL,
SyntaxNode val1 = NULL 
)

Default constructor.

Referenced by clone(), and deep_copy().

SyntaxNodeIDREF::SyntaxNodeIDREF ( int  opCode,
ModelComp r 
)

Constructor.

References IDREF, IDREFM, and SyntaxNode::opCode.


Member Function Documentation

SyntaxNodeIDREF * SyntaxNodeIDREF::clone (  )  [virtual]

Creates a shallow copy: points to the same components as the original.

Reimplemented from SyntaxNode.

References SyntaxNode::opCode, ref, stochparent, SyntaxNodeIDREF(), and SyntaxNode::values.

Referenced by write_ampl_for_submodel_().

SyntaxNodeIDREF * SyntaxNodeIDREF::deep_copy (  )  [virtual]

Creates a copy using all new datastructures (does not duplicate ref).

Reimplemented from SyntaxNode.

References SyntaxNode::nchild(), SyntaxNode::opCode, ref, stochparent, SyntaxNodeIDREF(), and SyntaxNode::values.

ModelComp* SyntaxNodeIDREF::getModelComp (  )  const [inline]

References ref.

Referenced by process_model(), and write_ampl_for_submodel_().

int SyntaxNodeIDREF::getStochParent (  )  const [inline]

Retrieve the level of the parent stage.

References stochparent.

Referenced by StochModelComp::transcribeToModelComp().

ostream & SyntaxNodeIDREF::put ( std::ostream &  s  )  const [virtual]
void SyntaxNodeIDREF::setStochParent ( int  parent  )  [inline]

Set the level of the parent stage.

References stochparent.

Referenced by find_var_ref_in_context().


Member Data Documentation

Levels above this one for which the reference is.

This field is only meaningful if the node represents a component in a stochastic program. In that case stochparent gives the recourse level of the component. This is the first argument in expressions such as xh(-1,i) which refers to xh[i] in the parent stage.

Referenced by clone(), deep_copy(), getStochParent(), and setStochParent().


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