VR-Link API Documentation for HLA 1.3
Public Member Functions | Protected Attributes
DtInteractionWithData Class Reference

class DtInteractionWithData: More...

+ Inheritance diagram for DtInteractionWithData:
+ Collaboration diagram for DtInteractionWithData:

List of all members.

Public Member Functions

 DtInteractionWithData ()
 default constructor
virtual ~DtInteractionWithData ()
 destructor
 DtInteractionWithData (const DtInteractionWithData &orig)
 copy constructor
DtInteractionWithDataoperator= (const DtInteractionWithData &orig)
 assignment operator
virtual void printData () const
 Print the interaction's data to DtInfo.
virtual void printDataToStream (std::ostream &stream) const
 Print the interaction's data to the specified stream.
virtual int numFixedFields () const
virtual int numVarFields () const
 Returns number of variable length fields.
virtual DtDatumParam varDatumId (int index) const
 Returns the datum param found in the index'th variable datum record.
virtual void setVarDatumId (int index, DtDatumParam id, DtDatumRetCode *retcode=0)
virtual DtDatumParam fixedDatumId (int index) const
 Returns the datum param found in the index'th fixed datum record.
virtual void setFixedDatumId (int index, DtDatumParam id, DtDatumRetCode *retcode=0)
virtual DtDatumParam datumId (DtDatumRecordType fixedOrVar, int index) const
 Returns the datum param found in the index'th fixed or variable datum record, depending on whether fixedOrVar is DtFixed or DtVar.
virtual int datumSizeBits (DtDatumRecordType fixedOrVar, int index) const
 Returns the number of bits of data contained in the value fields of the index'th fixed or variable datum record, depending on whether fixedOrVar is DtFixed or DtVar.
virtual int datumSizeBytes (DtDatumRecordType fixedOrVar, int index) const
 Returns the number of bytes of data contained in the value fields of the index'th fixed or variable datum record, depending on whether fixedOrVar is DtFixed or DtVar.
virtual void getIndex (DtDatumParam param, DtDatumRecordType *fixedOrVar, int *index, DtDatumRetCode *retcode=0) const
 Looks through all fixed and variable records for one containing param as the parameter ID.
virtual DtFloat32 datumValFloat32 (DtDatumRecordType fixedOrVar, int index, DtDatumRetCode *retcode=0) const
 ******* INSPECTING DATUM VALUES BY INDEX ********* If you know the data type of the value contained in a particular record, use one of the following to return it.
virtual DtFloat64 datumValFloat64 (DtDatumRecordType fixedOrVar, int index, DtDatumRetCode *retcode=0) const
virtual unsigned long datumValUnsigned32 (DtDatumRecordType fixedOrVar, int index, DtDatumRetCode *retcode=0) const
virtual long datumValInt32 (DtDatumRecordType fixedOrVar, int index, DtDatumRetCode *retcode=0) const
virtual const char * datumValByteArray (DtDatumRecordType fixedOrVar, int index) const
virtual DtFloat32 datumValFloat32 (DtDatumParam param, DtDatumRetCode *retcode=0) const
 ******* INSPECTING DATUM VALUES BY PARAM ID ********* If you know the data type of the value contained in a particular record, use one of the following to return it.
virtual DtFloat64 datumValFloat64 (DtDatumParam param, DtDatumRetCode *retcode=0) const
virtual unsigned long datumValUnsigned32 (DtDatumParam param, DtDatumRetCode *retcode=0) const
virtual long datumValInt32 (DtDatumParam param, DtDatumRetCode *retcode=0) const
virtual const char * datumValByteArray (DtDatumParam param, DtDatumRetCode *retcode=0) const
virtual void initDataSection (const DtDatumParam *fixedParams, const DtVarDatumSpec *specList)
 ****************** MUTATOR FUNCTIONS ******************
virtual void setNumFixedFields (int newNum)
 Sets the number of fixed or variable fields to newNum.
virtual void setNumVarFields (int newNum)
virtual void setDatumParam (DtDatumRecordType fixedOrVar, int index, DtDatumParam param, DtDatumRetCode *retcode=0)
 Set the datum ID in the index'th fixed or variable datum record to param, depending on whether fixedOrVar is DtFixed or DtVar.
virtual void setVarDataBytes (int index, int length, DtDatumRetCode *retcode=0)
 Allocates length bytes for the index'th variable datum record.
virtual void setDatumValFloat64 (DtDatumRecordType fixedOrVar, int index, DtFloat64 val, DtDatumRetCode *retcode=0)
 ******* SETTING DATA VALUES BY INDEX ********* Use one of the following to set the data value in a fixed or variable datum record, depending on the data type of your data.
virtual void setDatumValFloat32 (DtDatumRecordType fixedOrVar, int index, DtFloat32 val, DtDatumRetCode *retcode=0)
virtual void setDatumValInt32 (DtDatumRecordType fixedOrVar, int index, long val, DtDatumRetCode *retcode=0)
virtual void setDatumValUnsigned32 (DtDatumRecordType fixedOrVar, int index, unsigned long val, DtDatumRetCode *retcode=0)
virtual void setDatumValByteArray (DtDatumRecordType fixedOrVar, int index, const char *val, DtDatumRetCode *retcode=0)
virtual void setDatumValFloat64 (DtDatumParam param, DtFloat64 val, DtDatumRetCode *retcode=0)
 ****** SETTING DATA VALUES BY PARAM ID ********* Use one of the following to set the data value in a fixed or variable datum record, depending on the data type of your data.
virtual void setDatumValFloat32 (DtDatumParam param, DtFloat32 val, DtDatumRetCode *retcode=0)
virtual void setDatumValInt32 (DtDatumParam param, long val, DtDatumRetCode *retcode=0)
virtual void setDatumValUnsigned32 (DtDatumParam param, unsigned long val, DtDatumRetCode *retcode=0)
virtual void setDatumValByteArray (DtDatumParam param, const char *val, DtDatumRetCode *retcode=0)
virtual DtDatumRecordSetdatumRecSet ()
 Return the DtDatumRecordSet which an InteractionWithData uses to store its fixed and var records.
virtual const DtDatumRecordSetdatumRecSet () const

Protected Attributes

DtDatumRecordSet myRecSet

Detailed Description

class DtInteractionWithData:

Instances of DtInteractionWithData are used to represent RPR FOM Interactions that use fixed and var datum records.


Constructor & Destructor Documentation

default constructor

destructor

copy constructor


Member Function Documentation

virtual DtDatumParam DtInteractionWithData::datumId ( DtDatumRecordType  fixedOrVar,
int  index 
) const [virtual]

Returns the datum param found in the index'th fixed or variable datum record, depending on whether fixedOrVar is DtFixed or DtVar.

Index is between 1 and numRecords. Returns DtDatumParam(0) if index is out of bounds.

Return the DtDatumRecordSet which an InteractionWithData uses to store its fixed and var records.

In general, the wrapper functions above should be used rather than going directly through the DtDatumRecordSet, which is necessary only when doing encoding and decoding of network representations.

virtual const DtDatumRecordSet* DtInteractionWithData::datumRecSet ( ) const [virtual]
virtual int DtInteractionWithData::datumSizeBits ( DtDatumRecordType  fixedOrVar,
int  index 
) const [virtual]

Returns the number of bits of data contained in the value fields of the index'th fixed or variable datum record, depending on whether fixedOrVar is DtFixed or DtVar.

If DtFixed, the answer is always 32.

virtual int DtInteractionWithData::datumSizeBytes ( DtDatumRecordType  fixedOrVar,
int  index 
) const [virtual]

Returns the number of bytes of data contained in the value fields of the index'th fixed or variable datum record, depending on whether fixedOrVar is DtFixed or DtVar.

If DtFixed, the answer is always 4.

virtual const char* DtInteractionWithData::datumValByteArray ( DtDatumRecordType  fixedOrVar,
int  index 
) const [virtual]
virtual const char* DtInteractionWithData::datumValByteArray ( DtDatumParam  param,
DtDatumRetCode retcode = 0 
) const [virtual]
virtual DtFloat32 DtInteractionWithData::datumValFloat32 ( DtDatumRecordType  fixedOrVar,
int  index,
DtDatumRetCode retcode = 0 
) const [virtual]

******* INSPECTING DATUM VALUES BY INDEX ********* If you know the data type of the value contained in a particular record, use one of the following to return it.

fixedOrVar (either DtFixed or DtVar) and index (between 1 and numRecords) indicate which record you are inspecting. datumValBytesArray is used when the data type is a character string, or something other than a long, unsigned long, float or double. It returns a pointer to a character string containing the exact bytes in the network representation that represents the value being inspected. The supplied retcode pointer will be filled with DtDatumValid if the value was successfully inspected, and DtDatumBadLength if either the index was invalid, or the size of the data indicated that it could not be interpreted as the chosen data type.

virtual DtFloat32 DtInteractionWithData::datumValFloat32 ( DtDatumParam  param,
DtDatumRetCode retcode = 0 
) const [virtual]

******* INSPECTING DATUM VALUES BY PARAM ID ********* If you know the data type of the value contained in a particular record, use one of the following to return it.

The particular record inspected will be the first one containing param as the datum ID. datumValByteArray is used when the data type is a character string, or something other than a long, unsigned long, float or double. It returns a pointer to a character string containing the exact bytes in the network representation that represents the value being inspected. The supplied retcode pointer will be filled with DtDatumValid if the value was successfully inspected, and DtDatumBadLength if either param was not found, or the size of the data indicated that it could not be interpreted as the chosen data type.

virtual DtFloat64 DtInteractionWithData::datumValFloat64 ( DtDatumRecordType  fixedOrVar,
int  index,
DtDatumRetCode retcode = 0 
) const [virtual]
virtual DtFloat64 DtInteractionWithData::datumValFloat64 ( DtDatumParam  param,
DtDatumRetCode retcode = 0 
) const [virtual]
virtual long DtInteractionWithData::datumValInt32 ( DtDatumRecordType  fixedOrVar,
int  index,
DtDatumRetCode retcode = 0 
) const [virtual]
virtual long DtInteractionWithData::datumValInt32 ( DtDatumParam  param,
DtDatumRetCode retcode = 0 
) const [virtual]
virtual unsigned long DtInteractionWithData::datumValUnsigned32 ( DtDatumRecordType  fixedOrVar,
int  index,
DtDatumRetCode retcode = 0 
) const [virtual]
virtual unsigned long DtInteractionWithData::datumValUnsigned32 ( DtDatumParam  param,
DtDatumRetCode retcode = 0 
) const [virtual]
virtual DtDatumParam DtInteractionWithData::fixedDatumId ( int  index) const [virtual]

Returns the datum param found in the index'th fixed datum record.

Index is between 1 and numRecords. Returns DtDatumParam(0) if index is out of bounds.

virtual void DtInteractionWithData::getIndex ( DtDatumParam  param,
DtDatumRecordType fixedOrVar,
int *  index,
DtDatumRetCode retcode = 0 
) const [virtual]

Looks through all fixed and variable records for one containing param as the parameter ID.

If it finds one, fills supplied fixedOrVar pointer with DtFixed or DtVar, and index with the index to indicate which record was found, and fills retcode with DtDatumValid. If param was not found, retcode is filled with DtDatumBadId, and index and fixedOrVar are invalid.

virtual void DtInteractionWithData::initDataSection ( const DtDatumParam fixedParams,
const DtVarDatumSpec specList 
) [virtual]

****************** MUTATOR FUNCTIONS ******************

Initialize to reflect the fixed parameters and variable parameters and sizes indicated. fixedParams is a NULL- terminated array of DtDatumParams. specList is an array of DtVarDatumSpecs terminated with the DtNullVarDatumSpec constant. This call can be made instead of calls to setNumVarDatumRecords, setNumFixedDatumRecord, and repeated calls to setDatumParam and setVarDataBytes.

virtual int DtInteractionWithData::numFixedFields ( ) const [virtual]
virtual int DtInteractionWithData::numVarFields ( ) const [virtual]

Returns number of variable length fields.

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

assignment operator

virtual void DtInteractionWithData::printData ( ) const [virtual]
virtual void DtInteractionWithData::printDataToStream ( std::ostream &  stream) const [virtual]

Print the interaction's data to the specified stream.

Reimplemented from DtInteraction.

Reimplemented in DtDataInteraction, DtEventReportInteraction, DtCommentInteraction, DtActionResponseInteraction, DtSetDataInteraction, and DtActionRequestInteraction.

virtual void DtInteractionWithData::setDatumParam ( DtDatumRecordType  fixedOrVar,
int  index,
DtDatumParam  param,
DtDatumRetCode retcode = 0 
) [virtual]

Set the datum ID in the index'th fixed or variable datum record to param, depending on whether fixedOrVar is DtFixed or DtVar.

Supplied retcode pointer is filled with DtDatumValid if successful, or DtDatumBadIndex if the index is not valid.

virtual void DtInteractionWithData::setDatumValByteArray ( DtDatumRecordType  fixedOrVar,
int  index,
const char *  val,
DtDatumRetCode retcode = 0 
) [virtual]
virtual void DtInteractionWithData::setDatumValByteArray ( DtDatumParam  param,
const char *  val,
DtDatumRetCode retcode = 0 
) [virtual]
virtual void DtInteractionWithData::setDatumValFloat32 ( DtDatumRecordType  fixedOrVar,
int  index,
DtFloat32  val,
DtDatumRetCode retcode = 0 
) [virtual]
virtual void DtInteractionWithData::setDatumValFloat32 ( DtDatumParam  param,
DtFloat32  val,
DtDatumRetCode retcode = 0 
) [virtual]
virtual void DtInteractionWithData::setDatumValFloat64 ( DtDatumRecordType  fixedOrVar,
int  index,
DtFloat64  val,
DtDatumRetCode retcode = 0 
) [virtual]

******* SETTING DATA VALUES BY INDEX ********* Use one of the following to set the data value in a fixed or variable datum record, depending on the data type of your data.

fixedOrVar (either DtFixed or DtVar) and index (between 1 and numRecords) indicate which record you are modifying. setDatumValBytesArray is used when the data type is a character string, or something other than a long, unsigned long, float or double. It takes a pointer to a character string containing the exact bytes that should be used in the network representation. The supplied retcode pointer will be filled with DtDatumValid if the value was successfully set, DtDatumBadIndex if the index is invalid, and DtDatumBadLength if the size of the data indicated that it could not be set from as the chosen data type.

virtual void DtInteractionWithData::setDatumValFloat64 ( DtDatumParam  param,
DtFloat64  val,
DtDatumRetCode retcode = 0 
) [virtual]

****** SETTING DATA VALUES BY PARAM ID ********* Use one of the following to set the data value in a fixed or variable datum record, depending on the data type of your data.

The particular record modified will be the first one containing param as its parameter ID. setDatumValBytesArray is used when the data type is a character string, or something other than a long, unsigned long, float or double. It takes a pointer to a character string containing the exact bytes that should be used in the network representation. The supplied retcode pointer will be filled with DtDatumValid if the value was successfully set, DtDatumBadId if param is invalid, and DtDatumBadLength if the size of the data indicated that it could not be set from the chosen data type.

virtual void DtInteractionWithData::setDatumValInt32 ( DtDatumRecordType  fixedOrVar,
int  index,
long  val,
DtDatumRetCode retcode = 0 
) [virtual]
virtual void DtInteractionWithData::setDatumValInt32 ( DtDatumParam  param,
long  val,
DtDatumRetCode retcode = 0 
) [virtual]
virtual void DtInteractionWithData::setDatumValUnsigned32 ( DtDatumRecordType  fixedOrVar,
int  index,
unsigned long  val,
DtDatumRetCode retcode = 0 
) [virtual]
virtual void DtInteractionWithData::setDatumValUnsigned32 ( DtDatumParam  param,
unsigned long  val,
DtDatumRetCode retcode = 0 
) [virtual]
virtual void DtInteractionWithData::setFixedDatumId ( int  index,
DtDatumParam  id,
DtDatumRetCode retcode = 0 
) [virtual]
virtual void DtInteractionWithData::setNumFixedFields ( int  newNum) [virtual]

Sets the number of fixed or variable fields to newNum.

Previously existing fixed fields with indices greater than newNum are deleted. If newNum exceeds the number of existing fields, trailing new fields are created with zeros as datum params, sizes (for var only) and values.

virtual void DtInteractionWithData::setNumVarFields ( int  newNum) [virtual]
virtual void DtInteractionWithData::setVarDataBytes ( int  index,
int  length,
DtDatumRetCode retcode = 0 
) [virtual]

Allocates length bytes for the index'th variable datum record.

Should be called before using one of the setDatumVal functions to actually set the data. Supplied retcode pointer is set to DtDatumValid if successful, or DtDatumBadIndex if the index is not valid.

virtual void DtInteractionWithData::setVarDatumId ( int  index,
DtDatumParam  id,
DtDatumRetCode retcode = 0 
) [virtual]
virtual DtDatumParam DtInteractionWithData::varDatumId ( int  index) const [virtual]

Returns the datum param found in the index'th variable datum record.

Index is between 1 and numRecords. Returns DtDatumParam(0) if index is out of bounds.


Member Data Documentation


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

Document ID: Generated on Mon May 14 08:06:18 EDT 2012 from SVN revision 114750
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)