Main Page   Modules   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   Related Pages  

TNL Namespace Reference

Global namespace for all TNL classes. More...


Compounds

struct  Address
 Representation of a network address. More...

class  BitSet32
 Represents a word of bits. More...

class  BitStream
 BitStream provides a bit-level stream interface to a data buffer. More...

class  Certificate
 The Certificate class manages a digitally signed certificate. More...

class  ClassChunker
 Templatized data chunker class with proper construction and destruction of its elements. More...

class  ClientPuzzleManager
 The ClientPuzzleManager class issues, solves and validates client puzzles for connection authentication. More...

struct  ConnectionParameters
 All data associated with the negotiation of the connection. More...

class  ConnectionStringTable
 ConnectionStringTable is a helper class to EventConnection for reducing duplicated string data sends. More...

struct  Entry
 An entry in the EventConnection's string table. More...

class  DataChunker
 Implements a chunked data allocater. More...

struct  Float
 Floating point 0...1 value bit-level RPC template wrapper. More...

struct  Int
 Unsigned integer bit-level RPC template wrapper. More...

struct  IPAddress
 Packed representaion of an IPAddress. More...

class  Mutex
 Platform independent Mutual Exclusion implementation. More...

struct  NetType
 NetType serves as a base class for all bit-compressed versions of the base types that can be transmitted using TNL's RPC mechanism. More...

struct  RangedU32
 Unsigned ranged integer bit-level RPC template wrapper. More...

class  Semaphore
 Platform independent semaphore class. More...

struct  SignedFloat
 Floating point -1...1 value bit-level RPC template wrapper. More...

struct  SignedInt
 Signed integer bit-level RPC template wrapper. More...

class  Socket
 The Socket class encapsulates a platform's network socket. More...

struct  DelaySendPacket
 Structure used to track packets that are delayed in sending for simulating a high-latency connection. More...

class  EventConnection
 EventConnection is a NetConnection subclass used for sending guaranteed and unguaranteed event packages across a connection. More...

struct  EventPacketNotify
 EventPacketNotify tracks all the events sent with a single packet. More...

struct  Functor
 Base class for FunctorDecl template classes. More...

struct  FunctorDecl
 FunctorDecl template class. More...

class  GhostConnection
 GhostConnection is a subclass of EventConnection that manages the transmission (ghosting) and updating of NetObjects over a connection. More...

struct  GhostRef
 GhostRef tracks an update sent in one packet for the ghost of one NetObject. More...

struct  GhostPacketNotify
 Notify structure attached to each packet with information about the ghost updates in the packet. More...

struct  GhostInfo
 Each GhostInfo structure tracks the state of a single NetObject's ghost for a single GhostConnection. More...

class  Journal
 The Journal class represents the recordable entry point(s) into program execution. More...

class  LogConsumer
 LogConsumer is the base class for the message logging system in TNL. More...

class  NetClassRep
 NetClassRep class instances represent each declared NetClass and are used to construct object instances. More...

class  NetClassRepInstance
 NetClassRepInstance - one of these templates is instantiated for each class that is declared via the IMPLEMENT_* macros below. More...

class  NetConnection
 TNL network connection base class. More...

struct  NetConnectionRep
 NetConnectionRep maintians a linked list of valid connection classes. More...

class  NetEvent
 An event to be sent over the network. More...

class  NetInterface
 NetInterface class. More...

class  NetObject
 Superclass for ghostable networked objects. More...

class  NetObjectRPCEvent
 Event class for handling RPC method invocations on NetObjects. More...

class  Object
 Base class for all NetObject, NetEvent, NetConnection and NetInterface instances. More...

struct  PacketNotify
 Structure used to track what was sent in an individual packet for processing upon notification of delivery success or failure. More...

class  PacketStream
 PacketStream provides a network interface to the BitStream for easy construction of data packets. More...

struct  Point3F
 Point3F is used by BitStream for transmitting 3D points and vectors. More...

class  RefObjectRef
 Base class for Object reference counting. More...

class  RefPtr
 Reference counted object template pointer class. More...

class  RPCEvent
 Base class for RPC events. More...

class  SafeObjectRef
 Base class for Object safe pointers. More...

class  SafePtr
 Safe object template pointer class. More...

class  StringTableEntry
 The StringTableEntry class encapsulates an entry in the network StringTable. More...

class  SymmetricCipher
 Class for symmetric encryption of data across a connection. More...

class  Thread
 Platform independent Thread class. More...

class  ThreadQueue
 Managing object for a queue of worker threads that pass messages back and forth to the main thread. More...

class  ThreadStorage
 Platform independent per-thread storage class. More...

class  Vector
 A dynamic array template class. More...

struct  VectorRep
 VectorRep is an image of a Vector template object that is used for marshalling and unmarshalling Vectors across RPCs. More...


GeneralMath Math Helpers

Some general numeric utility functions.

bool isPow2 (const U32 number)
 Determines if number is a power of two.

U32 getBinLog2 (U32 value)
 Determines the binary logarithm of the input value rounded down to the nearest power of 2.

U32 getNextBinLog2 (U32 number)
 Determines the binary logarithm of the next greater power of two of the input number.

U32 getNextPow2 (U32 value)
 Determines the next greater power of two from the value. If the value is a power of two, it is returned.

 DeclareTemplatizedMinMax (U32) DeclareTemplatizedMinMax(S32) DeclareTemplatizedMinMax(U16) DeclareTemplatizedMinMax(S16) DeclareTemplatizedMinMax(U8) DeclareTemplatizedMinMax(S8) DeclareTemplatizedMinMax(F32) DeclareTemplatizedMinMax(F64) inline void writeU32ToBuffer(U32 value
 @}


Typedefs

typedef signed char S8
 Compiler independent signed char (8bit integer).

typedef unsigned char U8
 Compiler independent unsigned char (8bit integer).

typedef signed short S16
 Compiler independent signed 16-bit short integer.

typedef unsigned short U16
 Compiler independent unsigned 16-bit short integer.

typedef signed int S32
 Compiler independent signed 32-bit integer.

typedef unsigned int U32
 Compiler independent unsigned 32-bit integer.

typedef float F32
 Compiler independent 32-bit float.

typedef double F64
 Compiler independent 64-bit float.


Enumerations

enum  NetClassType { NetClassTypeNone = -1, NetClassTypeObject = 0, NetClassTypeDataBlock, NetClassTypeEvent }
 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  NetClassGroup { NetClassGroupGame, NetClassGroupCommunity, NetClassGroupMaster, NetClassGroupUnused2 }
 NetClassGroups are used to define different service types for an application. More...

enum  NetClassMask
 Mask values used to indicate which NetClassGroup(s) a NetObject or NetEvent can be transmitted through.

enum  NetObjectRPCDirection
 Direction that a NetObject RPC method call should travel.

enum  RPCDirection { RPCDirAny = NetEvent::DirAny, RPCDirServerToClient = NetEvent::DirServerToClient, RPCDirClientToServer = NetEvent::DirClientToServer }
 Enumeration for valid directions that RPC messages can travel. More...

enum  RPCGuaranteeType { RPCGuaranteedOrdered = NetEvent::GuaranteedOrdered, RPCGuaranteed = NetEvent::Guaranteed, RPCUnguaranteed = NetEvent::Unguaranteed }
 Type of data guarantee this RPC should use. More...

enum  TransportProtocol { IPProtocol, TCPProtocol, IPXProtocol, IPv6Protocol }
 Enumeration for transport protocols for the TNL. More...

enum  Constants { MaxPacketDataSize = 1500 }
 Packet level network constants. More...

enum  NetError { NoError, InvalidPacketProtocol, WouldBlock, UnknownError }
 Error conditions that can be returned by sendto and recvfrom. More...


Functions

const char * avar (const char *message,...)
 sprintf style string formating into a fixed temporary buffer.

void logprintf (const char *format,...)
 Global interface to the TNL logging system.

bool atob (const char *str)
 String to boolean conversion.

S32 dSprintf (char *buffer, U32 bufferSize, const char *format,...)
 Printf into string with a buffer size.

S32 dVsprintf (char *buffer, U32 bufferSize, const char *format, va_list arglist)
 compiler independent

U16 endianSwap (const U16 in_swap)
 Convert the byte ordering on the U16 to and from big/little endian format.

U32 endianSwap (const U32 in_swap)
 Convert the byte ordering on the U32 to and from big/little endian format.

char dToupper (const char c)
 Converts an ASCII character to upper case.

char dTolower (const char c)
 Converts an ASCII character to lower case.

template<class T> T * constructInPlace (T *p)
 Constructs an object that already has memory allocated for it.

template<class T> T * constructInPlace (T *p, const T *copy)
 Copy constructs an object that already has memory allocated for it.

template<class T> void destructInPlace (T *p)
 Destructs an object without freeing the memory associated with it.


Detailed Description

Global namespace for all TNL classes.

Enumeration Type Documentation

enum TNL::Constants
 

Packet level network constants.

Enumeration values:
MaxPacketDataSize  The maximum size of a data packet sent through the Net::sendto and Net::recvfrom functions.

Definition at line 136 of file tnlUDP.h.

enum TNL::NetClassGroup
 

NetClassGroups are used to define different service types for an application.

Each network-related class can be marked as valid across one or more NetClassGroups. Each network connection belongs to a particular group, and can only transmit objects that are valid in that group.

Enumeration values:
NetClassGroupGame  Group for game related network classes.
NetClassGroupCommunity  Group for community server/authentication classes.
NetClassGroupMaster  Group for simple master server.
NetClassGroupUnused2  Reserved group.

Definition at line 78 of file tnlNetBase.h.

Referenced by TNL::Object::create(), TNL::NetClassRep::getClassGroupCRC(), TNL::Object::getClassId(), TNL::NetClassRep::getClassId(), and TNL::NetConnection::getNetClassGroup().

enum TNL::NetClassType
 

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.

For example, if there are only 21 classes declared of NetClassTypeObject, the class identifier only needs to be sent using 5 bits.

Enumeration values:
NetClassTypeNone  Not an id'able network class.
NetClassTypeObject  Game object classes.
NetClassTypeDataBlock  Data block classes.
NetClassTypeEvent  Event classes.

Definition at line 63 of file tnlNetBase.h.

Referenced by TNL::Object::create(), TNL::NetClassRep::getClassType(), and TNL::NetClassRepInstance< T >::NetClassRepInstance().

enum TNL::NetError
 

Error conditions that can be returned by sendto and recvfrom.

Enumeration values:
NoError  The operation succeeded without error.
InvalidPacketProtocol  The program attempted to send a packet to an address using a socket that didn't support the protocol of the address.
WouldBlock  The operation would have blocked, for example if there was no data to read.
UnknownError  There was some other, unknown error.

Definition at line 141 of file tnlUDP.h.

Referenced by TNL::NetInterface::checkIncomingPackets(), TNL::Socket::recvfrom(), TNL::PacketStream::recvfrom(), TNL::NetConnection::sendPacket(), TNL::Socket::sendto(), TNL::NetInterface::sendto(), and TNL::PacketStream::sendto().

enum TNL::RPCDirection
 

Enumeration for valid directions that RPC messages can travel.

Enumeration values:
RPCDirAny  This RPC can be sent from the server or the client.
RPCDirServerToClient  This RPC can only be sent from the server to the client.
RPCDirClientToServer  This RPC can only be sent from the client to the server.

Definition at line 136 of file tnlRPC.h.

Referenced by TNL::RPCEvent::RPCEvent().

enum TNL::RPCGuaranteeType
 

Type of data guarantee this RPC should use.

Enumeration values:
RPCGuaranteedOrdered  RPC event delivery is guaranteed and will be processed in the order it was sent relative to other ordered events and RPCs.
RPCGuaranteed  RPC event delivery is guaranteed and will be processed in the order it was received.
RPCUnguaranteed  Event delivery is not guaranteed - however, the event will remain ordered relative to other unguaranteed events.

Definition at line 143 of file tnlRPC.h.

Referenced by TNL::NetObjectRPCEvent::NetObjectRPCEvent(), and TNL::RPCEvent::RPCEvent().

enum TNL::TransportProtocol
 

Enumeration for transport protocols for the TNL.

Currently only IP and IPX are supported - the IPv6 constant is for future use.

Enumeration values:
IPProtocol  The standard Internet routing protocol.
TCPProtocol  The standard Internet guaranteed delivery protocol.
IPXProtocol  Novell's IPX protocol.
IPv6Protocol  The next generation 128-bit address internet protocol (not currently supported by TNL).

Definition at line 51 of file tnlUDP.h.

Referenced by TNL::Address::Address().


Function Documentation

const char * TNL::avar const char *    in_msg,
...   
 

sprintf style string formating into a fixed temporary buffer.

Parameters:
in_msg  sprintf style format string
Returns:
pointer to fixed buffer containing formatted string
Example:
   U8 a = 5;
   S16 b = -10;
   char *output = avar("hello %s! a=%u, b=%d", "world");
   ouput = "hello world! a=5, b=-10"
Warning:
avar uses a static fixed buffer. Treat the buffer as volatile data and use it immediately. Other functions my use avar too and clobber the buffer.

Definition at line 76 of file assert.cpp.

References avar(), and dVsprintf().

Referenced by avar(), TNL::GhostConnection::readPacket(), and TNL::EventConnection::readPacket().

int TNL::dSprintf char *    buffer,
U32    bufferSize,
const char *    format,
...   
 

Printf into string with a buffer size.

This will print into the specified string until the buffer size is reached.

Definition at line 437 of file platform.cpp.

References U32.

Referenced by TNL::Address::toString().

int TNL::dVsprintf char *    buffer,
U32    bufferSize,
const char *    format,
va_list    arglist
 

compiler independent

This will print into the specified string until the buffer size is reached.

Definition at line 450 of file platform.cpp.

References U32.

Referenced by avar(), logprintf(), and TNL::NetConnection::setLastError().

U32 endianSwap const U32    in_swap [inline]
 

Convert the byte ordering on the U32 to and from big/little endian format.

Parameters:
in_swap  Any U32
Returns:
swapped U32.

Definition at line 64 of file tnlEndian.h.

References U32.

U16 endianSwap const U16    in_swap [inline]
 

Convert the byte ordering on the U16 to and from big/little endian format.

Parameters:
in_swap  Any U16
Returns:
swapped U16.

Definition at line 48 of file tnlEndian.h.

References U16.

void TNL::logprintf const char *    format,
...   
 

Global interface to the TNL logging system.

The TNL logging system is consumer based. This is just a global stub that routes the log string to all the consumers.

You should really be using the TNLLogMessage() and TNLLogMessageV() macros instead of calling this.

See also:
LogConsumer

Definition at line 86 of file log.cpp.

References dVsprintf(), TNL::LogConsumer::getNext(), TNL::LogConsumer::logString(), and U32.

Referenced by TNL::NetInterface::continuePuzzleSolution(), TNL::NetClassRep::initialize(), TNL::NetClassRep::logBitUsage(), TNL::NetInterface::processConnections(), and TNL::NetConnection::readPacketHeader().


Generated on Thu Aug 18 16:03:36 2005 for Robin Hood: Thieves & Knights by doxygen1.2.18