Particle Universe  1.2
ParticleUniverse::Context Class Reference

#include <ParticleUniverseContext.h>

Public Member Functions

 Context (void)
 
virtual ~Context (void)
 
void beginSection (const String &sectionName, IElement *element=0, const String &elementName=BLANK_STRING)
 
void endSection (void)
 
const StringgetCurrentSectionName (void)
 
const StringgetPreviousSectionName (void)
 
const StringgetParentSectionName (void)
 
IElementgetCurrentSectionElement (void)
 
IElementgetPreviousSectionElement (void)
 
IElementgetParentSectionElement (void)
 
const StringgetCurrentSectionElementName (void)
 
const StringgetPreviousSectionElementName (void)
 
const StringgetParentSectionElementName (void)
 
IElementgetSectionElement (const String &sName)
 
void validateCurrentSectionName (const String &sectionName, const String &calledFromFunction=BLANK_STRING)
 

Public Attributes

IToken * attributeToken
 

Protected Types

typedef vector< Section * > ContextStack
 

Protected Member Functions

Section_getCurrentSection (void)
 
Section_getParentSection (void)
 

Protected Attributes

ContextStack mContextStack
 
Section mPreviousProcessedSection
 

Detailed Description

The Context class is used to manage the sections of a particle universe script.

Remarks
Each script consists of sections, levels with sublevels and subsublevels, etc. The Context keeps track of each section and during parsing it is clear to which section the script parses is pointing. The Context is used to store crucial data of each section.

Note, that Context is not used for parsing scripts anymore, but it is still used in writing scripts.

Member Typedef Documentation

Constructor & Destructor Documentation

ParticleUniverse::Context::Context ( void  )
inline
virtual ParticleUniverse::Context::~Context ( void  )
inlinevirtual

Member Function Documentation

Section* ParticleUniverse::Context::_getCurrentSection ( void  )
inlineprotected
Section* ParticleUniverse::Context::_getParentSection ( void  )
inlineprotected
void ParticleUniverse::Context::beginSection ( const String sectionName,
IElement element = 0,
const String elementName = BLANK_STRING 
)
inline
void ParticleUniverse::Context::endSection ( void  )
inline
IElement* ParticleUniverse::Context::getCurrentSectionElement ( void  )
inline
const String& ParticleUniverse::Context::getCurrentSectionElementName ( void  )
inline
const String& ParticleUniverse::Context::getCurrentSectionName ( void  )
inline
IElement* ParticleUniverse::Context::getParentSectionElement ( void  )
inline
const String& ParticleUniverse::Context::getParentSectionElementName ( void  )
inline
const String& ParticleUniverse::Context::getParentSectionName ( void  )
inline
IElement* ParticleUniverse::Context::getPreviousSectionElement ( void  )
inline
const String& ParticleUniverse::Context::getPreviousSectionElementName ( void  )
inline
const String& ParticleUniverse::Context::getPreviousSectionName ( void  )
inline
IElement* ParticleUniverse::Context::getSectionElement ( const String sName)
inline
void ParticleUniverse::Context::validateCurrentSectionName ( const String sectionName,
const String calledFromFunction = BLANK_STRING 
)
inline

Member Data Documentation

IToken* ParticleUniverse::Context::attributeToken

attributeToken is needed to temporary set the last attribute value of the parsed script.

ContextStack ParticleUniverse::Context::mContextStack
protected
Section ParticleUniverse::Context::mPreviousProcessedSection
protected

This is the last processed section, which is still available for a 'higher' section


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