bool readObjectModelTemplate(const std::string& objectModel,
ObjectModelFactory& objectModelFactory);
+ /// Get the object class of a given name
HLAObjectClass* getObjectClass(const std::string& name);
const HLAObjectClass* getObjectClass(const std::string& name) const;
+ /// Get the interaction class of a given name
HLAInteractionClass* getInteractionClass(const std::string& name);
const HLAInteractionClass* getInteractionClass(const std::string& name) const;
}
}
-void
-HLAObjectInstance::requestAttributeUpdate(unsigned index)
-{
- if (!_rtiObjectInstance.valid()) {
- SG_LOG(SG_IO, SG_ALERT, "Trying to request attribute update for inactive object!");
- return;
- }
- _rtiObjectInstance->setRequestAttributeUpdate(index, true);
-}
-
-void
-HLAObjectInstance::requestAttributeUpdate()
-{
- if (!_rtiObjectInstance.valid()) {
- SG_LOG(SG_IO, SG_ALERT, "Trying to request attribute update for inactive object!");
- return;
- }
- _rtiObjectInstance->setRequestAttributeUpdate(true);
-}
-
void
HLAObjectInstance::registerInstance()
{
_rtiObjectInstance->deleteObjectInstance(tag);
}
-void
-HLAObjectInstance::localDeleteInstance()
-{
- if (!_rtiObjectInstance.valid()) {
- SG_LOG(SG_IO, SG_ALERT, "Trying to delete inactive object!");
- return;
- }
- _rtiObjectInstance->localDeleteObjectInstance();
-}
-
void
HLAObjectInstance::updateAttributeValues(const RTIData& tag)
{
_rtiObjectInstance->updateAttributeValues(timeStamp, tag);
}
-void
-HLAObjectInstance::reflectQueuedAttributeValues(const SGTimeStamp& timeStamp)
-{
- if (!_rtiObjectInstance.valid()) {
- SG_LOG(SG_IO, SG_INFO, "Not updating inactive object!");
- return;
- }
- _rtiObjectInstance->reflectQueuedAttributeValues(timeStamp);
-}
-
void
HLAObjectInstance::removeInstance(const RTIData& tag)
{
void setAttribute(unsigned index, const HLAPathElementMap& pathElementMap);
void setAttributes(const HLAAttributePathElementMap& attributePathElementMap);
- // Ask the rti to provide the attribute at index
- void requestAttributeUpdate(unsigned index);
- void requestAttributeUpdate();
-
void registerInstance();
void deleteInstance(const RTIData& tag);
- void localDeleteInstance();
class AttributeCallback : public SGReferenced {
public:
void updateAttributeValues(const RTIData& tag);
void updateAttributeValues(const SGTimeStamp& timeStamp, const RTIData& tag);
- // Retrieve queued up updates up to and including timestamp,
- // Note that this only applies to timestamped updates.
- // The unordered updates are reflected as they arrive
- void reflectQueuedAttributeValues(const SGTimeStamp& timeStamp);
-
private:
void removeInstance(const RTIData& tag);
void reflectAttributeValues(const RTIIndexDataPairList& dataPairList, const RTIData& tag);