Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL::NetClassRep class Reference

TNL::NetClassRep Class Reference

#include <tnlNetBase.h>

Inheritance diagram for TNL::NetClassRep:

TNL::NetClassRepInstance< T >

Public Member Functions

U32 getClassId (NetClassGroup classGroup) const
 Returns the class ID, within its type, for the particular group.

NetClassType getClassType () const
 Returns the NetClassType of this class.

S32 getClassVersion () const
 Returns the version of this class.

const char * getClassName () const
 Returns the string class name.

void addInitialUpdate (U32 bitCount)
 Records bits used in the initial update of objects of this class.

void addPartialUpdate (U32 bitCount)
 Records bits used in a partial update of an object of this class.

virtual Objectcreate () const=0
 Creates an instance of the class this represents.


Static Public Member Functions

U32 getNetClassCount (U32 classGroup, U32 classType)
 Returns the number of classes registered under classGroup and classType.

U32 getNetClassBitSize (U32 classGroup, U32 classType)
 Returns the number of bits necessary to transmit class ids of the specified classGroup and classType.

bool isVersionBorderCount (U32 classGroup, U32 classType, U32 count)
 Returns true if the given class count is on a version boundary.

NetClassRepgetClass (U32 classGroup, U32 classType, U32 index)
U32 getClassGroupCRC (NetClassGroup classGroup)
 Returns a CRC of class data, for checking on connection.

void initialize ()
 Initializes the class table and associated data - called from TNL::init().

void logBitUsage ()
 Logs the bit usage information of all the NetClassReps.


Protected Member Functions

 NetClassRep ()
virtual ~NetClassRep ()

Static Protected Member Functions

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

Note:
Call Object::create() instead of these.


Objectcreate (const char *className)
Objectcreate (const U32 groupId, const U32 typeId, const U32 classId)

Protected Attributes

U32 mClassGroupMask
 Mask for which class groups this class belongs to.

S32 mClassVersion
 The version number for this class.

NetClassType mClassType
 Which class type is this?

U32 mClassId [NetClassGroupCount]
 The id for this class in each class group.

char * mClassName
 The unmangled name of the class.

U32 mInitialUpdateBitsUsed
 Number of bits used on initial updates of objects of this class.

U32 mPartialUpdateBitsUsed
 Number of bits used on partial updates of objects of this class.

U32 mInitialUpdateCount
 Number of objects of this class constructed over a connection.

U32 mPartialUpdateCount
 Number of objects of this class updated over a connection.

NetClassRepmNextClass
 Next declared NetClassRep.


Static Protected Attributes

NetClassRepmClassLinkList
 Head of the linked class list.

Vector< NetClassRep * > mClassTable [NetClassGroupCount][NetClassTypeCount]
 Table of NetClassReps for construction by class ID.

U32 mClassCRC [NetClassGroupCount]
 Internally computed class group CRC.

bool mInitialized
 Set once the class tables are built, from initialize.

U32 mNetClassBitSize [NetClassGroupCount][NetClassTypeCount]
 mNetClassBitSize is the number of bits needed to transmit the class ID for a group and type.


Friends

class Object

Constructor & Destructor Documentation

TNL::NetClassRep::NetClassRep  )  [protected]
 

virtual TNL::NetClassRep::~NetClassRep  )  [inline, protected, virtual]
 


Member Function Documentation

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

Object* TNL::NetClassRep::create const U32  groupId,
const U32  typeId,
const U32  classId
[static, protected]
 

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

Returns the class ID, within its type, for the particular group.

NetClassType TNL::NetClassRep::getClassType  )  const [inline]
 

Returns the NetClassType of this class.

S32 TNL::NetClassRep::getClassVersion  )  const [inline]
 

Returns the version of this class.

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

Returns the string class name.

void TNL::NetClassRep::addInitialUpdate U32  bitCount  )  [inline]
 

Records bits used in the initial update of objects of this class.

void TNL::NetClassRep::addPartialUpdate U32  bitCount  )  [inline]
 

Records bits used in a partial update of an object of this class.

virtual Object* TNL::NetClassRep::create  )  const [pure virtual]
 

Creates an instance of the class this represents.

Implemented in TNL::NetClassRepInstance< T >.

U32 TNL::NetClassRep::getNetClassCount U32  classGroup,
U32  classType
[inline, static]
 

Returns the number of classes registered under classGroup and classType.

U32 TNL::NetClassRep::getNetClassBitSize U32  classGroup,
U32  classType
[inline, static]
 

Returns the number of bits necessary to transmit class ids of the specified classGroup and classType.

bool TNL::NetClassRep::isVersionBorderCount U32  classGroup,
U32  classType,
U32  count
[inline, static]
 

Returns true if the given class count is on a version boundary.

NetClassRep* TNL::NetClassRep::getClass U32  classGroup,
U32  classType,
U32  index
[inline, static]
 

U32 TNL::NetClassRep::getClassGroupCRC NetClassGroup  classGroup  )  [inline, static]
 

Returns a CRC of class data, for checking on connection.

void TNL::NetClassRep::initialize  )  [static]
 

Initializes the class table and associated data - called from TNL::init().

void TNL::NetClassRep::logBitUsage  )  [static]
 

Logs the bit usage information of all the NetClassReps.


Friends And Related Function Documentation

friend class Object [friend]
 


Field Documentation

U32 TNL::NetClassRep::mClassGroupMask [protected]
 

Mask for which class groups this class belongs to.

S32 TNL::NetClassRep::mClassVersion [protected]
 

The version number for this class.

NetClassType TNL::NetClassRep::mClassType [protected]
 

Which class type is this?

U32 TNL::NetClassRep::mClassId[NetClassGroupCount] [protected]
 

The id for this class in each class group.

char* TNL::NetClassRep::mClassName [protected]
 

The unmangled name of the class.

U32 TNL::NetClassRep::mInitialUpdateBitsUsed [protected]
 

Number of bits used on initial updates of objects of this class.

U32 TNL::NetClassRep::mPartialUpdateBitsUsed [protected]
 

Number of bits used on partial updates of objects of this class.

U32 TNL::NetClassRep::mInitialUpdateCount [protected]
 

Number of objects of this class constructed over a connection.

U32 TNL::NetClassRep::mPartialUpdateCount [protected]
 

Number of objects of this class updated over a connection.

NetClassRep* TNL::NetClassRep::mNextClass [protected]
 

Next declared NetClassRep.

These are stored in a linked list built by the macro constructs.

NetClassRep* TNL::NetClassRep::mClassLinkList [static, protected]
 

Head of the linked class list.

Vector<NetClassRep *> TNL::NetClassRep::mClassTable[NetClassGroupCount][NetClassTypeCount] [static, protected]
 

Table of NetClassReps for construction by class ID.

U32 TNL::NetClassRep::mClassCRC[NetClassGroupCount] [static, protected]
 

Internally computed class group CRC.

bool TNL::NetClassRep::mInitialized [static, protected]
 

Set once the class tables are built, from initialize.

U32 TNL::NetClassRep::mNetClassBitSize[NetClassGroupCount][NetClassTypeCount] [static, protected]
 

mNetClassBitSize is the number of bits needed to transmit the class ID for a group and type.