class TcGfxComponent

Abstract Base Class TcGfxComponent

Inheritance:


Public Classes

enum LoadType
LoadType enumeration
enum LoadState
LoadState enumeration

Public Methods

virtual int addChild(TcGfxComponent *gfxNode)
Add a child to this component.
virtual int removeChild(TcGfxComponent *gfxNode)
Remove a child from this component.
virtual void loadGeometry(const LoadType &ldType = ASYNC)
Loads the geometry
virtual void unLoadGeometry()
Unload the geometry.
virtual void hideGeometry()
Hide the geometry.
virtual void unHideGeometry()
Unhide the geometry.
virtual void toggleLoadGeometry()
Toggles load/unload geometry depending on the current state.
virtual void toggleHideGeometry()
Toggled hide/unhide geometry depending on the current state.
virtual void accept(TcGfxVisitor &)
This is a visitor design pattern method.
virtual const TcGfxComponent* getCompByName(const TcUtString &)
Searches for a given component in the tree rooted by this node.
virtual void triggerEvent(const TcUtString &eventName)
Triggers the event with the given name associated with this component.
virtual TcActionEvent* getEvent(const TcUtString &eventName)
Returns the event with the given name associated with this component.
virtual TcActionEvent* getIterativeEvent(const TcUtString &eventName)
Returns the iterative event with the given name associated with this component.
virtual void handleIterativeEvents()
Iterates through the list of iterative events and triggers each one.
const TcUtString& getCompName()
Returns the name of this component.
void addEvent(TcActionEvent *)
Associate and event with this component.
void removeEvent(TcActionEvent *)
Removes an event from this component.
void addIterativeEvent(TcActionEvent *)
Associates an iterative event to this component.
void removeIterativeEvent(TcActionEvent *)
Removes an iterative event from this component.
void addUserComponent(const TcUtString &name, TcUserComponent *component)
Add a user component with the given name to the UserClass table
TcUserComponent* getUserComponent(const TcUtString &name)
Return the component with the given name and NULL if it is not found.
void removeUserComponent(const TcUtString &)
remove from table but doesn't delete component
const vector <TcActionEvent *> * getEventList()
Returns a pointer to the entire list of events associated with this component.
TcUtString getGeoFileName()
Returns the file name of the geometry associated with this component.
void setGeoLoaded(bool)
Sets the geometry loaded flag.
void setGeoHidden(bool)
Sets the geometry hidded flag.
void setCompName(const TcUtString &name)
Sets the component name.
bool geoLoaded()
Returns true if the geometry is loaded.
bool geoHidden()
Returns true of the geometry is hidden.
TcGfxComponent* getParent()
Returns the parent of this component.
void setParent(TcGfxComponent *)
Sets the parent of this component.
void setDspLibComponent(TcGfxDspLibComponent *)
Sets the display library component.
TcGfxDspLibComponent* getDspLibComponent() const
Returns the display library component.

Protected Fields

TcUtString geometryFileName
Attribute: geometryFileName Description: This attribute stores the file location of the corresponding geometry file

Documentation

Abstract Base Class TcGfxComponent.

This is the root class for all Tandem Graphics Components.

Role: This abstract base class forms the composite pattern by letting clients treat TcGfxObjects and TcGfxGroups uniformly.

Reponsibilities: It provides an interface to TcGfxObjects and TcGfxGroups

enum LoadType
LoadType enumeration
Parameters:
ASYNC - Asynchronous load type
SYNC - Synchronous load type

enum LoadState
LoadState enumeration
Parameters:
LOADED - Loads the component during instantation if the LoadType is set to SYNC otherwise it is ignored.
UNLOADED - The component is not loaded. Can be used in combination with SYNC or ASYNC

virtual int addChild(TcGfxComponent *gfxNode)
Add a child to this component.

virtual int removeChild(TcGfxComponent *gfxNode)
Remove a child from this component.

virtual void loadGeometry(const LoadType &ldType = ASYNC)
Loads the geometry
Parameters:
ldType - Determines whether the load will be asynchronous or synchronous.

virtual void unLoadGeometry()
Unload the geometry.

virtual void hideGeometry()
Hide the geometry.

virtual void unHideGeometry()
Unhide the geometry.

virtual void toggleLoadGeometry()
Toggles load/unload geometry depending on the current state.

virtual void toggleHideGeometry()
Toggled hide/unhide geometry depending on the current state.

virtual void accept(TcGfxVisitor &)
This is a visitor design pattern method.

virtual const TcGfxComponent* getCompByName(const TcUtString &)
Searches for a given component in the tree rooted by this node.

virtual void triggerEvent(const TcUtString &eventName)
Triggers the event with the given name associated with this component.

virtual TcActionEvent* getEvent(const TcUtString &eventName)
Returns the event with the given name associated with this component.

virtual TcActionEvent* getIterativeEvent(const TcUtString &eventName)
Returns the iterative event with the given name associated with this component.

virtual void handleIterativeEvents()
Iterates through the list of iterative events and triggers each one.

const TcUtString& getCompName()
Returns the name of this component.

void addEvent(TcActionEvent *)
Associate and event with this component.

void removeEvent(TcActionEvent *)
Removes an event from this component.

void addIterativeEvent(TcActionEvent *)
Associates an iterative event to this component.

void removeIterativeEvent(TcActionEvent *)
Removes an iterative event from this component.

void addUserComponent(const TcUtString &name, TcUserComponent *component)
Add a user component with the given name to the UserClass table. This is one way clients can add additional features/attributes to a component without subclassing. It is especially useful for adding application specific properties and behavior. WARNING - Because it uses SGIs STL hash_map the name _must_ be a preallocated and exist for the lifespace of the user component. The preferred way of dealing with this is to store the name in the component class and use a component->getName() method as argument to name.

TcUserComponent* getUserComponent(const TcUtString &name)
Return the component with the given name and NULL if it is not found.

void removeUserComponent(const TcUtString &)
remove from table but doesn't delete component

const vector <TcActionEvent *> * getEventList()
Returns a pointer to the entire list of events associated with this component.

TcUtString getGeoFileName()
Returns the file name of the geometry associated with this component.

void setGeoLoaded(bool)
Sets the geometry loaded flag.

void setGeoHidden(bool)
Sets the geometry hidded flag.

void setCompName(const TcUtString &name)
Sets the component name.

bool geoLoaded()
Returns true if the geometry is loaded.

bool geoHidden()
Returns true of the geometry is hidden.

TcGfxComponent* getParent()
Returns the parent of this component.

void setParent(TcGfxComponent *)
Sets the parent of this component.

void setDspLibComponent(TcGfxDspLibComponent *)
Sets the display library component.

TcGfxDspLibComponent* getDspLibComponent() const
Returns the display library component.

TcUtString geometryFileName
Attribute: geometryFileName Description: This attribute stores the file location of the corresponding geometry file. For instance it could be a performer binary (.pfb) or an inventor file (.iv)


Direct child classes:
TcGfxObject
TcGfxGroup

alphabetic index hierarchy of classes


this page has been generated automatically by doc++

(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de