void HwFederateAmbassador::reflectAttributeValues ( RTI::ObjectHandle theObject, // supplied C1 const RTI::AttributeHandleValuePairSet& theAttributes, // supplied C4 const char *theTag) // supplied C4 throw ( RTI::ObjectNotKnown, RTI::AttributeNotKnown, RTI::FederateOwnsAttributes, RTI::FederateInternalError) { //----------------------------------------------------------------- // Find the Country instance this update is for. If we can't find // it then I am getting data I didn't ask for. //----------------------------------------------------------------- Country *pCountry = Country::Find( theObject ); if ( pCountry ) { //----------------------------------------------------------------- // Set the new attribute values in this country instance. //----------------------------------------------------------------- pCountry->Update( theAttributes ); RTI::FedTime * zero_time = RTI::FedTimeFactory::makeZero(); pCountry->SetLastTime(*zero_time ); delete zero_time; } }
void HwFederateAmbassador::reflectAttributeValues ( RTI::ObjectHandle theObject, // supplied C1 const RTI::AttributeHandleValuePairSet& theAttributes, // supplied C4 const RTI::FedTime& theTime, // supplied C1 const char *theTag, // supplied C4 RTI::EventRetractionHandle theHandle) // supplied C1 throw ( RTI::ObjectNotKnown, RTI::AttributeNotKnown, RTI::FederateOwnsAttributes, RTI::InvalidFederationTime, RTI::FederateInternalError) { //----------------------------------------------------------------- // Find the Country instance this update is for. If we can't find // it then I am getting data I didn't ask for. //----------------------------------------------------------------- Country *pCountry = Country::Find( theObject ); if ( pCountry ) { //----------------------------------------------------------------- // Set the new attribute values in this country instance. //----------------------------------------------------------------- pCountry->Update( theAttributes ); pCountry->SetLastTime( theTime ); } else throw RTI::ObjectNotKnown("received reflection for unknown OID"); }