+ // By default the Object does not have a parent
+ return NULL;
+ };
+
+ /**
+ * For use in derived classes.
+ * This is called after a property is set.
+ * @param [in] index The index of the property.
+ * @param [in] propertyValue The value of the property.
+ */
+ virtual void OnPropertySet( Property::Index index, Property::Value propertyValue ) {}
+
+ /**
+ * Retrieves the TypeInfo for this object. Only retrieves it from the type-registry once and then stores a pointer
+ * to it locally there-after. The type info will not change during the life-time of the application.
+ * @return The type-info for this object (Can be NULL)
+ */
+ const TypeInfo* GetTypeInfo() const;
+
+ /**
+ * Helper to find custom property
+ * @param index
+ * @return pointer to the property
+ */
+ CustomPropertyMetadata* FindCustomProperty( Property::Index index ) const;
+
+ /**
+ * Helper to find animatable property
+ * @param index
+ * @return pointer to the property
+ */
+ AnimatablePropertyMetadata* FindAnimatableProperty( Property::Index index ) const;
+
+ /**
+ * Helper to register a scene-graph property
+ * @param [in] name The name of the property.
+ * @param [in] key The key of the property
+ * @param [in] index The index of the property
+ * @param [in] value The value of the property.
+ * @return The index of the registered property or Property::INVALID_INDEX if registration failed.
+ */
+ Property::Index RegisterSceneGraphProperty(const std::string& name, Property::Index key, Property::Index index, const Property::Value& propertyValue) const;
+
+ /**
+ * Check whether the animatable property is registered already, if not then register one.
+ * @param [in] index The index of the property
+ * @return pointer to the property.
+ */
+ AnimatablePropertyMetadata* RegisterAnimatableProperty(Property::Index index) const;
+
+ /**
+ * Resolve the index and name of child properties if any.
+ */
+ void ResolveChildProperties();
+
+private: // Default property extensions for derived classes
+
+ /**
+ * Query how many default properties the derived class supports.
+ * @return The number of default properties.
+ */
+ virtual unsigned int GetDefaultPropertyCount() const = 0;
+
+ /**
+ * Retrieve all the indices that are associated with the default properties supported by the derived class.
+ * @return A container of default property indices.
+ * @note The deriving class must not modify the existing elements in the container.
+ */
+ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const = 0;
+
+ /**
+ * Query how many default properties the derived class supports.
+ * @return The number of default properties.
+ */
+ virtual const char* GetDefaultPropertyName( Property::Index index ) const = 0;
+
+ /**
+ * Query the index of a default property.
+ * @param [in] name The name of the property.
+ * @return The index of the property, or Property::INVALID_INDEX if no default property exists with the given name.
+ */
+ virtual Property::Index GetDefaultPropertyIndex( const std::string& name ) const = 0;
+
+ /**
+ * Query whether a default property is writable.
+ * @param [in] index The index of the property.
+ * @return True if the property is animatable.
+ */
+ virtual bool IsDefaultPropertyWritable( Property::Index index ) const = 0;
+
+ /**
+ * Query whether a default property is animatable.
+ * This determines whether the property can be the target of an animation or constraint.
+ * @param [in] index The index of the property.
+ * @return True if the property is animatable.
+ */
+ virtual bool IsDefaultPropertyAnimatable( Property::Index index ) const = 0;
+
+ /**
+ * @brief Query whether a default property can be used as an input to a constraint.
+ *
+ * @param [in] index The index of the property.
+ * @return True if the property can be used as an input to a constraint.
+ */
+ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const = 0;
+
+ /**
+ * Query the type of a default property.
+ * @param [in] index The index of the property.
+ * @return The type of the property.
+ */
+ virtual Property::Type GetDefaultPropertyType( Property::Index index ) const = 0;
+
+ /**
+ * Set the value of a default property.
+ * @pre The property types match i.e. propertyValue.GetType() is equal to GetPropertyType(index).
+ * @param [in] index The index of the property.
+ * @param [in] propertyValue The new value of the property.
+ */
+ virtual void SetDefaultProperty( Property::Index index, const Property::Value& propertyValue ) = 0;
+
+ /**
+ * Retrieve a default property value.
+ * @param [in] index The index of the property.
+ * @return The property value.
+ */
+ virtual Property::Value GetDefaultProperty( Property::Index index ) const = 0;
+
+ /**
+ * @todo this is virtual so that for now actor can override it,
+ * it needs to be removed and only have GetSceneObject but that requires changing actor and constraint logic
+ * Retrieve the scene-graph object added by this object.
+ * @return A pointer to the object, or NULL if no object has been added to the scene-graph.
+ */
+ virtual const SceneGraph::PropertyOwner* GetPropertyOwner() const
+ {
+ return GetSceneObject();