VR-Link API Documentation for DIS
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Member Functions | Protected Attributes
DtStandardVariableRecordFactory Class Reference
+ Collaboration diagram for DtStandardVariableRecordFactory:

Public Member Functions

 DtStandardVariableRecordFactory ()
 default constructor Adds creators for the various Standard Variable Records.
virtual ~DtStandardVariableRecordFactory ()
 destructor
 DtStandardVariableRecordFactory (const DtStandardVariableRecordFactory &orig)
 copy constructor
DtStandardVariableRecordFactoryoperator= (const DtStandardVariableRecordFactory &other)
 assignment operator
DtStandardVariableRecordcreateStandardVariableRecord (unsigned int recordType, void *addr=0, unsigned int length=0) const
 Returns a Standard Variable Record pointer.
DtStandardVariableRecordcreateStandardVariableRecordFromNet (const char *addr, const char *endOfPdu) const
 This will attempt to parse a Standard Variable Record an address.
void registerRecord (unsigned int recordType, DtStandardVariableRecordCreator creator)
 Register a Record Type with a creator function.
void initialize ()
 Initialize the factory with the implemented Records.

Protected Attributes

std::map< unsigned int,
DtStandardVariableRecordCreator
mySVMap

Constructor & Destructor Documentation

DtStandardVariableRecordFactory::DtStandardVariableRecordFactory ( )

default constructor Adds creators for the various Standard Variable Records.

virtual DtStandardVariableRecordFactory::~DtStandardVariableRecordFactory ( )
virtual

destructor

DtStandardVariableRecordFactory::DtStandardVariableRecordFactory ( const DtStandardVariableRecordFactory orig)

copy constructor

Member Function Documentation

DtStandardVariableRecord* DtStandardVariableRecordFactory::createStandardVariableRecord ( unsigned int  recordType,
void *  addr = 0,
unsigned int  length = 0 
) const

Returns a Standard Variable Record pointer.

The user my delete it. Note that this method will return null if the Record Type is not registered. If any part of the address or length is illegal then this will return NULL. If only the recordType is passed in then an empty Record of the recordType will be created.

DtStandardVariableRecord* DtStandardVariableRecordFactory::createStandardVariableRecordFromNet ( const char *  addr,
const char *  endOfPdu 
) const

This will attempt to parse a Standard Variable Record an address.

There must be at least a DtNetStandardVariableRecord to parse. It will use the Record Type and length to return a DtStandardVariableRecord *. This will be NULL any part of the parsing fails or the record is not registered in the factory.

void DtStandardVariableRecordFactory::initialize ( )

Initialize the factory with the implemented Records.

DtStandardVariableRecordFactory& DtStandardVariableRecordFactory::operator= ( const DtStandardVariableRecordFactory other)

assignment operator

void DtStandardVariableRecordFactory::registerRecord ( unsigned int  recordType,
DtStandardVariableRecordCreator  creator 
)

Register a Record Type with a creator function.

Member Data Documentation

std::map<unsigned int, DtStandardVariableRecordCreator> DtStandardVariableRecordFactory::mySVMap
protected

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

Document ID: Generated on Thu Feb 22 04:26:36 EST 2018 from SVN revision 186468
Copyright © 2005-2016 VT MÄK. All Rights Reserved (www.mak.com)