#if DtHLA
myNum(0),
myVec()
{
}
{
}
{
}
{
if (this == &orig)
{
return *this;
}
return *this;
}
{
return "TestSimpleInteraction";
}
{
}
#if DtHLA_1516
#else
#endif
{
#if DtHLA_1516
static RTI::ParameterHandleValueMap thePvMap;
thePvMap.clear();
if (!exerciseConn())
{
DtInfo <<
"Illegal call to TestSimpleInteraction::phvps.\n"
<< "Must call setExConn first." << std::endl;
return thePvMap;
}
RTI::ParameterHandle numberHandle =
exerciseConn()->rtiAmb()->getParameterHandle(
interactionClassHandle(), L"Number");
RTI::ParameterHandle vectorHandle =
exerciseConn()->rtiAmb()->getParameterHandle(
interactionClassHandle(), L"Vector");
thePvMap[numberHandle].setData((char *) &netNum, sizeof(netNum));
thePvMap[vectorHandle].setData((char *) &netVec, sizeof(netVec));
return thePvMap;
#else
if (!thePvSet)
{
thePvSet = RTI::ParameterSetFactory::create(numParameters());
}
if (!exerciseConn())
{
DtInfo <<
"Illegal call to TestSimpleInteraction::phvps.\n"
<< "Must call setExConn first." << std::endl;
return *thePvSet;
}
RTI::ParameterHandle numberHandle =
exerciseConn()->rtiAmb()->getParameterHandle("Number",
interactionClassHandle());
RTI::ParameterHandle vectorHandle =
exerciseConn()->rtiAmb()->getParameterHandle("Vector",
interactionClassHandle());
thePvSet->
add(numberHandle, (
char*) &netNum,
sizeof(netNum));
thePvSet->
add(vectorHandle, (
char*) &netVec,
sizeof(netVec));
return *thePvSet;
#endif
}
#if DtHLA_1516
const RTI::ParameterHandleValueMap& pvMap)
#else
void TestSimpleInteraction::setFromPhvps(
#endif
{
if (!exerciseConn())
{
DtInfo <<
"Illegal call to TestSimpleInteraction::setFromPhvps.\n"
<< "Must call setExConn first." << std::endl;
return;
}
#if DtHLA_1516
RTI::ParameterHandle numberHandle =
exerciseConn()->rtiAmb()->getParameterHandle(
interactionClassHandle(), L"Number");
RTI::ParameterHandle vectorHandle =
exerciseConn()->rtiAmb()->getParameterHandle(
interactionClassHandle(), L"Vector");
RTI::ParameterHandleValueMap::const_iterator pos = pvMap.find(numberHandle);
if (pos != pvMap.end())
{
setNumber((int)*netNum);
}
pos = pvMap.find(vectorHandle);
if (pos != pvMap.end())
{
}
#else
RTI::ParameterHandle numberHandle =
exerciseConn()->rtiAmb()->getParameterHandle("Number",
interactionClassHandle());
RTI::ParameterHandle vectorHandle =
exerciseConn()->rtiAmb()->getParameterHandle("Vector",
interactionClassHandle());
for (index = 0; index < pvSet.
size(); index++)
{
RTI::ParameterHandle currentHandle = pvSet.
getHandle(index);
if (currentHandle == numberHandle)
{
pvSet.
getValue(index, (
char*) &netNum, length);
setNumber((int)netNum);
}
else if (currentHandle == vectorHandle)
{
pvSet.
getValue(index, (
char*) &netVec, length);
}
}
#endif
}
{
}
{
}
{
}
{
}
{
}
{
#if DtHLA_1516
#else
#endif
}
{
}
{
return "Test";
}
#endif