CPPGPGPU Library - Reference (Doxygen)

Main Page | General Use | Reference | Examples Info | Get/Download CPPGPGPU | SF.net Page

NodeObject Class Reference

Base Class for All Nodes. More...

#include <Node.h>

Inheritance diagram for NodeObject:

ModelNode RFBufferNode ShaderNode SquareNode TextNode TextureNode TextureSetNode TransformNode

List of all members.

Public Member Functions

 NodeObject (const string &sName)
virtual ~NodeObject ()
virtual string GetType ()
 Get the type of this object. (Overridden by CLASS_RTTI).
virtual bool IsTypeOf (const string &sType)
 Figure out if this is a type of sType Object. (Overridden by CLASS_RTTI).
void SetName (const string &sName)
 Get the name of the object.
string GetName ()
 Set the name of the object.
Node AttachChild (Node n)
 Attach Node n as a child to "this" object.
void DetachChild (Node n)
 Detach a specific node from "this" object.
int GetCount ()
 Find out how many references (Node's) to this object exist.
void DestroySelfOnUpdate ()
 Tell object to delete itself next time it is safe to do so.
virtual void Init ()
 Initialize object.
virtual void Render ()
 Render object.
virtual void Update (const float fDtime)
 Update object.
virtual void Message (int iMessageID, const string &sMessageName, const string &sMessagePayload)
 Receive message from object.
virtual void Disestablish ()
 Dis-establish object, this should be the oppisite of Init if necessiary.
virtual void Reload ()
 Call Disestablish and then Init.
void Lock ()
 If synchronization is turned on, this will lock the object.
void Unlock ()
 If synchronization is turned on, this will unlock the object.

Private Member Functions

void DecCount ()
 A node, pointing to this unhooked us.
void IncCount ()
 A node, pointing to this hooked us.
void AttachParent (NodeObject *n)
 Connect this as a parent's child.
void DetachParent (NodeObject *n)
 Disconnect this as a parent's child.

Private Attributes

void * m_vMutex
 Synchronization Mutex.
string m_sName
 Name of Object.
vector< NodeObject * > m_vnParents
 List of Parents.
vector< Nodem_vnChildren
 List of Children.
int m_iCount
 Total references to "this".
bool m_bDestroyOnUpdate
 If set, object will destroy itself after next update.

Friends

class Node


Detailed Description

Base Class for All Nodes.

When programming a node for yourself, you should abstract from this, since the Node Manager will only deal with that type of object. Additionally, you should not copy these, you should always be dealing with Node's, not NodeObject's.

Definition at line 70 of file Node.h.


Constructor & Destructor Documentation

NodeObject::NodeObject ( const string sName  ) 

NODE BASE

Definition at line 78 of file Node.cpp.

NodeObject::~NodeObject (  )  [virtual]

Definition at line 101 of file Node.cpp.


Member Function Documentation

virtual string NodeObject::GetType (  )  [inline, virtual]

Get the type of this object. (Overridden by CLASS_RTTI).

Definition at line 77 of file Node.h.

virtual bool NodeObject::IsTypeOf ( const string sType  )  [inline, virtual]

Figure out if this is a type of sType Object. (Overridden by CLASS_RTTI).

Definition at line 80 of file Node.h.

void NodeObject::SetName ( const string sName  ) 

Get the name of the object.

Definition at line 114 of file Node.cpp.

string NodeObject::GetName (  )  [inline]

Set the name of the object.

Definition at line 86 of file Node.h.

Node NodeObject::AttachChild ( Node  n  ) 

Attach Node n as a child to "this" object.

Definition at line 121 of file Node.cpp.

void NodeObject::DetachChild ( Node  n  ) 

Detach a specific node from "this" object.

Definition at line 128 of file Node.cpp.

int NodeObject::GetCount (  )  [inline]

Find out how many references (Node's) to this object exist.

Definition at line 95 of file Node.h.

void NodeObject::DestroySelfOnUpdate (  )  [inline]

Tell object to delete itself next time it is safe to do so.

Definition at line 98 of file Node.h.

void NodeObject::Init (  )  [virtual]

Initialize object.

Definition at line 144 of file Node.cpp.

void NodeObject::Render (  )  [virtual]

Render object.

Reimplemented in ShaderNode, TextureNode, TextureSetNode, RFBufferNode, SquareNode, TransformNode, ModelNode, and TextNode.

Definition at line 153 of file Node.cpp.

void NodeObject::Update ( const float  fDtime  )  [virtual]

Update object.

Reimplemented in ShaderNode.

Definition at line 159 of file Node.cpp.

void NodeObject::Message ( int  iMessageID,
const string sMessageName,
const string sMessagePayload 
) [virtual]

Receive message from object.

Definition at line 165 of file Node.cpp.

void NodeObject::Disestablish (  )  [virtual]

Dis-establish object, this should be the oppisite of Init if necessiary.

Definition at line 148 of file Node.cpp.

virtual void NodeObject::Reload (  )  [inline, virtual]

Call Disestablish and then Init.

Definition at line 116 of file Node.h.

void NodeObject::Lock (  ) 

If synchronization is turned on, this will lock the object.

Definition at line 182 of file Node.cpp.

void NodeObject::Unlock (  ) 

If synchronization is turned on, this will unlock the object.

Definition at line 191 of file Node.cpp.

void NodeObject::DecCount (  )  [inline, private]

A node, pointing to this unhooked us.

Definition at line 130 of file Node.h.

void NodeObject::IncCount (  )  [inline, private]

A node, pointing to this hooked us.

Definition at line 133 of file Node.h.

void NodeObject::AttachParent ( NodeObject n  )  [private]

Connect this as a parent's child.

Definition at line 139 of file Node.cpp.

void NodeObject::DetachParent ( NodeObject n  )  [private]

Disconnect this as a parent's child.

Definition at line 170 of file Node.cpp.


Friends And Related Function Documentation

friend class Node [friend]

Definition at line 135 of file Node.h.


Member Data Documentation

void* NodeObject::m_vMutex [private]

Synchronization Mutex.

Definition at line 126 of file Node.h.

string NodeObject::m_sName [private]

Name of Object.

Definition at line 144 of file Node.h.

vector< NodeObject * > NodeObject::m_vnParents [private]

List of Parents.

Definition at line 147 of file Node.h.

vector< Node > NodeObject::m_vnChildren [private]

List of Children.

Definition at line 150 of file Node.h.

int NodeObject::m_iCount [private]

Total references to "this".

Definition at line 153 of file Node.h.

bool NodeObject::m_bDestroyOnUpdate [private]

If set, object will destroy itself after next update.

Definition at line 156 of file Node.h.


The documentation for this class was generated from the following files:
© 2005-2007 Charles Lohr, Joshua Allen, David Chapman, Andrew Lohr. All material including documentation under the MIT/X11 license.