]> git.mxchange.org Git - simgear.git/blobdiff - simgear/hla/HLAObjectInstance.hxx
scenery: Use correct property root in xml loading.
[simgear.git] / simgear / hla / HLAObjectInstance.hxx
index 1262d6dee0c48bd35006afa5df5b65b61a6c1899..b84038bc97021f2958ae342745b4f188eabce985 100644 (file)
@@ -35,17 +35,18 @@ class HLAObjectClass;
 
 class HLAObjectInstance : public SGWeakReferenced {
 public:
-    HLAObjectInstance(HLAObjectClass* objectClass);
+    HLAObjectInstance(HLAObjectClass* objectClass = 0);
     virtual ~HLAObjectInstance();
 
     /// Return the name of this object instance
-    const std::string& getName() const
-    { return _name; }
+    const std::string& getName() const;
+
+    /// return the federate this instance belongs to
+    const SGWeakPtr<HLAFederate>& getFederate() const;
 
     /// Return the object class of this instance.
     /// Should always return a valid object class.
-    const SGSharedPtr<HLAObjectClass>& getObjectClass() const
-    { return _objectClass; }
+    const SGSharedPtr<HLAObjectClass>& getObjectClass() const;
 
     /// Return the number of attributes
     unsigned getNumAttributes() const;
@@ -55,7 +56,8 @@ public:
     /// Return the attribute name for the attribute with the given index
     std::string getAttributeName(unsigned index) const;
 
-    /// Return true if the attribute with the given index is owned by this federate
+    /// Return true if the attribute with the given index is owned by
+    /// this federate
     bool getAttributeOwned(unsigned index) const;
 
     /// Return the data type of the attribute with the given index
@@ -65,7 +67,8 @@ public:
     HLADataElement* getAttributeDataElement(unsigned index);
     const HLADataElement* getAttributeDataElement(unsigned index) const;
 
-    /// Write the raw attribute data value into data, works only of the object is backed up with an rti object instance
+    /// Write the raw attribute data value into data, works only of the object
+    /// is backed up with an rti object instance
     bool getAttributeData(unsigned index, RTIData& data) const;
 
     /// Sets the data element of the attribute with the given index to dataElement
@@ -75,6 +78,7 @@ public:
     void setAttributes(const HLAAttributePathElementMap& attributePathElementMap);
 
     void registerInstance();
+    void registerInstance(HLAObjectClass* objectClass);
     void deleteInstance(const RTIData& tag);
 
     // Push the current values into the RTI
@@ -156,7 +160,6 @@ private:
     struct Attribute {
         Attribute() : _enabledUpdate(false), _unconditionalUpdate(false) {}
         SGSharedPtr<HLADataElement> _dataElement;
-        // SGSharedPtr<HLADataElement::TimeStamp> _timeStamp;
         bool _enabledUpdate;
         bool _unconditionalUpdate;
         // HLAIndexList::iterator _unconditionalUpdateAttributeIndexListIterator;