VR-Link API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Static Protected Attributes
DtInterClassDesc Class Reference

Instances of DtInterClassDesc are used to represent HLA Object and Interaction classes. More...

+ Collaboration diagram for DtInterClassDesc:

Public Types

typedef void(* DtParameterEncoder )(const DtInteractionWithEncDec &inter, RTI::ParameterHandleValuePairSet *avlist, RTI::ParameterHandle handle)
 Attribute encoding function declaration. More...
 
typedef void(* DtParameterDecoder )(DtInteractionWithEncDec *inter, const RTI::ParameterHandleValuePairSet &pvlist, int i)
 

Public Member Functions

 DtInterClassDesc (const char *className, DtInterClassDesc *base, RTI::InteractionClassHandle handle, DtExerciseConn *exConn)
 constructor More...
 
virtual ~DtInterClassDesc ()
 destructor More...
 
virtual void addParam (const char *paramName)
 Add a parameter (Used when reading FED file). More...
 
virtual RTI::InteractionClassHandle handle () const
 Get the object's class handle. More...
 
virtual const char * name () const
 Get the object's class name. More...
 
virtual const DtInterClassDescbaseClass () const
 Return a pointer to the base class's descriptor, NULL if none. More...
 
virtual DtInterClassDescbaseClass ()
 Return a pointer to the base class's descriptor, NULL if none. More...
 
virtual int isOfClass (RTI::InteractionClassHandle hand) const
 Returns 1 if the class is of class hand or a subclass of hand, 0 otherwise. More...
 
virtual int numParameters () const
 Get the number of parameters associated with this object. More...
 
virtual RTI::ParameterHandle parameterHandleByName (const char *paramName)
 Returns the Parameter handle for this Parameter name. More...
 
virtual DtString parameterNameByHandle (const RTI::ParameterHandle &hand)
 Returns a string holding the name of the Parameter handle. More...
 
virtual const
RTI::ParameterHandleSet & 
paramHandleSet () const
 Get the set of valid parameter handles for this class. More...
 
virtual const
RTI::ParameterHandleSet & 
ownParamHandles () const
 Get the set of non-inherited parameter handles for this class. More...
 
virtual void publish ()
 Publish the class, and register start and stopUpdates callbacks. More...
 
virtual void unpublish ()
 Unpublish the class, and deregister start and stopUpdates callbacks. More...
 
virtual void subscribe ()
 Subscribe to the class. More...
 
virtual void subscribe (DtDDMRegionSP region)
 Subscribe with region. More...
 
virtual void passiveSubscribe ()
 Subscribe passively to the class. More...
 
virtual void unsubscribe ()
 Unsubscribe to the class. More...
 
virtual void unsubscribe (DtDDMRegionSP region)
 Unsubscribe to the class with region. More...
 
virtual bool published () const
 Returns true if the class is published, false otherwise. More...
 
virtual bool subscribed () const
 Returns true if the class is subscribed, false otherwise. More...
 
virtual DtInterClassDescfirstSubscribed ()
 Return the class descriptor for the first subscribed ancestor including this class. More...
 
virtual DtVrlRtiAmbassadorrtiAmb ()
 Get my RTI ambassador. More...
 
virtual bool neededByFederation () const
 Returns true if the interaction class is needed by the federation false otherwise. More...
 
virtual bool everPublished () const
 Return true if we have ever published the class using DtInterClassDesc::publish, false otherwise. More...
 
virtual bool everSubscribed () const
 Return true if we have ever subscribed to the class using DtInterClassDesc::subscribe, false otherwise. More...
 
virtual void setUserTagModifier (DtInteractionTagModifierSP modifier)
 
virtual DtInteractionTagModifierSP userTagModifier ()
 
virtual void enableUnknownParameters ()
 allows all unknown Parameters to be encoded or decoded in this class. More...
 
virtual void setUnknownParameterDecoder (DtParameterDecoder decoder)
 Set a decoder to be called for this object class for any Parameter received in an update that doesn't have a decoder. More...
 
virtual void setUnknownParameterEncoder (DtParameterEncoder encoder)
 Set an encoder to be called for this object class for any Parameter that doesn't have an encoder set for it. More...
 
virtual DtParameterEncoder unknownParameterEncoder ()
 Returns the unknown Parameter encoder. Returns null if not set. More...
 
virtual DtParameterDecoder unknownParameterDecoder ()
 Returns the unknown Parameter decoder. Returns null if not set. More...
 

Static Public Member Functions

static void setMaxParameters (int num)
 Set/Get maximum number of allowable parameters for an interaction. More...
 
static int maxParameters ()
 
static void setSubscriptionTimeDelay (double delay)
 Set a time delay to occur after calling RTI::RTIambassador::subscribe() The purpose of this function is to get around a bug in DMSO RTI NG v3.2 for Win98. More...
 

Protected Member Functions

virtual void processStartInters (RTI::InteractionClassHandle hand)
 Callback for handling startInters RTI callback. More...
 
virtual void processStopInters (RTI::InteractionClassHandle hand)
 Callback for handling stopInters RTI callback. More...
 
 DtInterClassDesc (const DtInterClassDesc &orig)
 copy constructor – Not Implemented More...
 
DtInterClassDescoperator= (const DtInterClassDesc &orig)
 assignment operator – Not Implemented More...
 

Static Protected Member Functions

static void startIntersCb (RTI::InteractionClassHandle hand, void *usr)
 Callback for handling startInters RTI callback. More...
 
static void stopIntersCb (RTI::InteractionClassHandle hand, void *usr)
 Callback for handling stopInters RTI callback. More...
 

Protected Attributes

DtString myName
 
RTI::InteractionClassHandle myHandle
 
RTI::ParameterHandleSet * myParams
 
RTI::ParameterHandleSet * myOwnParams
 
DtInterClassDescmyBase
 
DtExerciseConnmyExConn
 
bool myNeededFlag
 
bool myPublished
 
bool mySubscribed
 
bool myEverPublished
 
bool myEverSubscribed
 
RTI::ParameterHandle myMinParamHand
 
RTI::ParameterHandle myMaxParamHand
 
int myNumSubscribeRequests
 
DtInteractionTagModifierSP myTagModifier
 
std::set< DtDDMRegionSPmySubscribedRegions
 
DtParameterEncoder myUnknownParameterEncoder
 
DtParameterDecoder myUnknownParameterDecoder
 

Static Protected Attributes

static int theMaxParams
 
static double theSubscriptionTimeDelay
 

Detailed Description

Instances of DtInterClassDesc are used to represent HLA Object and Interaction classes.

Member Typedef Documentation

typedef void(* DtInterClassDesc::DtParameterDecoder)(DtInteractionWithEncDec *inter, const RTI::ParameterHandleValuePairSet &pvlist, int i)
typedef void(* DtInterClassDesc::DtParameterEncoder)(const DtInteractionWithEncDec &inter, RTI::ParameterHandleValuePairSet *avlist, RTI::ParameterHandle handle)

Attribute encoding function declaration.

Constructor & Destructor Documentation

DtInterClassDesc::DtInterClassDesc ( const char *  className,
DtInterClassDesc base,
RTI::InteractionClassHandle  handle,
DtExerciseConn exConn 
)

constructor

virtual DtInterClassDesc::~DtInterClassDesc ( )
virtual

destructor

DtInterClassDesc::DtInterClassDesc ( const DtInterClassDesc orig)
protected

copy constructor – Not Implemented

Member Function Documentation

virtual void DtInterClassDesc::addParam ( const char *  paramName)
virtual

Add a parameter (Used when reading FED file).

const DtInterClassDesc * DtInterClassDesc::baseClass ( ) const
inlinevirtual

Return a pointer to the base class's descriptor, NULL if none.

References myBase.

DtInterClassDesc * DtInterClassDesc::baseClass ( )
inlinevirtual

Return a pointer to the base class's descriptor, NULL if none.

References myBase.

virtual void DtInterClassDesc::enableUnknownParameters ( )
virtual

allows all unknown Parameters to be encoded or decoded in this class.

This is done by setting the unknown Parameter encoder/checker/decoder to the default value if and only if they have not been set yet. The values are: "DtGenericParameterEncoder::encodeGenericParameter" "DtGenericParameterDecoder::decodeGenericParameter"

virtual bool DtInterClassDesc::everPublished ( ) const
virtual

Return true if we have ever published the class using DtInterClassDesc::publish, false otherwise.

virtual bool DtInterClassDesc::everSubscribed ( ) const
virtual

Return true if we have ever subscribed to the class using DtInterClassDesc::subscribe, false otherwise.

virtual DtInterClassDesc* DtInterClassDesc::firstSubscribed ( )
virtual

Return the class descriptor for the first subscribed ancestor including this class.

Null is returned if no ancestor is subscribed.

RTI::InteractionClassHandle DtInterClassDesc::handle ( ) const
inlinevirtual

Get the object's class handle.

References myHandle.

Referenced by DtInteraction::interactionClassHandle().

virtual int DtInterClassDesc::isOfClass ( RTI::InteractionClassHandle  hand) const
virtual

Returns 1 if the class is of class hand or a subclass of hand, 0 otherwise.

int DtInterClassDesc::maxParameters ( )
inlinestatic

References theMaxParams.

const char * DtInterClassDesc::name ( ) const
inlinevirtual

Get the object's class name.

References DtString::c_str(), and myName.

Referenced by DtInteraction::interactionClassName().

virtual bool DtInterClassDesc::neededByFederation ( ) const
virtual

Returns true if the interaction class is needed by the federation false otherwise.

int DtInterClassDesc::numParameters ( ) const
inlinevirtual

Get the number of parameters associated with this object.

References myParams.

Referenced by DtInteraction::numParameters().

DtInterClassDesc& DtInterClassDesc::operator= ( const DtInterClassDesc orig)
protected

assignment operator – Not Implemented

const RTI::ParameterHandleSet & DtInterClassDesc::ownParamHandles ( ) const
inlinevirtual

Get the set of non-inherited parameter handles for this class.

virtual RTI::ParameterHandle DtInterClassDesc::parameterHandleByName ( const char *  paramName)
virtual

Returns the Parameter handle for this Parameter name.

virtual DtString DtInterClassDesc::parameterNameByHandle ( const RTI::ParameterHandle &  hand)
virtual

Returns a string holding the name of the Parameter handle.

const RTI::ParameterHandleSet & DtInterClassDesc::paramHandleSet ( ) const
inlinevirtual

Get the set of valid parameter handles for this class.

Includes parameters inherited from base classes.

virtual void DtInterClassDesc::passiveSubscribe ( )
virtual

Subscribe passively to the class.

virtual void DtInterClassDesc::processStartInters ( RTI::InteractionClassHandle  hand)
protectedvirtual

Callback for handling startInters RTI callback.

virtual void DtInterClassDesc::processStopInters ( RTI::InteractionClassHandle  hand)
protectedvirtual

Callback for handling stopInters RTI callback.

virtual void DtInterClassDesc::publish ( )
virtual

Publish the class, and register start and stopUpdates callbacks.

virtual bool DtInterClassDesc::published ( ) const
virtual

Returns true if the class is published, false otherwise.

virtual DtVrlRtiAmbassador* DtInterClassDesc::rtiAmb ( )
virtual

Get my RTI ambassador.

void DtInterClassDesc::setMaxParameters ( int  num)
inlinestatic

Set/Get maximum number of allowable parameters for an interaction.

References theMaxParams.

void DtInterClassDesc::setSubscriptionTimeDelay ( double  delay)
inlinestatic

Set a time delay to occur after calling RTI::RTIambassador::subscribe() The purpose of this function is to get around a bug in DMSO RTI NG v3.2 for Win98.

If a delay is not used on Win98, DMSO RTI NG may miss subscribe messages and then fail to call discoverObjectInstance() when it's appropriate In most circumstances, you would never want to call this function.

References theSubscriptionTimeDelay.

virtual void DtInterClassDesc::setUnknownParameterDecoder ( DtParameterDecoder  decoder)
virtual

Set a decoder to be called for this object class for any Parameter received in an update that doesn't have a decoder.

virtual void DtInterClassDesc::setUnknownParameterEncoder ( DtParameterEncoder  encoder)
virtual

Set an encoder to be called for this object class for any Parameter that doesn't have an encoder set for it.

virtual void DtInterClassDesc::setUserTagModifier ( DtInteractionTagModifierSP  modifier)
virtual
static void DtInterClassDesc::startIntersCb ( RTI::InteractionClassHandle  hand,
void *  usr 
)
staticprotected

Callback for handling startInters RTI callback.

static void DtInterClassDesc::stopIntersCb ( RTI::InteractionClassHandle  hand,
void *  usr 
)
staticprotected

Callback for handling stopInters RTI callback.

virtual void DtInterClassDesc::subscribe ( )
virtual

Subscribe to the class.

virtual void DtInterClassDesc::subscribe ( DtDDMRegionSP  region)
virtual

Subscribe with region.

virtual bool DtInterClassDesc::subscribed ( ) const
virtual

Returns true if the class is subscribed, false otherwise.

virtual DtParameterDecoder DtInterClassDesc::unknownParameterDecoder ( )
virtual

Returns the unknown Parameter decoder. Returns null if not set.

virtual DtParameterEncoder DtInterClassDesc::unknownParameterEncoder ( )
virtual

Returns the unknown Parameter encoder. Returns null if not set.

virtual void DtInterClassDesc::unpublish ( )
virtual

Unpublish the class, and deregister start and stopUpdates callbacks.

virtual void DtInterClassDesc::unsubscribe ( )
virtual

Unsubscribe to the class.

virtual void DtInterClassDesc::unsubscribe ( DtDDMRegionSP  region)
virtual

Unsubscribe to the class with region.

virtual DtInteractionTagModifierSP DtInterClassDesc::userTagModifier ( )
virtual

Member Data Documentation

DtInterClassDesc* DtInterClassDesc::myBase
protected

Referenced by baseClass().

bool DtInterClassDesc::myEverPublished
protected
bool DtInterClassDesc::myEverSubscribed
protected
DtExerciseConn* DtInterClassDesc::myExConn
protected
RTI::InteractionClassHandle DtInterClassDesc::myHandle
protected

Referenced by handle().

RTI::ParameterHandle DtInterClassDesc::myMaxParamHand
protected
RTI::ParameterHandle DtInterClassDesc::myMinParamHand
protected
DtString DtInterClassDesc::myName
protected

Referenced by name().

bool DtInterClassDesc::myNeededFlag
protected
int DtInterClassDesc::myNumSubscribeRequests
protected
RTI::ParameterHandleSet* DtInterClassDesc::myOwnParams
protected
RTI::ParameterHandleSet* DtInterClassDesc::myParams
protected

Referenced by numParameters().

bool DtInterClassDesc::myPublished
protected
bool DtInterClassDesc::mySubscribed
protected
std::set<DtDDMRegionSP> DtInterClassDesc::mySubscribedRegions
protected
DtInteractionTagModifierSP DtInterClassDesc::myTagModifier
protected
DtParameterDecoder DtInterClassDesc::myUnknownParameterDecoder
protected
DtParameterEncoder DtInterClassDesc::myUnknownParameterEncoder
protected
int DtInterClassDesc::theMaxParams
staticprotected

Referenced by maxParameters(), and setMaxParameters().

double DtInterClassDesc::theSubscriptionTimeDelay
staticprotected

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

Document ID: Generated on Tue Feb 2 21:02:17 EST 2021 from SVN revision 223668
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)