News SF.net Project Frequently Asked Questions Documentation Downloads Mailing Lists How to Contribute

SourceForge.net Logo

Changing the way games are made and played.

TNL::Object class Reference

TNL::Object Class Reference

#include <tnlNetBase.h>

Inheritance diagram for TNL::Object:

TNL::AsymmetricKey TNL::ByteBuffer TNL::Journal TNL::NetConnection TNL::NetEvent TNL::NetInterface TNL::NetObject TNL::SymmetricCipher TNL::Thread TNL::ThreadQueue Zap::ClientRef Zap::SFXObject Zap::VoiceDecoder Zap::VoiceEncoder

Object Creation

These helper functions let you create an instance of a class by name or ID.

Note:
Call these instead of NetClassRep::create


void incRef ()
void decRef ()
Objectcreate (const char *className)
 static function to create an instance of a named class

Objectcreate (const NetClassGroup groupId, const NetClassType typeId, const U32 classId)
 static function to create an instance of a class identified by a class group, class type and class id


Public Member Functions

virtual NetClassRepgetClassRep () const
 Returns the NetClassRep associated with this object.

 Object ()
virtual ~Object ()
virtual void destroySelf ()
 Object destroy self call (from RefPtr).

U32 getClassId (NetClassGroup classGroup) const
 Get our class ID within the specified NetClassGroup.

const char * getClassName () const
 Get our unmangled class name.


Private Attributes

SafeObjectRefmFirstObjectRef
 The head of the linked list of safe object references.

U32 mRefCount
 Reference counter for RefPtr objects.


Friends

class SafeObjectRef
class RefObjectRef

Constructor & Destructor Documentation

TNL::Object::Object  ) 
 

virtual TNL::Object::~Object  )  [virtual]
 


Member Function Documentation

virtual NetClassRep* TNL::Object::getClassRep  )  const [virtual]
 

Returns the NetClassRep associated with this object.

virtual void TNL::Object::destroySelf  )  [inline, virtual]
 

Object destroy self call (from RefPtr).

Note:
Override if this class has specially allocated memory.

U32 TNL::Object::getClassId NetClassGroup  classGroup  )  const [inline]
 

Get our class ID within the specified NetClassGroup.

const char * TNL::Object::getClassName  )  const [inline]
 

Get our unmangled class name.

Object* TNL::Object::create const char *  className  )  [inline, static]
 

static function to create an instance of a named class

Object* TNL::Object::create const NetClassGroup  groupId,
const NetClassType  typeId,
const U32  classId
[inline, static]
 

static function to create an instance of a class identified by a class group, class type and class id

void TNL::Object::incRef  )  [inline]
 

void TNL::Object::decRef  )  [inline]
 


Friends And Related Function Documentation

friend class SafeObjectRef [friend]
 

friend class RefObjectRef [friend]
 


Field Documentation

SafeObjectRef* TNL::Object::mFirstObjectRef [private]
 

The head of the linked list of safe object references.

Reimplemented in TNL::NetObject.

U32 TNL::Object::mRefCount [private]
 

Reference counter for RefPtr objects.