#include <Node.h>
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< Node > | m_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 |
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.
virtual string NodeObject::GetType | ( | ) | [inline, virtual] |
virtual bool NodeObject::IsTypeOf | ( | const string & | sType | ) | [inline, virtual] |
void NodeObject::SetName | ( | const string & | sName | ) |
string NodeObject::GetName | ( | ) | [inline] |
void NodeObject::DetachChild | ( | Node | n | ) |
int NodeObject::GetCount | ( | ) | [inline] |
void NodeObject::DestroySelfOnUpdate | ( | ) | [inline] |
void NodeObject::Render | ( | ) | [virtual] |
Render object.
Reimplemented in ShaderNode, TextureNode, TextureSetNode, RFBufferNode, SquareNode, TransformNode, ModelNode, and TextNode.
void NodeObject::Update | ( | const float | fDtime | ) | [virtual] |
void NodeObject::Disestablish | ( | ) | [virtual] |
virtual void NodeObject::Reload | ( | ) | [inline, virtual] |
void NodeObject::Lock | ( | ) |
void NodeObject::Unlock | ( | ) |
void NodeObject::DecCount | ( | ) | [inline, private] |
void NodeObject::IncCount | ( | ) | [inline, private] |
void NodeObject::AttachParent | ( | NodeObject * | n | ) | [private] |
void NodeObject::DetachParent | ( | NodeObject * | n | ) | [private] |
void* NodeObject::m_vMutex [private] |
string NodeObject::m_sName [private] |
vector< NodeObject * > NodeObject::m_vnParents [private] |
vector< Node > NodeObject::m_vnChildren [private] |
int NodeObject::m_iCount [private] |
bool NodeObject::m_bDestroyOnUpdate [private] |