Main Page | Class Hierarchy | Alphabetical List | Data Structures | File List | Data Fields | Globals

AttributeValue Class Reference

Returns the value of the given attribute. More...

#include <ctree.h>

Inheritance diagram for AttributeValue:

Node

Public Member Functions

 AttributeValue (Node *ivariable, Node *iattribute, bool iglobal)
 Constructor.

virtual ~AttributeValue ()
 Destructor.

virtual SType getType () const
 Returns type of the node.

virtual string getName () const
 Returs string representing node type or name for List.

virtual ostream & print (ostream &os) const
 Writes node to the stream.

virtual ostream & php (ostream &os) const
 Writes node to the stream as php.

virtual bool match (const Node *p, Assignment &assign, const NameSpace &nameSpace) const
 Matches node p to the node. If node matches sets the assignment.

virtual bool matchToBegining (const List *p, Assignment &assign, const NameSpace &nameSpace) const
 Matches the list to the begining of p.

virtual bool compare (const Node *p) const
 Comares node p to the node.

virtual Nodecopy () const
 Copies the node.

virtual void getVariables (VariableList &vlist) const
 Returns list of variables used in the node.

virtual string evaluate (const NameSpace &nameSpace) const
 Computes the value of the expression (only basic atihmetic and string operations).


Protected Member Functions

virtual Nodesubstitute (const Assignment &assign)
 Substitutes variables in the node accordingly to the given assignment.


Protected Attributes

Nodevariable
 The name.

Nodeattribute
 The attribute conected with the name.

const bool global
 Is the name global.


Detailed Description

Returns the value of the given attribute.

Defines a class of node, that can return the value of the given attribute of he given name. Used in ActionRule. These nodes try to be invisible to all functions.

Definition at line 95 of file ctree.h.


Constructor & Destructor Documentation

AttributeValue::AttributeValue Node ivariable,
Node iattribute,
bool  iglobal
[inline]
 

Constructor.

Definition at line 106 of file ctree.h.

References attribute, global, and variable.

Referenced by copy().

virtual AttributeValue::~AttributeValue  )  [inline, virtual]
 

Destructor.

Definition at line 109 of file ctree.h.

References attribute, and variable.


Member Function Documentation

virtual bool AttributeValue::compare const Node p  )  const [inline, virtual]
 

Comares node p to the node.

Implements Node.

Definition at line 138 of file ctree.h.

virtual Node* AttributeValue::copy  )  const [inline, virtual]
 

Copies the node.

Implements Node.

Definition at line 142 of file ctree.h.

References attribute, AttributeValue(), Node::copy(), global, and variable.

virtual string AttributeValue::evaluate const NameSpace nameSpace  )  const [inline, virtual]
 

Computes the value of the expression (only basic atihmetic and string operations).

Implements Node.

Definition at line 150 of file ctree.h.

References attribute, NameSpace::getAttributeValue(), global, Node::toString(), and variable.

virtual string AttributeValue::getName  )  const [inline, virtual]
 

Returs string representing node type or name for List.

Implements Node.

Definition at line 116 of file ctree.h.

virtual SType AttributeValue::getType  )  const [inline, virtual]
 

Returns type of the node.

Implements Node.

Definition at line 114 of file ctree.h.

References SType.

virtual void AttributeValue::getVariables VariableList vlist  )  const [inline, virtual]
 

Returns list of variables used in the node.

Implements Node.

Definition at line 146 of file ctree.h.

virtual bool AttributeValue::match const Node p,
Assignment &  assign,
const NameSpace nameSpace
const [inline, virtual]
 

Matches node p to the node. If node matches sets the assignment.

Implements Node.

Definition at line 130 of file ctree.h.

virtual bool AttributeValue::matchToBegining const List p,
Assignment &  assign,
const NameSpace nameSpace
const [inline, virtual]
 

Matches the list to the begining of p.

Implements Node.

Definition at line 134 of file ctree.h.

virtual ostream& AttributeValue::php ostream &  os  )  const [inline, virtual]
 

Writes node to the stream as php.

Implements Node.

Definition at line 126 of file ctree.h.

virtual ostream& AttributeValue::print ostream &  os  )  const [inline, virtual]
 

Writes node to the stream.

Implements Node.

Definition at line 118 of file ctree.h.

References attribute, Node::print(), and variable.

virtual Node* AttributeValue::substitute const Assignment &  assign  )  [inline, protected, virtual]
 

Substitutes variables in the node accordingly to the given assignment.

Implements Node.

Definition at line 156 of file ctree.h.

References attribute, Node::substituteNode, and variable.


Field Documentation

Node* AttributeValue::attribute [protected]
 

The attribute conected with the name.

Definition at line 101 of file ctree.h.

Referenced by AttributeValue(), copy(), evaluate(), print(), substitute(), and ~AttributeValue().

const bool AttributeValue::global [protected]
 

Is the name global.

Definition at line 103 of file ctree.h.

Referenced by AttributeValue(), copy(), and evaluate().

Node* AttributeValue::variable [protected]
 

The name.

Definition at line 99 of file ctree.h.

Referenced by AttributeValue(), copy(), evaluate(), print(), substitute(), and ~AttributeValue().


The documentation for this class was generated from the following file:
Generated on Fri Nov 21 17:54:06 2003 for PHPX by doxygen 1.3.3