VR-Forces 4.7 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Static Protected Attributes
DtVrfTDLMessage Class Reference
Inheritance diagram for DtVrfTDLMessage:
Inheritance graph
[legend]

Public Member Functions

 DtVrfTDLMessage ()
 default constructor
 DtVrfTDLMessage (const DtVrfTDLMessage &orig)
 copy constructor: shallow; copies values only
const DtVrfTDLMessageoperator= (DtVrfTDLMessage &orig)
 assignment operator: shallow; assigns values only
virtual ~DtVrfTDLMessage ()
 destructor
virtual int tdlMessageType () const
 TDL Message type.
virtual DtVrfTDLMessageclone () const
virtual int messageVersion () const
virtual int headerVersion () const
virtual int getContentType (const char *buffer)
 Given the message buffer, get the content type from it.
virtual void printDataToString (DtString &str)
 Print message.
virtual void setRecipient (const DtSimulationAddress &recipient)
 The recipient of this message.
virtual const DtSimulationAddress & recipient () const
virtual void setSender (const DtSimulationAddress &recipient)
 The sender of this message.
virtual const DtSimulationAddress & sender () const
virtual int netRepSize () const
 The number of bytes on the network for this message. Returns the sum of the fixed and variable sizes.
virtual const charnetRep ()
 The buffer which is the content for this message.
virtual void setToNet (char *buffer)
 Sets the contents of this object into the memory buffer specified by myNetRep.
virtual bool setFromNet (const char *buffer, int bufferSize)
 Sets the content from the net by calling setFixedFromNet and setVariableFromNext.
virtual int fixedSize () const
 Returns the size of the fixed portion of this message.
virtual int variableSize () const
 Returns the variable data size.
virtual void setMarkingText (const DtString &)
 Accessor for marking text of the item sending this message.
virtual const DtStringmarkingText () const
virtual void setUUID (const DtString &)
 Accessor for the UUID for this item.
virtual const DtStringuuid () const
virtual void setTimeStamp (unsigned int)
 Accessor for time stamp.
virtual unsigned int timeStamp () const

Static Public Member Functions

static DtVrfTDLMessagecreator ()
static void setFactory (DtVrfTDLMessageFactory *)
 Factory accessors.
static DtVrfTDLMessageFactoryfactory ()

Protected Member Functions

virtual charcreateNetworkBuffer ()
 Creates the network buffer of the size needed.
virtual void setFixedToNet (char *buffer)
 Sets the fixed portion of the buffer to the net. Returns the pointer at the end of this fixed portion.
virtual int setFixedFromNet (const char *buffer)
 Sets the fixed portion from the buffer into internal structures and variables.
virtual const charsetVariableFromNet (const char *buffer, const char *fixedBuffer, int messageVersion)
 Sets the variable portion into internal structures.
virtual charsetVariableToNet (char *buffer)
 Sets the variable portion to the net.

Protected Attributes

DtSimulationAddress myRecipient
DtSimulationAddress mySender
charmyNetRep
int myLastAllocatedSize
DtString myMarkingText
DtString myUUID
unsigned int myTimeStamp

Static Protected Attributes

static DtVrfTDLMessageFactorytheVrfTDLMessageFactory

Constructor & Destructor Documentation

DtVrfTDLMessage::DtVrfTDLMessage ( )

default constructor

DtVrfTDLMessage::DtVrfTDLMessage ( const DtVrfTDLMessage orig)

copy constructor: shallow; copies values only

virtual DtVrfTDLMessage::~DtVrfTDLMessage ( )
virtual

destructor

Member Function Documentation

const DtVrfTDLMessage& DtVrfTDLMessage::operator= ( DtVrfTDLMessage orig)

assignment operator: shallow; assigns values only

virtual int DtVrfTDLMessage::tdlMessageType ( ) const
virtual
virtual DtVrfTDLMessage* DtVrfTDLMessage::clone ( ) const
virtual
static DtVrfTDLMessage* DtVrfTDLMessage::creator ( )
static
virtual int DtVrfTDLMessage::messageVersion ( ) const
virtual
virtual int DtVrfTDLMessage::headerVersion ( ) const
virtual
virtual int DtVrfTDLMessage::getContentType ( const char buffer)
virtual

Given the message buffer, get the content type from it.

virtual void DtVrfTDLMessage::printDataToString ( DtString str)
virtual
static void DtVrfTDLMessage::setFactory ( DtVrfTDLMessageFactory )
static

Factory accessors.

static DtVrfTDLMessageFactory* DtVrfTDLMessage::factory ( )
static
virtual void DtVrfTDLMessage::setRecipient ( const DtSimulationAddress &  recipient)
virtual

The recipient of this message.

virtual const DtSimulationAddress& DtVrfTDLMessage::recipient ( ) const
virtual
virtual void DtVrfTDLMessage::setSender ( const DtSimulationAddress &  recipient)
virtual

The sender of this message.

virtual const DtSimulationAddress& DtVrfTDLMessage::sender ( ) const
virtual
virtual int DtVrfTDLMessage::netRepSize ( ) const
virtual

The number of bytes on the network for this message. Returns the sum of the fixed and variable sizes.

virtual const char* DtVrfTDLMessage::netRep ( )
virtual

The buffer which is the content for this message.

Note that this is not const such that, if neet be, the message content will be created when this is called

virtual void DtVrfTDLMessage::setToNet ( char buffer)
virtual

Sets the contents of this object into the memory buffer specified by myNetRep.

It is assumed that the memory has been preallocated to the correct size as per netRepSize(). As per network layout will call setFixedToNet first followed by setVariableToNet

virtual bool DtVrfTDLMessage::setFromNet ( const char buffer,
int  bufferSize 
)
virtual

Sets the content from the net by calling setFixedFromNet and setVariableFromNext.

virtual int DtVrfTDLMessage::fixedSize ( ) const
virtual

Returns the size of the fixed portion of this message.

It is assumed that each subclass of this message will subclass from the DtVrfTDLMessageHeader structure to have it's information be contains therein when restoring and setting to the network

Reimplemented in DtVrfTDLPPLIMessage, DtVrfTDLContactMessage, DtVrfTDLStatusMessage, and ExampleTDLMessage.

virtual int DtVrfTDLMessage::variableSize ( ) const
virtual

Returns the variable data size.

Reimplemented in DtVrfTDLContactMessage, DtVrfTDLStatusMessage, and ExampleTDLMessage.

virtual void DtVrfTDLMessage::setMarkingText ( const DtString )
virtual

Accessor for marking text of the item sending this message.

virtual const DtString& DtVrfTDLMessage::markingText ( ) const
virtual
virtual void DtVrfTDLMessage::setUUID ( const DtString )
virtual

Accessor for the UUID for this item.

virtual const DtString& DtVrfTDLMessage::uuid ( ) const
virtual
virtual void DtVrfTDLMessage::setTimeStamp ( unsigned  int)
virtual

Accessor for time stamp.

virtual unsigned int DtVrfTDLMessage::timeStamp ( ) const
virtual
virtual char* DtVrfTDLMessage::createNetworkBuffer ( )
protectedvirtual

Creates the network buffer of the size needed.

virtual void DtVrfTDLMessage::setFixedToNet ( char buffer)
protectedvirtual

Sets the fixed portion of the buffer to the net. Returns the pointer at the end of this fixed portion.

Reimplemented in DtVrfTDLPPLIMessage, DtVrfTDLStatusMessage, ExampleTDLMessage, and DtVrfTDLContactMessage.

virtual int DtVrfTDLMessage::setFixedFromNet ( const char buffer)
protectedvirtual

Sets the fixed portion from the buffer into internal structures and variables.

Returns the message version (passed into variable)

Reimplemented in DtVrfTDLPPLIMessage, ExampleTDLMessage, and DtVrfTDLContactMessage.

virtual const char* DtVrfTDLMessage::setVariableFromNet ( const char buffer,
const char fixedBuffer,
int  messageVersion 
)
protectedvirtual

Sets the variable portion into internal structures.

Returns a pointer at the end of this variable such that a subclass can continue on reading

Reimplemented in DtVrfTDLStatusMessage, ExampleTDLMessage, and DtVrfTDLContactMessage.

virtual char* DtVrfTDLMessage::setVariableToNet ( char buffer)
protectedvirtual

Sets the variable portion to the net.

Reimplemented in DtVrfTDLStatusMessage, ExampleTDLMessage, and DtVrfTDLContactMessage.

Member Data Documentation

DtVrfTDLMessageFactory* DtVrfTDLMessage::theVrfTDLMessageFactory
staticprotected
DtSimulationAddress DtVrfTDLMessage::myRecipient
protected
DtSimulationAddress DtVrfTDLMessage::mySender
protected
char* DtVrfTDLMessage::myNetRep
protected
int DtVrfTDLMessage::myLastAllocatedSize
protected
DtString DtVrfTDLMessage::myMarkingText
protected
DtString DtVrfTDLMessage::myUUID
protected
unsigned int DtVrfTDLMessage::myTimeStamp
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Fri Apr 26 21:53:14 EDT 2019 from SVN revision 197883
Copyright © 2005-2019 VT MAK. All Rights Reserved (www.mak.com)