VR-Forces 4.8 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 | Static Protected Attributes | Private Member Functions
DtVrfObjectIdGenerator Class Reference

This class will, in DIS or HLA, generate the unique id necessary to pass into the object publisher to describe the id of that object. More...

Public Member Functions

 DtVrfObjectIdGenerator ()
 
virtual ~DtVrfObjectIdGenerator ()
 
virtual DtGlobalObjectDesignator nextId (DtExerciseConn *, DtEntityIdentifier &)
 Override this method to return your next id. More...
 

Static Public Member Functions

static DtVrfObjectIdGeneratorobjectIdGenerator ()
 Returns the global factory that is used when generating new object identifiers for VR-Forces. More...
 
static void setObjectIdGenerator (DtVrfObjectIdGenerator *)
 
static bool isVrfGlobalId (const DtGlobalObjectDesignator &identifier)
 Returns true if given global object Id is a VR-Forces encoded global Id and false if it is not. More...
 
static void setVrfDISAppIdRange (int iLower, int iUpper)
 Sets the DIS app id range to use when determining if something is published by VRF or not Currently this range is 3000 - 4000. More...
 
static DtGlobalObjectDesignator nullId ()
 

Protected Member Functions

virtual bool encodeIdentifier (DtGlobalObjectDesignator &identifier, RTI::FederateHandle federateHandle, int entityNum) const
 Encoded identifier is used by remote VR-Forces applications to distinguish between VR-Forces entities and other (unknown) types of remote entities. More...
 
virtual int nextNameId ()
 Increases integer counter that starts at 0. More...
 

Static Protected Attributes

static DtVrfObjectIdGeneratortheDefaultObjectIdGenerator
 
static int theDisAppIdLower
 
static int theDisAppIdUpper
 

Private Member Functions

 DtVrfObjectIdGenerator (const DtVrfObjectIdGenerator &)
 
DtVrfObjectIdGeneratoroperator= (const DtVrfObjectIdGenerator &)
 

Detailed Description

This class will, in DIS or HLA, generate the unique id necessary to pass into the object publisher to describe the id of that object.

When creating a published object, it is important to use this class to generate the id that can be used as a valid object identifier for VR-Forces. This class is used internally by the VR-Forces object publishers when assigning new object ids.

Constructor & Destructor Documentation

DtVrfObjectIdGenerator::DtVrfObjectIdGenerator ( )
virtual DtVrfObjectIdGenerator::~DtVrfObjectIdGenerator ( )
virtual
DtVrfObjectIdGenerator::DtVrfObjectIdGenerator ( const DtVrfObjectIdGenerator )
private

Member Function Documentation

virtual DtGlobalObjectDesignator DtVrfObjectIdGenerator::nextId ( DtExerciseConn *  ,
DtEntityIdentifier &   
)
virtual

Override this method to return your next id.

In DIS this will return the next id of the exercise connection/ In HLA, it will be VRF prepended onto an HLA object id Returns the next available object identifier that is used when creating an object to be published on the network. Note that in DIS, the entity identifier and the global object designator returned are the same value. In HLA these values are different

static DtVrfObjectIdGenerator* DtVrfObjectIdGenerator::objectIdGenerator ( )
static

Returns the global factory that is used when generating new object identifiers for VR-Forces.

If no generator is set, then, uses a default generator of this class type

static void DtVrfObjectIdGenerator::setObjectIdGenerator ( DtVrfObjectIdGenerator )
static
static bool DtVrfObjectIdGenerator::isVrfGlobalId ( const DtGlobalObjectDesignator identifier)
static

Returns true if given global object Id is a VR-Forces encoded global Id and false if it is not.

static void DtVrfObjectIdGenerator::setVrfDISAppIdRange ( int  iLower,
int  iUpper 
)
static

Sets the DIS app id range to use when determining if something is published by VRF or not Currently this range is 3000 - 4000.

static DtGlobalObjectDesignator DtVrfObjectIdGenerator::nullId ( )
inlinestatic
virtual bool DtVrfObjectIdGenerator::encodeIdentifier ( DtGlobalObjectDesignator identifier,
RTI::FederateHandle  federateHandle,
int  entityNum 
) const
protectedvirtual

Encoded identifier is used by remote VR-Forces applications to distinguish between VR-Forces entities and other (unknown) types of remote entities.

Returns true if successful, false if not. Given a federate handle and entity Number (encoding scheme described in simAppInterOp.h).

virtual int DtVrfObjectIdGenerator::nextNameId ( )
protectedvirtual

Increases integer counter that starts at 0.

DtVrfObjectIdGenerator& DtVrfObjectIdGenerator::operator= ( const DtVrfObjectIdGenerator )
private

Member Data Documentation

DtVrfObjectIdGenerator* DtVrfObjectIdGenerator::theDefaultObjectIdGenerator
staticprotected
int DtVrfObjectIdGenerator::theDisAppIdLower
staticprotected
int DtVrfObjectIdGenerator::theDisAppIdUpper
staticprotected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)