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

NameSpace Class Reference

Class for storing names and attributes for the names. More...

#include <namespace.h>


Public Types

typedef map< const string,
string > 
Attributes
 Maps attributes to values.

typedef map< const string,
Attributes
NameAttributesMap
 Maps names to attributes.


Public Member Functions

 NameSpace ()
 Constructor.

 NameSpace (NameSpace *isuperNameSpace)
 Constructor.

void ruleRunTimeStep ()
 Incresases the ruleRunTime by one.

int getRuleRunTime () const
 Returns the ruleRunTime.

void setRuleRunTime (int iruleRunTime)
 Sets the ruleRunTime.

bool isAttributeSet (const string &name, const string &attribute, const bool global) const
 Checks if given attribute is set.

bool isAttributeEqual (const string &name, const string &attribute, const string &value, const bool global) const
 Checks if givan attribute is equal to a given value.

string getAttributeValue (const string &name, const string &attribute, const bool global) const
 Return the value of the attribute.

void setAttribute (const string &name, const string &attribute, const bool global)
 Sets the attribute.

void setAttributeValue (const string &name, const string &attribute, const string &value, const bool global)
 Sets the value of the attribute.

void processArguments (const Node *arguments)
 Processes arguments -- called by NamedContextRule -- now empty no assumptions made on arguments.

void importLocals (const string &name, const NameSpace &nameSpace)
 Imports attributes for an empty name from nameSpace as an attributes for a given name.


Private Attributes

NameSpacesuperNameSpace
 A super name space.

NameAttributesMap info
 A map of names and attributes.

int ruleRunTime
 Stores the rule run time.


Detailed Description

Class for storing names and attributes for the names.

Definition at line 11 of file namespace.h.


Member Typedef Documentation

typedef map<const string, string> NameSpace::Attributes
 

Maps attributes to values.

Definition at line 14 of file namespace.h.

typedef map<const string, Attributes> NameSpace::NameAttributesMap
 

Maps names to attributes.

Definition at line 16 of file namespace.h.


Constructor & Destructor Documentation

NameSpace::NameSpace  ) 
 

Constructor.

Definition at line 4 of file namespace.cpp.

NameSpace::NameSpace NameSpace isuperNameSpace  ) 
 

Constructor.

Definition at line 5 of file namespace.cpp.


Member Function Documentation

string NameSpace::getAttributeValue const string &  name,
const string &  attribute,
const bool  global
const
 

Return the value of the attribute.

Definition at line 47 of file namespace.cpp.

References info, and superNameSpace.

Referenced by AttributeValue::evaluate(), and isAttributeEqual().

int NameSpace::getRuleRunTime  )  const
 

Returns the ruleRunTime.

Definition at line 11 of file namespace.cpp.

References ruleRunTime, and superNameSpace.

Referenced by NamedContextRule::runRules().

void NameSpace::importLocals const string &  name,
const NameSpace nameSpace
 

Imports attributes for an empty name from nameSpace as an attributes for a given name.

Definition at line 80 of file namespace.cpp.

References info.

Referenced by RuleSystem::execute(), and NamedContextRule::execute().

bool NameSpace::isAttributeEqual const string &  name,
const string &  attribute,
const string &  value,
const bool  global
const
 

Checks if givan attribute is equal to a given value.

Definition at line 43 of file namespace.cpp.

References getAttributeValue().

Referenced by LocalAttributeIsequalTester::test(), and AttributeIsequalTester::test().

bool NameSpace::isAttributeSet const string &  name,
const string &  attribute,
const bool  global
const
 

Checks if given attribute is set.

Definition at line 31 of file namespace.cpp.

References info, and superNameSpace.

Referenced by LocalAttributeIssetTester::test(), and AttributeIssetTester::test().

void NameSpace::processArguments const Node arguments  ) 
 

Processes arguments -- called by NamedContextRule -- now empty no assumptions made on arguments.

Definition at line 76 of file namespace.cpp.

Referenced by NamedContextRule::execute().

void NameSpace::ruleRunTimeStep  ) 
 

Incresases the ruleRunTime by one.

Definition at line 7 of file namespace.cpp.

References ruleRunTime.

void NameSpace::setAttribute const string &  name,
const string &  attribute,
const bool  global
 

Sets the attribute.

Definition at line 72 of file namespace.cpp.

References ATTRIBUTETRUE, and setAttributeValue().

void NameSpace::setAttributeValue const string &  name,
const string &  attribute,
const string &  value,
const bool  global
 

Sets the value of the attribute.

Definition at line 63 of file namespace.cpp.

References info, and superNameSpace.

Referenced by ActionSet::execute(), and setAttribute().

void NameSpace::setRuleRunTime int  iruleRunTime  ) 
 

Sets the ruleRunTime.

Definition at line 18 of file namespace.cpp.

References ruleRunTime.

Referenced by RuleSystem::stepTime().


Field Documentation

NameAttributesMap NameSpace::info [private]
 

A map of names and attributes.

Definition at line 22 of file namespace.h.

Referenced by getAttributeValue(), importLocals(), isAttributeSet(), and setAttributeValue().

int NameSpace::ruleRunTime [private]
 

Stores the rule run time.

Definition at line 24 of file namespace.h.

Referenced by getRuleRunTime(), ruleRunTimeStep(), and setRuleRunTime().

NameSpace* NameSpace::superNameSpace [private]
 

A super name space.

Definition at line 20 of file namespace.h.

Referenced by getAttributeValue(), getRuleRunTime(), isAttributeSet(), and setAttributeValue().


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