YMLEntity Class Reference

#include <ymlentity.h>

Inheritance diagram for YMLEntity:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 YMLEntity ()
virtual ~YMLEntity ()
void addProperty (const char *name, const char *value)
int getNumProperties ()
const char * getPropName (int i)
const char * getPropValue (int i)
const char * findProperty (const char *name)
virtual void setArgs (int argc, const char *const *args)
int getArgc ()
const char * getArg (int i)
void setDoc (const char *doc)
const char * getDoc ()
virtual ymlentity_t getType ()=0
virtual void dumpXML (XMLSerializer &stream)=0
virtual void dumpDOT (std::ostream &stream, int tabLevel)
virtual void finalize ()
virtual void doFinalize ()=0
void dumpXMLProperties (XMLSerializer &stream)

Static Public Member Functions

static void tabs (std::ostream &stream, int num)

Constructor & Destructor Documentation

YMLEntity::YMLEntity  ) 
 

Construct a YMLEntity.

YMLEntity::~YMLEntity  )  [virtual]
 

Destruct a YMLEntity. Frees allocated property array and arguments.


Member Function Documentation

void YMLEntity::addProperty const char *  name,
const char *  value
 

Add a YML property to this entity.

Parameters:
name The property name.
value The property value.

int YMLEntity::getNumProperties  )  [inline]
 

Returns:
The number of properties for this element.

const char* YMLEntity::getPropName int  i  )  [inline]
 

Parameters:
i The property number.
Returns:
The name of property i.

const char* YMLEntity::getPropValue int  i  )  [inline]
 

Parameters:
i The property number.
Returns:
The value of property i.

const char* YMLEntity::findProperty const char *  name  )  [inline]
 

Get the property value by name.

Parameters:
name The property name.
Returns:
The property value on success, NULL otherwise.

void YMLEntity::setArgs int  argc,
const char *const *  args
[virtual]
 

Set this enitites arguments.

Parameters:
argc The number of arugments.
args An array of arguments.

int YMLEntity::getArgc  )  [inline]
 

Returns:
The number of XML arguments for this entity.

const char* YMLEntity::getArg int  i  )  [inline]
 

Get an XML argument.

Parameters:
i The number of the argument.
Returns:
A pointer to the XML argument.

void YMLEntity::setDoc const char *  doc  )  [inline]
 

Set the documentation for this entity. The documentation is copied in to an internal buffer.

Parameters:
doc A pointer to this entities documentation.

const char* YMLEntity::getDoc  )  [inline]
 

Returns:
A pointer to this entites documentation.

virtual ymlentity_t YMLEntity::getType  )  [pure virtual]
 

Returns:
This enties type.

Implemented in YMLConnection, YMLLink, YMLNetwork, YMLNode, and YMLPort.

virtual void YMLEntity::dumpXML XMLSerializer &  stream  )  [pure virtual]
 

Dump the XML for this entity to the given stream.

Parameters:
stream The output stream.

Implemented in YMLLink, YMLNetwork, YMLNode, and YMLPort.

virtual void YMLEntity::dumpDOT std::ostream &  stream,
int  tabLevel
[inline, virtual]
 

Dump the GraphViz dot file representation of this entity. Each line of printing is prefixed by tabLevel number of tabs. The current line is assume to already be tabbed.

Parameters:
stream The output stream.
tabLevel The current tab level.

Reimplemented in YMLLink, and YMLNode.

virtual void YMLEntity::finalize  )  [inline, virtual]
 

This function is overriden to allow classes to execute code to finalize their data structure.

Reimplemented in PearlYMLNode.

virtual void YMLEntity::doFinalize  )  [pure virtual]
 

This function is called by the loader after parsing is finished. It should call finalized for itself and all its children.

Implemented in YMLLink, YMLNetwork, YMLNode, and YMLPort.

void YMLEntity::dumpXMLProperties XMLSerializer &  stream  ) 
 

Print this Entities properties as XML.

Parameters:
stream The output stream.

void YMLEntity::tabs std::ostream &  stream,
int  num
[static]
 

Print num number of tabs.

Parameters:
stream The output stream.
num The number of tabs.


The documentation for this class was generated from the following files:
Generated on Wed Apr 5 21:05:43 2006 for Sesame by  doxygen 1.4.6