MAK RTIspy API Documentation for HLA 1516
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Classes | Macros
rtiTemplateMsgInetAddrParams.h File Reference

This file contains template specializations for the DtRtiMsgParam and DtRtiArrayMsgParam template classes to handle DtInetAddr parameters and arrays of DtInetAddrs. More...

Go to the source code of this file.

Classes

class  DtRtiMsgParam< MAKRti::DtInetAddr, MAKRti::DtNetU128 >
 Template specialization for DtInetAddr message parameters. More...
 
class  DtRtiArrayMsgParam< MAKRti::DtInetAddr, MAKRti::DtU128, MAKRti::DtNetU128, AllocatedMsgParamType >
 Template specialization for an RTI message parameter which is an array of DtInetAddrs. More...
 

Macros

#define DtDECLARE_INET_ADDR_PARAMETER_METHODS(ParamName)
 
#define DtDECLARE_INET_ADDR_ARRAY_PARAMETER_METHODS(ParamName, CountBitSize)
 
#define DtDEFINE_INET_ADDR_PARAMETER_METHODS(ClassName, ParamName)   DtDEFINE_BY_REF_PARAMETER_METHODS(ClassName, ParamName, MAKRti::DtInetAddr)
 
#define DtDEFINE_INET_ADDR_ARRAY_PARAMETER_CONTAINER_METHODS(ClassName, ParamName, CtrType)
 
#define DtDEFINE_INET_ADDR_ARRAY_PARAMETER_METHODS(ClassName, ParamName)
 
#define DtADD_INET_ADDR_PARAMETER(ParamName, FamilyParamName)   addParameter(my##ParamName = new ParamName##Type(ParamName##Name, my##FamilyParamName));
 
#define DtADD_INET_ADDR_ARRAY_PARAMETER(ParamName, SizeParamName, FamilyParamName)   addParameter(my##ParamName = new ParamName##Type(ParamName##Name, my##SizeParamName, my##FamilyParamName));
 

Detailed Description

This file contains template specializations for the DtRtiMsgParam and DtRtiArrayMsgParam template classes to handle DtInetAddr parameters and arrays of DtInetAddrs.

It also defines easy macros to make creating a new message simpler. See rtiTemplateMsgParams.h for the template and macros for simple types and rtiTemplateMsgArrayParams.h for the templates and macros for array types.

Macro Definition Documentation

#define DtADD_INET_ADDR_ARRAY_PARAMETER (   ParamName,
  SizeParamName,
  FamilyParamName 
)    addParameter(my##ParamName = new ParamName##Type(ParamName##Name, my##SizeParamName, my##FamilyParamName));
#define DtADD_INET_ADDR_PARAMETER (   ParamName,
  FamilyParamName 
)    addParameter(my##ParamName = new ParamName##Type(ParamName##Name, my##FamilyParamName));
#define DtDECLARE_INET_ADDR_ARRAY_PARAMETER_METHODS (   ParamName,
  CountBitSize 
)
Value:
DtDECLARE_ARRAY_PARAMETER_METHODS(ParamName, MAKRti::DtInetAddr) \
protected: \
typedef DtRtiArrayMsgParam<MAKRti::DtInetAddr, MAKRti::DtU128, MAKRti::DtNetU128, \
DtRtiMsgParam<MAKRti::DtU##CountBitSize, MAKRti::DtNetU##CountBitSize> > ParamName##Type; \
ParamName##Type* my##ParamName;
#define DtDECLARE_ARRAY_PARAMETER_METHODS(ParamName, ParamType)
Definition: rtiTemplateMsgArrayParams.h:551
The template for an RTI message parameter which is actually an array of items of the same type...
Definition: rtiTemplateMsgArrayParams.h:92
#define DtDECLARE_INET_ADDR_PARAMETER_METHODS (   ParamName)
Value:
DtDECLARE_BY_REF_PARAMETER_METHODS(ParamName, MAKRti::DtInetAddr) \
protected: \
ParamName##Type* my##ParamName;
#define DtDECLARE_BY_REF_PARAMETER_METHODS(ParamName, ParamType)
Definition: rtiTemplateMsgParams.h:195
Template specialization for DtInetAddr message parameters.
Definition: rtiTemplateMsgInetAddrParams.h:26
#define DtDEFINE_INET_ADDR_ARRAY_PARAMETER_CONTAINER_METHODS (   ClassName,
  ParamName,
  CtrType 
)
Value:
void ClassName::set##ParamName(const CtrType& container, \
DtResizeArrayFlag resizeFlag) \
{ \
unsigned currNum = my##ParamName->numItems(); \
if(resizeFlag == DtResizeIfNeeded && container.size() != currNum) \
{ \
unsigned currSize = currNum * sizeof(MAKRti::DtNetU128); \
unsigned newSize = container.size() * sizeof(MAKRti::DtNetU128); \
char* begPtr = static_cast<char*>(my##ParamName->beginPtr()); \
if(newSize > currSize) \
{ \
insertBytes(begPtr + currSize, newSize - currSize); \
} \
else if(currSize > newSize) \
{ \
deleteBytes(begPtr + newSize, currSize - newSize); \
} \
my##ParamName->setNumItems(container.size()); \
} \
my##ParamName->setParams(container); \
} \
void ClassName::get##ParamName(CtrType& container) const \
{ \
my##ParamName->getParams(container); \
}
DtResizeArrayFlag
Definition: rtiTemplateMsgArrayParams.h:492
Definition: rtiTemplateMsgArrayParams.h:495
void insertBytes(std::vector< Octet > &wrapper, size_t length)
Insert bytes into the octet buffer.
Definition: encodingImplHelpers.h:125
#define DtDEFINE_INET_ADDR_ARRAY_PARAMETER_METHODS (   ClassName,
  ParamName 
)
Value:
const char* ClassName::ParamName##Name = #ParamName; \
DtDEFINE_INET_ADDR_ARRAY_PARAMETER_CONTAINER_METHODS(ClassName, ParamName, std::set<MAKRti::DtInetAddr>) \
DtDEFINE_INET_ADDR_ARRAY_PARAMETER_CONTAINER_METHODS(ClassName, ParamName, std::vector<MAKRti::DtInetAddr>) \
DtDEFINE_INET_ADDR_ARRAY_PARAMETER_CONTAINER_METHODS(ClassName, ParamName, std::list<MAKRti::DtInetAddr>) \
DtDEFINE_INET_ADDR_ARRAY_PARAMETER_CONTAINER_METHODS(ClassName, ParamName, std::deque<MAKRti::DtInetAddr>) \
void ClassName::set##ParamName(const MAKRti::DtInetAddr* buff, \
unsigned num, DtResizeArrayFlag resizeFlag) \
{ \
unsigned currNum = my##ParamName->numItems(); \
if(resizeFlag == DtResizeIfNeeded && num != currNum) \
{ \
unsigned currSize = currNum * sizeof(MAKRti::DtNetU128); \
unsigned newSize = num * sizeof(MAKRti::DtNetU128); \
char* begPtr = static_cast<char*>(my##ParamName->beginPtr()); \
if(newSize > currSize) \
{ \
insertBytes(begPtr + currSize, newSize - currSize); \
} \
else if(currSize > newSize) \
{ \
deleteBytes(begPtr + newSize, currSize - newSize); \
} \
my##ParamName->setNumItems(num); \
} \
my##ParamName->setParams(buff, num); \
} \
unsigned ClassName::get##ParamName(MAKRti::DtInetAddr* buff) const \
{ \
return my##ParamName->getParams(buff); \
}
DtResizeArrayFlag
Definition: rtiTemplateMsgArrayParams.h:492
Definition: rtiTemplateMsgArrayParams.h:495
#define DtDEFINE_INET_ADDR_ARRAY_PARAMETER_CONTAINER_METHODS(ClassName, ParamName, CtrType)
Definition: rtiTemplateMsgInetAddrParams.h:385
void insertBytes(std::vector< Octet > &wrapper, size_t length)
Insert bytes into the octet buffer.
Definition: encodingImplHelpers.h:125
#define DtDEFINE_INET_ADDR_PARAMETER_METHODS (   ClassName,
  ParamName 
)    DtDEFINE_BY_REF_PARAMETER_METHODS(ClassName, ParamName, MAKRti::DtInetAddr)

Document ID: Generated on Wed Jul 8 16:20:32 EDT 2026 from SVN revision 291616
Copyright © 2005-2025 MAK Technologies Inc. All Rights Reserved (www.mak.com)