Main Page Modules Namespaces C++ Classes Compound List File List Index
TNL: tnlNetBase.h File Reference

# tnlNetBase.h File Reference

`#include "tnlBitSet.h"`
`#include "tnlTypes.h"`
`#include "tnlPlatform.h"`
`#include "tnlAssert.h"`
`#include "tnlVector.h"`

## Namespaces

namespace | TNL

## Data Structures

class | TNL::NetClassRep
| NetClassRep class instances represent each declared NetClass and are used to construct object instances. More...
class | TNL::NetClassRepInstance< T >
| NetClassRepInstance - one of these templates is instantiated for each class that is declared via the IMPLEMENT_* macros below. More...
class | TNL::Object
| Base class for all NetObject, NetEvent, NetConnection and NetInterface instances. More...
class | TNL::RefObjectRef
| Base class for Object reference counting. More...
class | TNL::RefPtr< T >
| Reference counted object template pointer class. More...
class | TNL::SafeObjectRef
| Base class for Object safe pointers. More...
class | TNL::SafePtr< T >
| Safe object template pointer class. More...

## Defines

#define | TNL_DECLARE_CLASS(className)
| The TNL_DECLARE_CLASS macro should be called within the declaration of any network class.
#define | TNL_IMPLEMENT_CLASS(className)
| The TNL_IMPLEMENT_CLASS macro should be used for classes that will be auto-constructed by name only.

## Enumerations

enum | TNL::NetClassType { TNL::NetClassTypeNone = -1, TNL::NetClassTypeObject = 0, TNL::NetClassTypeDataBlock, TNL::NetClassTypeEvent,
TNL::NetClassTypeCount
}
| NetClassTypes are used to define the ranges of individual class identifiers, in order to reduce the number of bits necessary to identify the class of an object across the network. More...
enum | TNL::NetClassGroup { TNL::NetClassGroupGame, TNL::NetClassGroupCommunity, TNL::NetClassGroupMaster, TNL::NetClassGroupUnused2,
TNL::NetClassGroupCount,
TNL::NetClassGroupInvalid = NetClassGroupCount
}
| NetClassGroups are used to define different service types for an application. More...
enum | TNL::NetClassMask { TNL::NetClassGroupGameMask = 1 << NetClassGroupGame, TNL::NetClassGroupCommunityMask = 1 << NetClassGroupCommunity, TNL::NetClassGroupMasterMask = 1 << NetClassGroupMaster, TNL::NetClassGroupAllMask = (1 << NetClassGroupCount) - 1
}
| Mask values used to indicate which NetClassGroup(s) a NetObject or NetEvent can be transmitted through. More...

## Define Documentation

#define TNL_DECLARE_CLASS | ( | className |  | ) |

Value:

    static TNL::NetClassRepInstance<className> dynClassRep;      \
       virtual TNL::NetClassRep* getClassRep() const

The TNL_DECLARE_CLASS macro should be called within the declaration of any network class.

#define TNL_IMPLEMENT_CLASS | ( | className |  | ) |

Value:

    TNL::NetClassRep* className::getClassRep() const { return &className::dynClassRep; } \
       TNL::NetClassRepInstance<className> className::dynClassRep(#className, 0, TNL::NetClassTypeNone, 0)

The TNL_IMPLEMENT_CLASS macro should be used for classes that will be auto-constructed by name only.