From: Adeel Kazmi Date: Fri, 20 Feb 2015 10:33:17 +0000 (+0000) Subject: Combine Internal::ProxyObject & Internal::Object X-Git-Tag: dali_1.0.31~7^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F32%2F35632%2F4;p=platform%2Fcore%2Fuifw%2Fdali-core.git Combine Internal::ProxyObject & Internal::Object Change-Id: I93fa08e730c40c13fc73db4f21bf958202346048 --- diff --git a/automated-tests/src/dali/utc-Dali-Constraint.cpp b/automated-tests/src/dali/utc-Dali-Constraint.cpp index 02f20d7..0fa9aaf 100644 --- a/automated-tests/src/dali/utc-Dali-Constraint.cpp +++ b/automated-tests/src/dali/utc-Dali-Constraint.cpp @@ -3259,7 +3259,7 @@ int UtcDaliConstraintInvalidInputProperty(void) } catch ( DaliException& e ) { - DALI_TEST_ASSERT( e, "mTargetProxy->IsPropertyAConstraintInput( source.propertyIndex )", TEST_LOCATION ); + DALI_TEST_ASSERT( e, "mTargetObject->IsPropertyAConstraintInput( source.propertyIndex )", TEST_LOCATION ); } END_TEST; } diff --git a/dali/internal/event/actor-attachments/camera-attachment-impl.h b/dali/internal/event/actor-attachments/camera-attachment-impl.h index 110f569..2de296d 100644 --- a/dali/internal/event/actor-attachments/camera-attachment-impl.h +++ b/dali/internal/event/actor-attachments/camera-attachment-impl.h @@ -231,12 +231,12 @@ public: const PropertyInputImpl* GetProjectionMatrixProperty() const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectAnimatableProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty() */ const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectInputProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty() */ const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const; diff --git a/dali/internal/event/actor-attachments/mesh-attachment-impl.cpp b/dali/internal/event/actor-attachments/mesh-attachment-impl.cpp index 36cc8d2..a260780 100644 --- a/dali/internal/event/actor-attachments/mesh-attachment-impl.cpp +++ b/dali/internal/event/actor-attachments/mesh-attachment-impl.cpp @@ -290,17 +290,17 @@ MeshAttachment::Connector::~Connector() } } -void MeshAttachment::Connector::SceneObjectAdded( ProxyObject& proxy ) +void MeshAttachment::Connector::SceneObjectAdded( Object& object ) { ConnectNode(); } -void MeshAttachment::Connector::SceneObjectRemoved( ProxyObject& proxy ) +void MeshAttachment::Connector::SceneObjectRemoved( Object& object ) { ConnectNode(); } -void MeshAttachment::Connector::ProxyDestroyed( ProxyObject& proxy ) +void MeshAttachment::Connector::ObjectDestroyed( Object& object ) { mActor = NULL; diff --git a/dali/internal/event/actor-attachments/mesh-attachment-impl.h b/dali/internal/event/actor-attachments/mesh-attachment-impl.h index d979bd1..b0ccb97 100644 --- a/dali/internal/event/actor-attachments/mesh-attachment-impl.h +++ b/dali/internal/event/actor-attachments/mesh-attachment-impl.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include namespace Dali { @@ -183,7 +183,7 @@ protected: /** * Helper class for connecting Nodes to the scene-graph MeshAttachment */ - class Connector : public ProxyObject::Observer + class Connector : public Object::Observer { public: /** @@ -211,22 +211,22 @@ protected: */ void ConnectNode(); - public: // From ProxyObject::Observer + public: // From Object::Observer /** - * @copydoc Dali::Internal::ProxyObject::Observer::SceneObjectAdded + * @copydoc Dali::Internal::Object::Observer::SceneObjectAdded */ - virtual void SceneObjectAdded( ProxyObject& proxy ); + virtual void SceneObjectAdded( Object& object ); /** - * @copydoc Dali::Internal::ProxyObject::Observer::SceneObjectAdded + * @copydoc Dali::Internal::Object::Observer::SceneObjectAdded */ - virtual void SceneObjectRemoved( ProxyObject& proxy ); + virtual void SceneObjectRemoved( Object& object ); /** - * @copydoc Dali::Internal::ProxyObject::Observer::ProxyDestroyed + * @copydoc Dali::Internal::Object::Observer::ObjectDestroyed */ - virtual void ProxyDestroyed( ProxyObject& proxy ); + virtual void ObjectDestroyed( Object& object ); public: MeshAttachment& mMeshAttachment; ///< Parent diff --git a/dali/internal/event/actors/actor-impl.cpp b/dali/internal/event/actors/actor-impl.cpp index bdc77f2..b463799 100644 --- a/dali/internal/event/actors/actor-impl.cpp +++ b/dali/internal/event/actors/actor-impl.cpp @@ -2226,7 +2226,7 @@ void Actor::ConnectToSceneGraph(int index) } #endif - // Notification for ProxyObject::Observers + // Notification for Object::Observers OnSceneObjectAdd(); } @@ -2303,7 +2303,7 @@ void Actor::RecursiveDisconnectFromStage( ActorContainer& disconnectionList ) */ void Actor::DisconnectFromSceneGraph() { - // Notification for ProxyObject::Observers + // Notification for Object::Observers OnSceneObjectRemove(); // Notify attachment diff --git a/dali/internal/event/actors/actor-impl.h b/dali/internal/event/actors/actor-impl.h index 9de60ea..07437a2 100644 --- a/dali/internal/event/actors/actor-impl.h +++ b/dali/internal/event/actors/actor-impl.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include #include #include #include @@ -70,7 +70,7 @@ typedef ActorContainer::const_iterator ActorConstIter; * The scene-graph can be updated in a separate thread, so the attachment is done using an asynchronous message. * When a tree of Actors is detached from the Stage, a message is sent to destroy the associated nodes. */ -class Actor : public ProxyObject +class Actor : public Object { public: @@ -1160,85 +1160,85 @@ protected: */ float CalculateSizeZ( const Vector2& size ) const; -public: // Default property extensions from ProxyObject +public: // Default property extensions from Object /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount() + * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() */ virtual unsigned int GetDefaultPropertyCount() const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName() + * @copydoc Dali::Internal::Object::GetDefaultPropertyName() */ virtual const char* GetDefaultPropertyName(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() */ virtual bool IsDefaultPropertyWritable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() */ virtual bool IsDefaultPropertyAnimatable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType() + * @copydoc Dali::Internal::Object::GetDefaultPropertyType() */ virtual Property::Type GetDefaultPropertyType(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty() + * @copydoc Dali::Internal::Object::SetDefaultProperty() */ virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue); /** - * @copydoc Dali::Internal::ProxyObject::SetSceneGraphProperty() + * @copydoc Dali::Internal::Object::SetSceneGraphProperty() */ virtual void SetSceneGraphProperty( Property::Index index, const CustomProperty& entry, const Property::Value& value ); /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty() + * @copydoc Dali::Internal::Object::GetDefaultProperty() */ virtual Property::Value GetDefaultProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetPropertyOwner() + * @copydoc Dali::Internal::Object::GetPropertyOwner() */ virtual const SceneGraph::PropertyOwner* GetPropertyOwner() const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObject() + * @copydoc Dali::Internal::Object::GetSceneObject() */ virtual const SceneGraph::PropertyOwner* GetSceneObject() const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectAnimatableProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty() */ virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectInputProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty() */ virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetPropertyComponentIndex() + * @copydoc Dali::Internal::Object::GetPropertyComponentIndex() */ virtual int GetPropertyComponentIndex( Property::Index index ) const; diff --git a/dali/internal/event/actors/camera-actor-impl.h b/dali/internal/event/actors/camera-actor-impl.h index 9794b45..3cd8d59 100644 --- a/dali/internal/event/actors/camera-actor-impl.h +++ b/dali/internal/event/actors/camera-actor-impl.h @@ -184,62 +184,62 @@ public: public: // properties /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual unsigned int GetDefaultPropertyCount() const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual bool IsDefaultPropertyAnimatable( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual Property::Type GetDefaultPropertyType( Property::Index index ) const; /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual const char* GetDefaultPropertyName( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual void SetDefaultProperty( Property::Index index, const Property::Value& propertyValue ); /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual Property::Value GetDefaultProperty( Property::Index index ) const; /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual bool IsDefaultPropertyWritable( Property::Index index ) const ; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectAnimatableProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty() */ virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectInputProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty() */ virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const; diff --git a/dali/internal/event/actors/image-actor-impl.h b/dali/internal/event/actors/image-actor-impl.h index 60477a3..75c09ea 100644 --- a/dali/internal/event/actors/image-actor-impl.h +++ b/dali/internal/event/actors/image-actor-impl.h @@ -129,55 +129,55 @@ public: */ ImageAttachment& GetImageAttachment(); -public: // Default property extensions from ProxyObject +public: // Default property extensions from Object /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount() + * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() */ virtual unsigned int GetDefaultPropertyCount() const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName() + * @copydoc Dali::Internal::Object::GetDefaultPropertyName() */ virtual const char* GetDefaultPropertyName(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() */ virtual bool IsDefaultPropertyWritable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() */ virtual bool IsDefaultPropertyAnimatable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType() + * @copydoc Dali::Internal::Object::GetDefaultPropertyType() */ virtual Property::Type GetDefaultPropertyType(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty() + * @copydoc Dali::Internal::Object::SetDefaultProperty() */ virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue); /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty() + * @copydoc Dali::Internal::Object::GetDefaultProperty() */ virtual Property::Value GetDefaultProperty( Property::Index index ) const; diff --git a/dali/internal/event/actors/layer-impl.h b/dali/internal/event/actors/layer-impl.h index 1ac9482..1c2b3d1 100644 --- a/dali/internal/event/actors/layer-impl.h +++ b/dali/internal/event/actors/layer-impl.h @@ -191,54 +191,54 @@ public: */ static bool DoAction(BaseObject* object, const std::string& actionName, const std::vector& attributes); -public: // Default property extensions from ProxyObject +public: // Default property extensions from Object /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount() + * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() */ virtual unsigned int GetDefaultPropertyCount() const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName() + * @copydoc Dali::Internal::Object::GetDefaultPropertyName() */ virtual const char* GetDefaultPropertyName(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() */ virtual bool IsDefaultPropertyWritable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() */ virtual bool IsDefaultPropertyAnimatable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType() + * @copydoc Dali::Internal::Object::GetDefaultPropertyType() */ virtual Property::Type GetDefaultPropertyType(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty() + * @copydoc Dali::Internal::Object::SetDefaultProperty() */ virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue); /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty() + * @copydoc Dali::Internal::Object::GetDefaultProperty() */ virtual Property::Value GetDefaultProperty( Property::Index index ) const; diff --git a/dali/internal/event/actors/light-actor-impl.h b/dali/internal/event/actors/light-actor-impl.h index a661868..713b01c 100644 --- a/dali/internal/event/actors/light-actor-impl.h +++ b/dali/internal/event/actors/light-actor-impl.h @@ -68,54 +68,54 @@ public: */ bool GetActive(); -public: // Default property extensions from ProxyObject +public: // Default property extensions from Object /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount() + * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() */ virtual unsigned int GetDefaultPropertyCount() const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName() + * @copydoc Dali::Internal::Object::GetDefaultPropertyName() */ virtual const char* GetDefaultPropertyName(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() */ virtual bool IsDefaultPropertyWritable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() */ virtual bool IsDefaultPropertyAnimatable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType() + * @copydoc Dali::Internal::Object::GetDefaultPropertyType() */ virtual Property::Type GetDefaultPropertyType(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty() + * @copydoc Dali::Internal::Object::SetDefaultProperty() */ virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue); /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty() + * @copydoc Dali::Internal::Object::GetDefaultProperty() */ virtual Property::Value GetDefaultProperty( Property::Index index ) const; diff --git a/dali/internal/event/actors/text-actor-impl.h b/dali/internal/event/actors/text-actor-impl.h index a8320c6..989777e 100644 --- a/dali/internal/event/actors/text-actor-impl.h +++ b/dali/internal/event/actors/text-actor-impl.h @@ -323,54 +323,54 @@ private: // Undefined TextActor& operator=(const TextActor& rhs); -private: // ProxyObject default non-animatable properties +private: // Object default non-animatable properties /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual unsigned int GetDefaultPropertyCount() const ; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual const char* GetDefaultPropertyName( Property::Index index ) const ; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual bool IsDefaultPropertyWritable( Property::Index index ) const ; /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual bool IsDefaultPropertyAnimatable( Property::Index index ) const ; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual Property::Type GetDefaultPropertyType( Property::Index index ) const ; /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual void SetDefaultProperty( Property::Index index, const Property::Value& propertyValue ) ; /** - * copydoc Dali::Internal::ProxyObject + * copydoc Dali::Internal::Object */ virtual Property::Value GetDefaultProperty( Property::Index index ) const ; diff --git a/dali/internal/event/animation/active-constraint-base.cpp b/dali/internal/event/animation/active-constraint-base.cpp index 3638315..db62b56 100644 --- a/dali/internal/event/animation/active-constraint-base.cpp +++ b/dali/internal/event/animation/active-constraint-base.cpp @@ -83,8 +83,8 @@ ActiveConstraintBase::ActiveConstraintBase( EventToUpdate& eventToUpdate, Proper mTargetPropertyIndex( targetPropertyIndex ), mSources( sources ), mSourceCount( sourceCount ), - mTargetProxy( NULL ), - mObservedProxies(), + mTargetObject( NULL ), + mObservedObjects(), mSceneGraphConstraint( NULL ), mCustomWeight( NULL ), mOffstageWeight( Dali::ActiveConstraint::DEFAULT_WEIGHT ), @@ -93,11 +93,11 @@ ActiveConstraintBase::ActiveConstraintBase( EventToUpdate& eventToUpdate, Proper mTag(0), mApplyAnimation() { - // Skip init when any of the proxy objects have been destroyed + // Skip init when any of the objects have been destroyed if ( mSources.size() != mSourceCount ) { - // Discard all proxy pointers - mTargetProxy = NULL; + // Discard all object pointers + mTargetObject = NULL; mSources.clear(); } @@ -108,7 +108,7 @@ ActiveConstraintBase::ActiveConstraintBase( EventToUpdate& eventToUpdate, Proper { DALI_ASSERT_ALWAYS( NULL != iter->object && "ActiveConstraint source object not found" ); - ObserveProxy( *(iter->object) ); + ObserveObject( *(iter->object) ); } } } @@ -124,7 +124,7 @@ ActiveConstraintBase::~ActiveConstraintBase() } } -void ActiveConstraintBase::SetCustomWeightObject( ProxyObject& weightObject, Property::Index weightIndex ) +void ActiveConstraintBase::SetCustomWeightObject( Object& weightObject, Property::Index weightIndex ) { const SceneGraph::PropertyBase* base = weightObject.GetSceneObjectAnimatableProperty( weightIndex ); const SceneGraph::AnimatableProperty* sceneProperty = dynamic_cast< const SceneGraph::AnimatableProperty* >( base ); @@ -133,18 +133,18 @@ void ActiveConstraintBase::SetCustomWeightObject( ProxyObject& weightObject, Pro { mCustomWeight = sceneProperty; - ObserveProxy( weightObject ); + ObserveObject( weightObject ); } } -void ActiveConstraintBase::FirstApply( ProxyObject& parent, TimePeriod applyTime ) +void ActiveConstraintBase::FirstApply( Object& parent, TimePeriod applyTime ) { - DALI_ASSERT_ALWAYS( NULL == mTargetProxy && "Parent of ActiveConstraint already set" ); + DALI_ASSERT_ALWAYS( NULL == mTargetObject && "Parent of ActiveConstraint already set" ); // No need to do anything, if the source objects are gone if( mSources.size() == mSourceCount ) { - mTargetProxy = &parent; + mTargetObject = &parent; ConnectConstraint(); } @@ -169,18 +169,18 @@ void ActiveConstraintBase::FirstApply( ProxyObject& parent, TimePeriod applyTime void ActiveConstraintBase::OnParentDestroyed() { - // Stop observing the remaining proxies + // Stop observing the remaining objects StopObservation(); - // Discard all proxy pointers - mTargetProxy = NULL; + // Discard all object pointers + mTargetObject = NULL; mSources.clear(); } void ActiveConstraintBase::OnParentSceneObjectAdded() { if ( NULL == mSceneGraphConstraint && - mTargetProxy ) + mTargetObject ) { ConnectConstraint(); } @@ -200,13 +200,13 @@ void ActiveConstraintBase::OnParentSceneObjectRemoved() void ActiveConstraintBase::BeginRemove() { - // Stop observing the remaining proxies + // Stop observing the remaining objects StopObservation(); - // Discard all proxy pointers + // Discard all object pointers mSources.clear(); - const SceneGraph::PropertyOwner* propertyOwner = mTargetProxy ? mTargetProxy->GetSceneObject() : NULL; + const SceneGraph::PropertyOwner* propertyOwner = mTargetObject ? mTargetObject->GetSceneObject() : NULL; if ( propertyOwner && mSceneGraphConstraint ) @@ -222,9 +222,9 @@ void ActiveConstraintBase::BeginRemove() } } -ProxyObject* ActiveConstraintBase::GetParent() +Object* ActiveConstraintBase::GetParent() { - return mTargetProxy; + return mTargetObject; } bool ActiveConstraintBase::Supports( Capability capability ) const @@ -234,7 +234,7 @@ bool ActiveConstraintBase::Supports( Capability capability ) const Dali::Handle ActiveConstraintBase::GetTargetObject() { - return Dali::Handle( mTargetProxy ); + return Dali::Handle( mTargetObject ); } Property::Index ActiveConstraintBase::GetTargetProperty() @@ -438,19 +438,19 @@ const PropertyInputImpl* ActiveConstraintBase::GetSceneObjectInputProperty( Prop return &mSceneGraphConstraint->mWeight; } -void ActiveConstraintBase::SceneObjectAdded( ProxyObject& proxy ) +void ActiveConstraintBase::SceneObjectAdded( Object& object ) { // Should not be getting callbacks when mSources has been cleared DALI_ASSERT_DEBUG( mSources.size() == mSourceCount ); if ( NULL == mSceneGraphConstraint && - mTargetProxy ) + mTargetObject ) { ConnectConstraint(); } } -void ActiveConstraintBase::SceneObjectRemoved( ProxyObject& proxy ) +void ActiveConstraintBase::SceneObjectRemoved( Object& object ) { // Notify base class that the scene-graph constraint is being removed OnSceneObjectRemove(); @@ -460,7 +460,7 @@ void ActiveConstraintBase::SceneObjectRemoved( ProxyObject& proxy ) // Preserve the previous weight mOffstageWeight = mSceneGraphConstraint->GetWeight( mEventToUpdate.GetEventBufferIndex() ); - const SceneGraph::PropertyOwner* propertyOwner = mTargetProxy ? mTargetProxy->GetSceneObject() : NULL; + const SceneGraph::PropertyOwner* propertyOwner = mTargetObject ? mTargetObject->GetSceneObject() : NULL; if( propertyOwner ) { @@ -473,41 +473,41 @@ void ActiveConstraintBase::SceneObjectRemoved( ProxyObject& proxy ) } } -void ActiveConstraintBase::ProxyDestroyed( ProxyObject& proxy ) +void ActiveConstraintBase::ObjectDestroyed( Object& object ) { - // Remove proxy pointer from observation set - ProxyObjectIter iter = std::find( mObservedProxies.Begin(), mObservedProxies.End(), &proxy ); - DALI_ASSERT_DEBUG( mObservedProxies.End() != iter ); - mObservedProxies.Erase( iter ); + // Remove object pointer from observation set + ObjectIter iter = std::find( mObservedObjects.Begin(), mObservedObjects.End(), &object ); + DALI_ASSERT_DEBUG( mObservedObjects.End() != iter ); + mObservedObjects.Erase( iter ); - // Stop observing the remaining proxies + // Stop observing the remaining objects StopObservation(); - // Discard all proxy & scene-graph pointers + // Discard all object & scene-graph pointers mSceneGraphConstraint = NULL; - mTargetProxy = NULL; + mTargetObject = NULL; mSources.clear(); } -void ActiveConstraintBase::ObserveProxy( ProxyObject& proxy ) +void ActiveConstraintBase::ObserveObject( Object& object ) { - ProxyObjectIter iter = std::find( mObservedProxies.Begin(), mObservedProxies.End(), &proxy ); - if ( mObservedProxies.End() == iter ) + ObjectIter iter = std::find( mObservedObjects.Begin(), mObservedObjects.End(), &object ); + if ( mObservedObjects.End() == iter ) { - proxy.AddObserver( *this ); - mObservedProxies.PushBack( &proxy ); + object.AddObserver( *this ); + mObservedObjects.PushBack( &object ); } } void ActiveConstraintBase::StopObservation() { - const ProxyObjectIter end = mObservedProxies.End(); - for( ProxyObjectIter iter = mObservedProxies.Begin(); iter != end; ++iter ) + const ObjectIter end = mObservedObjects.End(); + for( ObjectIter iter = mObservedObjects.Begin(); iter != end; ++iter ) { (*iter)->RemoveObserver( *this ); } - mObservedProxies.Clear(); + mObservedObjects.Clear(); } void ActiveConstraintBase::FirstApplyFinished( Object* object ) diff --git a/dali/internal/event/animation/active-constraint-base.h b/dali/internal/event/animation/active-constraint-base.h index 2af759a..86defd3 100644 --- a/dali/internal/event/animation/active-constraint-base.h +++ b/dali/internal/event/animation/active-constraint-base.h @@ -20,7 +20,7 @@ // INTERNAL INCLUDES #include -#include +#include #include #include #include @@ -36,8 +36,8 @@ namespace Internal { class EventToUpdate; -typedef Dali::Vector ProxyObjectContainer; -typedef ProxyObjectContainer::Iterator ProxyObjectIter; +typedef Dali::Vector ObjectContainer; +typedef ObjectContainer::Iterator ObjectIter; namespace SceneGraph { @@ -50,7 +50,7 @@ class AnimatableProperty; /** * An abstract base class for active constraints. */ -class ActiveConstraintBase : public ProxyObject, public ProxyObject::Observer +class ActiveConstraintBase : public Object, public Object::Observer { public: @@ -82,7 +82,7 @@ public: * @param[in] weightObject An object with a "weight" float property. * @param[in] weightIndex The index of the weight property. */ - void SetCustomWeightObject( ProxyObject& weightObject, Property::Index weightIndex ); + void SetCustomWeightObject( Object& weightObject, Property::Index weightIndex ); /** * Called when the ActiveConstraint is first applied. @@ -90,7 +90,7 @@ public: * @param[in] parent The parent object. * @param[in] applyTime The apply-time for this constraint. */ - void FirstApply( ProxyObject& parent, TimePeriod applyTime ); + void FirstApply( Object& parent, TimePeriod applyTime ); /** * Called when the ActiveConstraint is removed. @@ -116,7 +116,7 @@ public: * Retrieve the parent of the active-constraint. * @return The parent object, or NULL. */ - ProxyObject* GetParent(); + Object* GetParent(); /** * @copydoc Dali::Internal::Object::Supports() @@ -189,99 +189,99 @@ public: */ static bool DoConnectSignal( BaseObject* object, ConnectionTrackerInterface* tracker, const std::string& signalName, FunctorDelegate* functor ); -public: // Default property extensions from ProxyObject +public: // Default property extensions from Object /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount() + * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() */ virtual unsigned int GetDefaultPropertyCount() const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName() + * @copydoc Dali::Internal::Object::GetDefaultPropertyName() */ virtual const char* GetDefaultPropertyName( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex( const std::string& name ) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() */ virtual bool IsDefaultPropertyWritable( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() */ virtual bool IsDefaultPropertyAnimatable( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType() + * @copydoc Dali::Internal::Object::GetDefaultPropertyType() */ virtual Property::Type GetDefaultPropertyType( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty() + * @copydoc Dali::Internal::Object::SetDefaultProperty() */ virtual void SetDefaultProperty( Property::Index index, const Property::Value& propertyValue ); /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty() + * @copydoc Dali::Internal::Object::GetDefaultProperty() */ virtual Property::Value GetDefaultProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObject() + * @copydoc Dali::Internal::Object::GetSceneObject() */ virtual const SceneGraph::PropertyOwner* GetSceneObject() const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectAnimatableProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty() */ virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectInputProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty() */ virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const; -public: // ProxyObject::Observer methods +public: // Object::Observer methods /** - * @copydoc ProxyObject::Observer::SceneObjectAdded() + * @copydoc Object::Observer::SceneObjectAdded() */ - virtual void SceneObjectAdded( ProxyObject& proxy ); + virtual void SceneObjectAdded( Object& object ); /** - * @copydoc ProxyObject::Observer::SceneObjectRemoved() + * @copydoc Object::Observer::SceneObjectRemoved() */ - virtual void SceneObjectRemoved( ProxyObject& proxy ); + virtual void SceneObjectRemoved( Object& object ); /** - * @copydoc ProxyObject::Observer::ProxyDestroyed() + * @copydoc Object::Observer::ObjectDestroyed() */ - virtual void ProxyDestroyed( ProxyObject& proxy ); + virtual void ObjectDestroyed( Object& object ); private: /** - * Helper to observe a proxy, if not already observing it + * Helper to observe an object, if not already observing it */ - void ObserveProxy( ProxyObject& proxy ); + void ObserveObject( Object& object ); /** - * Helper to stop observing proxies + * Helper to stop observing objects */ void StopObservation(); @@ -306,8 +306,8 @@ protected: SourceContainer mSources; const unsigned int mSourceCount; - ProxyObject* mTargetProxy; ///< The proxy-object owns the active-constraint. - ProxyObjectContainer mObservedProxies; // We don't observe the same object twice + Object* mTargetObject; ///< The object owns the active-constraint. + ObjectContainer mObservedObjects; // We don't observe the same object twice const SceneGraph::ConstraintBase* mSceneGraphConstraint; diff --git a/dali/internal/event/animation/active-constraint-impl.h b/dali/internal/event/animation/active-constraint-impl.h index 3a20508..605eac1 100644 --- a/dali/internal/event/animation/active-constraint-impl.h +++ b/dali/internal/event/animation/active-constraint-impl.h @@ -24,7 +24,7 @@ // INTERNAL INCLUDES #include #include -#include +#include #include #include #include @@ -149,15 +149,15 @@ private: */ void ConnectConstraint() { - // Should not come here any proxies have been destroyed - DALI_ASSERT_DEBUG( NULL != mTargetProxy ); + // Should not come here any objects have been destroyed + DALI_ASSERT_DEBUG( NULL != mTargetObject ); DALI_ASSERT_DEBUG( mSources.size() == mSourceCount ); // Guard against double connections DALI_ASSERT_DEBUG( NULL == mSceneGraphConstraint ); // Short-circuit until the target scene-object exists - SceneGraph::PropertyOwner* targetObject = const_cast< SceneGraph::PropertyOwner* >( mTargetProxy->GetSceneObject() ); + SceneGraph::PropertyOwner* targetObject = const_cast< SceneGraph::PropertyOwner* >( mTargetObject->GetSceneObject() ); if ( NULL == targetObject ) { return; @@ -174,7 +174,7 @@ private: { // Create the SceneGraphConstraint, and connect to the scene-graph - const SceneGraph::PropertyBase* targetProperty = mTargetProxy->GetSceneObjectAnimatableProperty( mTargetIndex ); + const SceneGraph::PropertyBase* targetProperty = mTargetObject->GetSceneObjectAnimatableProperty( mTargetIndex ); // The targetProperty should exist, when targetObject exists DALI_ASSERT_ALWAYS( NULL != targetProperty && "Constraint target property does not exist" ); @@ -195,7 +195,7 @@ private: // Keep a raw-pointer to the scene-graph constraint mSceneGraphConstraint = sceneGraphConstraint; - // Notify ProxyObject base-class that the scene-graph constraint has been added + // Notify Object base-class that the scene-graph constraint has been added OnSceneObjectAdd(); } } @@ -224,7 +224,7 @@ private: SceneGraph::PropertyOwner* owner = const_cast< SceneGraph::PropertyOwner* >( source.object->GetSceneObject() ); - // The property owner will not exist, if the target proxy-object is off-stage + // The property owner will not exist, if the target object is off-stage if( NULL != owner ) { AddUnique( propertyOwners, owner ); @@ -237,10 +237,10 @@ private: } else if ( LOCAL_PROPERTY == source.sourceType ) { - DALI_ASSERT_ALWAYS( mTargetProxy->IsPropertyAConstraintInput( source.propertyIndex ) ); + DALI_ASSERT_ALWAYS( mTargetObject->IsPropertyAConstraintInput( source.propertyIndex ) ); - inputProperty = const_cast< PropertyInputImpl* >( mTargetProxy->GetSceneObjectInputProperty( source.propertyIndex ) ); - componentIndex = mTargetProxy->GetPropertyComponentIndex( source.propertyIndex ); + inputProperty = const_cast< PropertyInputImpl* >( mTargetObject->GetSceneObjectInputProperty( source.propertyIndex ) ); + componentIndex = mTargetObject->GetPropertyComponentIndex( source.propertyIndex ); // The target scene-object should provide this property DALI_ASSERT_ALWAYS( NULL != inputProperty && "Constraint source property does not exist" ); @@ -249,21 +249,21 @@ private: { DALI_ASSERT_ALWAYS( PARENT_PROPERTY == source.sourceType && "Constraint source property type is invalid" ); - ProxyObject* proxyParent = dynamic_cast< Actor& >( *mTargetProxy ).GetParent(); + Object* objectParent = dynamic_cast< Actor& >( *mTargetObject ).GetParent(); - // This will not exist, if the target proxy-object is off-stage - if ( NULL != proxyParent ) + // This will not exist, if the target object is off-stage + if ( NULL != objectParent ) { - DALI_ASSERT_ALWAYS( proxyParent->IsPropertyAConstraintInput( source.propertyIndex ) ); + DALI_ASSERT_ALWAYS( objectParent->IsPropertyAConstraintInput( source.propertyIndex ) ); - SceneGraph::PropertyOwner* owner = const_cast< SceneGraph::PropertyOwner* >( proxyParent->GetSceneObject() ); + SceneGraph::PropertyOwner* owner = const_cast< SceneGraph::PropertyOwner* >( objectParent->GetSceneObject() ); - // The property owner will not exist, if the parent proxy-object is off-stage + // The property owner will not exist, if the parent object is off-stage if ( NULL != owner ) { AddUnique( propertyOwners, owner ); - inputProperty = const_cast< PropertyInputImpl* >( proxyParent->GetSceneObjectInputProperty( source.propertyIndex ) ); - componentIndex = proxyParent->GetPropertyComponentIndex( source.propertyIndex ); + inputProperty = const_cast< PropertyInputImpl* >( objectParent->GetSceneObjectInputProperty( source.propertyIndex ) ); + componentIndex = objectParent->GetPropertyComponentIndex( source.propertyIndex ); // The scene-object property should exist, when the property owner exists DALI_ASSERT_ALWAYS( NULL != inputProperty && "Constraint source property does not exist" ); @@ -396,15 +396,15 @@ private: */ void ConnectConstraint() { - // Should not come here any proxies have been destroyed - DALI_ASSERT_DEBUG( NULL != mTargetProxy ); + // Should not come here any objects have been destroyed + DALI_ASSERT_DEBUG( NULL != mTargetObject ); DALI_ASSERT_DEBUG( mSources.size() == mSourceCount ); // Guard against double connections DALI_ASSERT_DEBUG( NULL == mSceneGraphConstraint ); // Short-circuit until the target scene-object exists - SceneGraph::PropertyOwner* targetObject = const_cast< SceneGraph::PropertyOwner* >( mTargetProxy->GetSceneObject() ); + SceneGraph::PropertyOwner* targetObject = const_cast< SceneGraph::PropertyOwner* >( mTargetObject->GetSceneObject() ); if ( NULL == targetObject ) { return; @@ -421,12 +421,12 @@ private: { // Create the SceneGraphConstraint, and connect to the scene-graph - const SceneGraph::PropertyBase* targetProperty = mTargetProxy->GetSceneObjectAnimatableProperty( mTargetIndex ); + const SceneGraph::PropertyBase* targetProperty = mTargetObject->GetSceneObjectAnimatableProperty( mTargetIndex ); // The targetProperty should exist, when targetObject exists DALI_ASSERT_ALWAYS( NULL != targetProperty && "Constraint target property does not exist" ); - const int componentIndex = mTargetProxy->GetPropertyComponentIndex( mTargetIndex ); + const int componentIndex = mTargetObject->GetPropertyComponentIndex( mTargetIndex ); SceneGraph::ConstraintBase* sceneGraphConstraint( NULL ); @@ -504,7 +504,7 @@ private: // Keep a raw-pointer to the scene-graph constraint mSceneGraphConstraint = sceneGraphConstraint; - // Notify ProxyObject base-class that the scene-graph constraint has been added + // Notify Object base-class that the scene-graph constraint has been added OnSceneObjectAdd(); } } @@ -533,7 +533,7 @@ private: SceneGraph::PropertyOwner* owner = const_cast< SceneGraph::PropertyOwner* >( source.object->GetSceneObject() ); - // The property owner will not exist, if the target proxy-object is off-stage + // The property owner will not exist, if the target object is off-stage if( NULL != owner ) { AddUnique( propertyOwners, owner ); @@ -546,10 +546,10 @@ private: } else if ( LOCAL_PROPERTY == source.sourceType ) { - DALI_ASSERT_ALWAYS( mTargetProxy->IsPropertyAConstraintInput( source.propertyIndex ) ); + DALI_ASSERT_ALWAYS( mTargetObject->IsPropertyAConstraintInput( source.propertyIndex ) ); - inputProperty = const_cast< PropertyInputImpl* >( mTargetProxy->GetSceneObjectInputProperty( source.propertyIndex ) ); - componentIndex = mTargetProxy->GetPropertyComponentIndex( source.propertyIndex ); + inputProperty = const_cast< PropertyInputImpl* >( mTargetObject->GetSceneObjectInputProperty( source.propertyIndex ) ); + componentIndex = mTargetObject->GetPropertyComponentIndex( source.propertyIndex ); // The target scene-object should provide this property DALI_ASSERT_ALWAYS( NULL != inputProperty && "Constraint source property does not exist" ); @@ -558,21 +558,21 @@ private: { DALI_ASSERT_ALWAYS( PARENT_PROPERTY == source.sourceType && "Constraint source property type is invalid" ); - ProxyObject* proxyParent = dynamic_cast< Actor& >( *mTargetProxy ).GetParent(); + Object* objectParent = dynamic_cast< Actor& >( *mTargetObject ).GetParent(); - // This will not exist, if the target proxy-object is off-stage - if ( NULL != proxyParent ) + // This will not exist, if the target object is off-stage + if ( NULL != objectParent ) { - DALI_ASSERT_ALWAYS( proxyParent->IsPropertyAConstraintInput( source.propertyIndex ) ); + DALI_ASSERT_ALWAYS( objectParent->IsPropertyAConstraintInput( source.propertyIndex ) ); - SceneGraph::PropertyOwner* owner = const_cast< SceneGraph::PropertyOwner* >( proxyParent->GetSceneObject() ); + SceneGraph::PropertyOwner* owner = const_cast< SceneGraph::PropertyOwner* >( objectParent->GetSceneObject() ); - // The property owner will not exist, if the parent proxy-object is off-stage + // The property owner will not exist, if the parent object is off-stage if ( NULL != owner ) { AddUnique( propertyOwners, owner ); - inputProperty = const_cast< PropertyInputImpl* >( proxyParent->GetSceneObjectInputProperty( source.propertyIndex ) ); - componentIndex = proxyParent->GetPropertyComponentIndex( source.propertyIndex ); + inputProperty = const_cast< PropertyInputImpl* >( objectParent->GetSceneObjectInputProperty( source.propertyIndex ) ); + componentIndex = objectParent->GetPropertyComponentIndex( source.propertyIndex ); // The scene-object property should exist, when the property owner exists DALI_ASSERT_ALWAYS( NULL != inputProperty && "Constraint source property does not exist" ); diff --git a/dali/internal/event/animation/animation-impl.cpp b/dali/internal/event/animation/animation-impl.cpp index 358b42e..6029980 100644 --- a/dali/internal/event/animation/animation-impl.cpp +++ b/dali/internal/event/animation/animation-impl.cpp @@ -288,7 +288,7 @@ void Animation::AnimateBy(Property& target, Property::Value& relativeValue, Time void Animation::AnimateBy(Property& target, Property::Value& relativeValue, AlphaFunction alpha, TimePeriod period) { - ProxyObject& proxy = dynamic_cast( GetImplementation(target.object) ); + Object& object = dynamic_cast( GetImplementation(target.object) ); ExtendDuration( period ); @@ -296,7 +296,7 @@ void Animation::AnimateBy(Property& target, Property::Value& relativeValue, Alph { case Property::BOOLEAN: { - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new AnimateByBoolean(relativeValue.Get()), @@ -307,7 +307,7 @@ void Animation::AnimateBy(Property& target, Property::Value& relativeValue, Alph case Property::FLOAT: { - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new AnimateByFloat(relativeValue.Get()), @@ -318,7 +318,7 @@ void Animation::AnimateBy(Property& target, Property::Value& relativeValue, Alph case Property::INTEGER: { - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new AnimateByInteger(relativeValue.Get()), @@ -329,7 +329,7 @@ void Animation::AnimateBy(Property& target, Property::Value& relativeValue, Alph case Property::VECTOR2: { - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new AnimateByVector2(relativeValue.Get()), @@ -340,7 +340,7 @@ void Animation::AnimateBy(Property& target, Property::Value& relativeValue, Alph case Property::VECTOR3: { - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new AnimateByVector3(relativeValue.Get()), @@ -351,7 +351,7 @@ void Animation::AnimateBy(Property& target, Property::Value& relativeValue, Alph case Property::VECTOR4: { - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new AnimateByVector4(relativeValue.Get()), @@ -364,7 +364,7 @@ void Animation::AnimateBy(Property& target, Property::Value& relativeValue, Alph { AngleAxis angleAxis = relativeValue.Get(); - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new RotateByAngleAxis(angleAxis.angle, angleAxis.axis), @@ -396,12 +396,12 @@ void Animation::AnimateTo(Property& target, Property::Value& destinationValue, T void Animation::AnimateTo(Property& target, Property::Value& destinationValue, AlphaFunction alpha, TimePeriod period) { - ProxyObject& proxy = dynamic_cast( GetImplementation(target.object) ); + Object& object = dynamic_cast( GetImplementation(target.object) ); - AnimateTo( proxy, target.propertyIndex, target.componentIndex, destinationValue, alpha, period ); + AnimateTo( object, target.propertyIndex, target.componentIndex, destinationValue, alpha, period ); } -void Animation::AnimateTo(ProxyObject& targetObject, Property::Index targetPropertyIndex, int componentIndex, Property::Value& destinationValue, AlphaFunction alpha, TimePeriod period) +void Animation::AnimateTo(Object& targetObject, Property::Index targetPropertyIndex, int componentIndex, Property::Value& destinationValue, AlphaFunction alpha, TimePeriod period) { Property::Type type = targetObject.GetPropertyType(targetPropertyIndex); if(componentIndex != Property::INVALID_COMPONENT_INDEX) @@ -550,7 +550,7 @@ void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, Alph void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, AlphaFunction alpha, TimePeriod period, Interpolation interpolation) { - ProxyObject& proxy = dynamic_cast( GetImplementation(target.object) ); + Object& object = dynamic_cast( GetImplementation(target.object) ); ExtendDuration( period ); @@ -561,7 +561,7 @@ void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, Alph const KeyFrameBoolean* kf; GetSpecialization(keyFrames, kf); KeyFrameBooleanPtr kfCopy = KeyFrameBoolean::Clone(*kf); - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new KeyFrameBooleanFunctor(kfCopy), @@ -575,7 +575,7 @@ void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, Alph const KeyFrameNumber* kf; GetSpecialization(keyFrames, kf); KeyFrameNumberPtr kfCopy = KeyFrameNumber::Clone(*kf); - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new KeyFrameNumberFunctor(kfCopy,interpolation), @@ -589,7 +589,7 @@ void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, Alph const KeyFrameInteger* kf; GetSpecialization(keyFrames, kf); KeyFrameIntegerPtr kfCopy = KeyFrameInteger::Clone(*kf); - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new KeyFrameIntegerFunctor(kfCopy,interpolation), @@ -603,7 +603,7 @@ void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, Alph const KeyFrameVector2* kf; GetSpecialization(keyFrames, kf); KeyFrameVector2Ptr kfCopy = KeyFrameVector2::Clone(*kf); - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new KeyFrameVector2Functor(kfCopy,interpolation), @@ -617,7 +617,7 @@ void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, Alph const KeyFrameVector3* kf; GetSpecialization(keyFrames, kf); KeyFrameVector3Ptr kfCopy = KeyFrameVector3::Clone(*kf); - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new KeyFrameVector3Functor(kfCopy,interpolation), @@ -631,7 +631,7 @@ void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, Alph const KeyFrameVector4* kf; GetSpecialization(keyFrames, kf); KeyFrameVector4Ptr kfCopy = KeyFrameVector4::Clone(*kf); - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new KeyFrameVector4Functor(kfCopy,interpolation), @@ -645,7 +645,7 @@ void Animation::AnimateBetween(Property target, const KeyFrames& keyFrames, Alph const KeyFrameQuaternion* kf; GetSpecialization(keyFrames, kf); KeyFrameQuaternionPtr kfCopy = KeyFrameQuaternion::Clone(*kf); - AddAnimatorConnector( AnimatorConnector::New( proxy, + AddAnimatorConnector( AnimatorConnector::New( object, target.propertyIndex, target.componentIndex, new KeyFrameQuaternionFunctor(kfCopy), diff --git a/dali/internal/event/animation/animation-impl.h b/dali/internal/event/animation/animation-impl.h index 16c5555..a5fc53a 100644 --- a/dali/internal/event/animation/animation-impl.h +++ b/dali/internal/event/animation/animation-impl.h @@ -42,7 +42,7 @@ class UpdateManager; class Actor; class Animation; class AnimationPlaylist; -class ProxyObject; +class Object; class ShaderEffect; typedef IntrusivePtr AnimationPtr; @@ -246,7 +246,7 @@ public: * @param [in] alpha The alpha function to apply. * @param [in] period The effect will occur during this time period. */ - void AnimateTo(ProxyObject& targetObject, Property::Index targetPropertyIndex, int componentIndex, Property::Value& destinationValue, AlphaFunction alpha, TimePeriod period); + void AnimateTo(Object& targetObject, Property::Index targetPropertyIndex, int componentIndex, Property::Value& destinationValue, AlphaFunction alpha, TimePeriod period); /** * @copydoc Dali::Animation::AnimateBetween(Property target, KeyFrames& keyFrames) diff --git a/dali/internal/event/animation/animator-connector.h b/dali/internal/event/animation/animator-connector.h index da800cc..34da0af 100644 --- a/dali/internal/event/animation/animator-connector.h +++ b/dali/internal/event/animation/animator-connector.h @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include #include #include #include @@ -37,14 +37,14 @@ namespace Internal /** * AnimatorConnector is used to connect SceneGraph::Animators for newly created scene-graph objects. * - * The scene-graph objects are created by a ProxyObject e.g. Actor is a proxy for SceneGraph::Node. + * The scene-graph objects are created by a Object e.g. Actor is a proxy for SceneGraph::Node. * AnimatorConnector observes the proxy object, in order to detect when a scene-graph object is created. * * SceneGraph::Animators weakly reference scene objects, and are automatically deleted when orphaned. * Therefore the AnimatorConnector is NOT responsible for disconnecting animators. */ template < typename PropertyType > -class AnimatorConnector : public AnimatorConnectorBase, public ProxyObject::Observer +class AnimatorConnector : public AnimatorConnectorBase, public Object::Observer { public: @@ -53,7 +53,7 @@ public: /** * Construct a new animator connector. - * @param[in] proxy The proxy for a scene-graph object to animate. + * @param[in] object The object for a scene-graph object to animate. * @param[in] propertyIndex The index of a property provided by the object. * @param[in] componentIndex Index to a sub component of a property, for use with Vector2, Vector3 and Vector4 (INVALID_PROPERTY_COMPONENTINDEX to use the whole property) * @param[in] animatorFunction A function used to animate the property. @@ -61,14 +61,14 @@ public: * @param[in] period The time period of the animator. * @return A pointer to a newly allocated animator connector. */ - static AnimatorConnectorBase* New( ProxyObject& proxy, + static AnimatorConnectorBase* New( Object& object, Property::Index propertyIndex, int componentIndex, AnimatorFunctionBase* animatorFunction, AlphaFunction alpha, const TimePeriod& period ) { - return new AnimatorConnector< PropertyType >( proxy, + return new AnimatorConnector< PropertyType >( object, propertyIndex, componentIndex, animatorFunction, @@ -81,9 +81,9 @@ public: */ virtual ~AnimatorConnector() { - if( mProxy ) + if( mObject ) { - mProxy->RemoveObserver( *this ); + mObject->RemoveObserver( *this ); } //If there is not a SceneGraph::Animator, the AnimatorConnector is responsible for deleting the mAnimatorFunction @@ -104,7 +104,7 @@ public: DALI_ASSERT_ALWAYS( mParent == NULL && "AnimationConnector already has a parent" ); mParent = &parent; - if( mProxy && mProxy->GetSceneObject() ) + if( mObject && mObject->GetSceneObject() ) { CreateAnimator(); } @@ -115,20 +115,20 @@ private: /** * Private constructor; see also AnimatorConnector::New(). */ - AnimatorConnector( ProxyObject& proxy, + AnimatorConnector( Object& object, Property::Index propertyIndex, int componentIndex, Internal::AnimatorFunctionBase* animatorFunction, AlphaFunction alpha, const TimePeriod& period ) : AnimatorConnectorBase( alpha, period ), - mProxy( &proxy ), + mObject( &object ), mAnimator(0), mPropertyIndex( propertyIndex ), mComponentIndex( componentIndex ), mAnimatorFunction( animatorFunction ) { - proxy.AddObserver( *this ); + object.AddObserver( *this ); } // Undefined @@ -138,9 +138,9 @@ private: AnimatorConnector& operator=( const AnimatorConnector& rhs ); /** - * From ProxyObject::Observer + * From Object::Observer */ - virtual void SceneObjectAdded( ProxyObject& proxy ) + virtual void SceneObjectAdded( Object& object ) { //If the animator has not been created yet, create it now. if( !mAnimator ) @@ -150,18 +150,18 @@ private: } /** - * From ProxyObject::Observer + * From Object::Observer */ - virtual void SceneObjectRemoved( ProxyObject& proxy ) + virtual void SceneObjectRemoved( Object& object ) { } /** - * From ProxyObject::Observer + * From Object::Observer */ - virtual void ProxyDestroyed( ProxyObject& proxy ) + virtual void ObjectDestroyed( Object& object ) { - mProxy = NULL; + mObject = NULL; } /** @@ -176,13 +176,13 @@ private: DALI_ASSERT_DEBUG( mParent != NULL ); //Get the PropertyOwner the animator is going to animate - const SceneGraph::PropertyOwner* propertyOwner = mProxy->GetSceneObject(); + const SceneGraph::PropertyOwner* propertyOwner = mObject->GetSceneObject(); //Get SceneGraph::BaseProperty - const SceneGraph::PropertyBase* baseProperty = mProxy->GetSceneObjectAnimatableProperty( mPropertyIndex ); + const SceneGraph::PropertyBase* baseProperty = mObject->GetSceneObjectAnimatableProperty( mPropertyIndex ); //Check if property is a component of another property - const int componentIndex = mProxy->GetPropertyComponentIndex( mPropertyIndex ); + const int componentIndex = mObject->GetPropertyComponentIndex( mPropertyIndex ); if( componentIndex != Property::INVALID_COMPONENT_INDEX ) { mComponentIndex = componentIndex; @@ -317,7 +317,7 @@ private: protected: - ProxyObject* mProxy; ///< Not owned by the animator connector. Valid until ProxyDestroyed() is called. + Object* mObject; ///< Not owned by the animator connector. Valid until ObjectDestroyed() is called. SceneGraph::AnimatorBase* mAnimator; Property::Index mPropertyIndex; diff --git a/dali/internal/event/animation/constraint-impl.h b/dali/internal/event/animation/constraint-impl.h index 1de3625..932ee65 100644 --- a/dali/internal/event/animation/constraint-impl.h +++ b/dali/internal/event/animation/constraint-impl.h @@ -33,7 +33,7 @@ namespace Internal { class ActiveConstraintBase; -class ProxyObject; +class Object; /** * Constraints are used to constrain a property of an object, after animations have been applied. @@ -48,7 +48,7 @@ public: * Construct a new constraint which targets a property. * @param [in] target The index of the property to constrain. * @param [in] targetType The type of the constrained property. - * @param [in] sources The proxy objects which provide parameters for func. + * @param [in] sources The objects which provide parameters for func. * @param [in] func The constraint function. * @param [in] interpolator A function used to interpolate between the start value, and the value returned by func. */ diff --git a/dali/internal/event/animation/constraint-source-impl.h b/dali/internal/event/animation/constraint-source-impl.h index 8fed26e..8e1d2c1 100644 --- a/dali/internal/event/animation/constraint-source-impl.h +++ b/dali/internal/event/animation/constraint-source-impl.h @@ -21,7 +21,7 @@ // INTERNAL INCLUDES #include #include -#include +#include namespace Dali { @@ -50,8 +50,8 @@ struct Source /** * Create a constraint source from a public handle. - * The internal proxy object is not referenced by the Internal::Source; therefore - * the owner of this object is responsible for observing the ProxyObject's lifetime. + * The internal object is not referenced by the Internal::Source; therefore + * the owner of this object is responsible for observing the Object's lifetime. */ Source( Dali::ConstraintSource& source ) : sourceType( source.sourceType ), @@ -60,7 +60,7 @@ struct Source { if ( source.object ) { - object = &dynamic_cast< ProxyObject& > ( GetImplementation(source.object) ); + object = &dynamic_cast< Object& > ( GetImplementation(source.object) ); } } @@ -68,7 +68,7 @@ struct Source Property::Index propertyIndex; ///< The index of the source property - ProxyObject* object; ///< The target object; only valid if sourceType == OBJECT_PROPERTY + Object* object; ///< The target object; only valid if sourceType == OBJECT_PROPERTY }; } // namespace Internal diff --git a/dali/internal/event/animation/path-impl.cpp b/dali/internal/event/animation/path-impl.cpp index 7edc684..c1ecca0 100644 --- a/dali/internal/event/animation/path-impl.cpp +++ b/dali/internal/event/animation/path-impl.cpp @@ -63,7 +63,7 @@ Path* Path::New() } Path::Path() -:ProxyObject() +: Object() { } diff --git a/dali/internal/event/animation/path-impl.h b/dali/internal/event/animation/path-impl.h index 78ccb1d..671cbd5 100644 --- a/dali/internal/event/animation/path-impl.h +++ b/dali/internal/event/animation/path-impl.h @@ -23,7 +23,7 @@ #include #include #include -#include +#include namespace Dali { @@ -35,7 +35,7 @@ typedef IntrusivePtr PathPtr; /** * A 3D path */ -class Path : public ProxyObject +class Path : public Object { public: @@ -58,82 +58,82 @@ protected: private: /** - * @copydoc Dali::Internal::ProxyObject::Observer::SceneObjectAdded() + * @copydoc Dali::Internal::Object::Observer::SceneObjectAdded() */ - virtual void SceneObjectAdded(ProxyObject& proxy){} + virtual void SceneObjectAdded(Object& object){} /** - * @copydoc Dali::Internal::ProxyObject::Observer::SceneObjectAdded() + * @copydoc Dali::Internal::Object::Observer::SceneObjectAdded() */ - virtual void SceneObjectRemoved(ProxyObject& proxy){} + virtual void SceneObjectRemoved(Object& object){} /** - * @copydoc Dali::Internal::ProxyObject::Observer::ProxyDestroyed() + * @copydoc Dali::Internal::Object::Observer::ObjectDestroyed() */ - virtual void ProxyDestroyed(ProxyObject& proxy){} + virtual void ObjectDestroyed(Object& object){} /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount() + * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() */ virtual unsigned int GetDefaultPropertyCount() const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName() + * @copydoc Dali::Internal::Object::GetDefaultPropertyName() */ virtual const char* GetDefaultPropertyName(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() */ virtual bool IsDefaultPropertyWritable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() */ virtual bool IsDefaultPropertyAnimatable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType() + * @copydoc Dali::Internal::Object::GetDefaultPropertyType() */ virtual Property::Type GetDefaultPropertyType(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty() + * @copydoc Dali::Internal::Object::SetDefaultProperty() */ virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue); /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty() + * @copydoc Dali::Internal::Object::GetDefaultProperty() */ virtual Property::Value GetDefaultProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObject() + * @copydoc Dali::Internal::Object::GetSceneObject() */ virtual const SceneGraph::PropertyOwner* GetSceneObject() const{ return NULL; } /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectAnimatableProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty() */ virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const{ return NULL; } /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectInputProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty() */ virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const{ return NULL; } diff --git a/dali/internal/event/common/proxy-object.cpp b/dali/internal/event/common/object-impl.cpp similarity index 90% rename from dali/internal/event/common/proxy-object.cpp rename to dali/internal/event/common/object-impl.cpp index 7d00513..b49b7ce 100644 --- a/dali/internal/event/common/proxy-object.cpp +++ b/dali/internal/event/common/object-impl.cpp @@ -16,7 +16,7 @@ */ // CLASS HEADER -#include +#include // EXTERNAL INCLUDES #include @@ -44,32 +44,32 @@ namespace Internal namespace // unnamed namespace { -const int SUPPORTED_CAPABILITIES = Dali::Handle::DYNAMIC_PROPERTIES; // ProxyObject provides this capability -typedef Dali::Vector::Iterator ObserverIter; -typedef Dali::Vector::ConstIterator ConstObserverIter; +const int SUPPORTED_CAPABILITIES = Dali::Handle::DYNAMIC_PROPERTIES; // Object provides this capability +typedef Dali::Vector::Iterator ObserverIter; +typedef Dali::Vector::ConstIterator ConstObserverIter; #if defined(DEBUG_ENABLED) -Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_PROXY_OBJECT" ); +Debug::Filter* gLogFilter = Debug::Filter::New(Debug::NoLogging, false, "LOG_OBJECT" ); #endif } // unnamed namespace -ProxyObject::ProxyObject() +Object::Object() : mTypeInfo( NULL ), mConstraints( NULL ), mPropertyNotifications( NULL ) { } -void ProxyObject::AddObserver(Observer& observer) +void Object::AddObserver(Observer& observer) { // make sure an observer doesn't observe the same object twice - // otherwise it will get multiple calls to OnSceneObjectAdd(), OnSceneObjectRemove() and ProxyDestroyed() + // otherwise it will get multiple calls to OnSceneObjectAdd(), OnSceneObjectRemove() and ObjectDestroyed() DALI_ASSERT_DEBUG( mObservers.End() == std::find( mObservers.Begin(), mObservers.End(), &observer)); mObservers.PushBack( &observer ); } -void ProxyObject::RemoveObserver(Observer& observer) +void Object::RemoveObserver(Observer& observer) { // Find the observer... const ConstObserverIter endIter = mObservers.End(); @@ -84,7 +84,7 @@ void ProxyObject::RemoveObserver(Observer& observer) DALI_ASSERT_DEBUG(endIter != mObservers.End()); } -void ProxyObject::OnSceneObjectAdd() +void Object::OnSceneObjectAdd() { // Notification for this object's constraints if( mConstraints ) @@ -107,7 +107,7 @@ void ProxyObject::OnSceneObjectAdd() EnablePropertyNotifications(); } -void ProxyObject::OnSceneObjectRemove() +void Object::OnSceneObjectRemove() { // Notification for this object's constraints if( mConstraints ) @@ -130,17 +130,17 @@ void ProxyObject::OnSceneObjectRemove() DisablePropertyNotifications(); } -int ProxyObject::GetPropertyComponentIndex( Property::Index index ) const +int Object::GetPropertyComponentIndex( Property::Index index ) const { return Property::INVALID_COMPONENT_INDEX; } -bool ProxyObject::Supports( Capability capability ) const +bool Object::Supports( Capability capability ) const { return (capability & SUPPORTED_CAPABILITIES); } -unsigned int ProxyObject::GetPropertyCount() const +unsigned int Object::GetPropertyCount() const { unsigned int count = GetDefaultPropertyCount(); @@ -164,7 +164,7 @@ unsigned int ProxyObject::GetPropertyCount() const return count; } -std::string ProxyObject::GetPropertyName( Property::Index index ) const +std::string Object::GetPropertyName( Property::Index index ) const { DALI_ASSERT_ALWAYS( index > Property::INVALID_INDEX && "Property index out of bounds" ); @@ -194,7 +194,7 @@ std::string ProxyObject::GetPropertyName( Property::Index index ) const return ""; } -Property::Index ProxyObject::GetPropertyIndex(const std::string& name) const +Property::Index Object::GetPropertyIndex(const std::string& name) const { Property::Index index = GetDefaultPropertyIndex( name ); @@ -225,7 +225,7 @@ Property::Index ProxyObject::GetPropertyIndex(const std::string& name) const return index; } -bool ProxyObject::IsPropertyWritable( Property::Index index ) const +bool Object::IsPropertyWritable( Property::Index index ) const { DALI_ASSERT_ALWAYS(index > Property::INVALID_INDEX && "Property index is out of bounds"); @@ -255,7 +255,7 @@ bool ProxyObject::IsPropertyWritable( Property::Index index ) const return false; } -bool ProxyObject::IsPropertyAnimatable( Property::Index index ) const +bool Object::IsPropertyAnimatable( Property::Index index ) const { DALI_ASSERT_ALWAYS(index > Property::INVALID_INDEX && "Property index is out of bounds"); @@ -278,7 +278,7 @@ bool ProxyObject::IsPropertyAnimatable( Property::Index index ) const return false; } -bool ProxyObject::IsPropertyAConstraintInput( Property::Index index ) const +bool Object::IsPropertyAConstraintInput( Property::Index index ) const { DALI_ASSERT_ALWAYS(index > Property::INVALID_INDEX && "Property index is out of bounds"); @@ -302,7 +302,7 @@ bool ProxyObject::IsPropertyAConstraintInput( Property::Index index ) const return false; } -Property::Type ProxyObject::GetPropertyType( Property::Index index ) const +Property::Type Object::GetPropertyType( Property::Index index ) const { DALI_ASSERT_ALWAYS(index > Property::INVALID_INDEX && "Property index is out of bounds" ); @@ -332,7 +332,7 @@ Property::Type ProxyObject::GetPropertyType( Property::Index index ) const return Property::NONE; } -void ProxyObject::SetProperty( Property::Index index, const Property::Value& propertyValue ) +void Object::SetProperty( Property::Index index, const Property::Value& propertyValue ) { DALI_ASSERT_ALWAYS(index > Property::INVALID_INDEX && "Property index is out of bounds" ); @@ -370,7 +370,7 @@ void ProxyObject::SetProperty( Property::Index index, const Property::Value& pro } } -Property::Value ProxyObject::GetProperty(Property::Index index) const +Property::Value Object::GetProperty(Property::Index index) const { DALI_ASSERT_ALWAYS( index > Property::INVALID_INDEX && "Property index is out of bounds" ); @@ -501,7 +501,7 @@ Property::Value ProxyObject::GetProperty(Property::Index index) const return value; } -void ProxyObject::GetPropertyIndices( Property::IndexContainer& indices ) const +void Object::GetPropertyIndices( Property::IndexContainer& indices ) const { indices.clear(); @@ -530,7 +530,7 @@ void ProxyObject::GetPropertyIndices( Property::IndexContainer& indices ) const } } -Property::Index ProxyObject::RegisterProperty( const std::string& name, const Property::Value& propertyValue) +Property::Index Object::RegisterProperty( const std::string& name, const Property::Value& propertyValue) { // Create a new property Dali::Internal::OwnerPointer newProperty; @@ -636,7 +636,7 @@ Property::Index ProxyObject::RegisterProperty( const std::string& name, const Pr return index; } -Property::Index ProxyObject::RegisterProperty( const std::string& name, const Property::Value& propertyValue, Property::AccessMode accessMode) +Property::Index Object::RegisterProperty( const std::string& name, const Property::Value& propertyValue, Property::AccessMode accessMode) { Property::Index index = Property::INVALID_INDEX; @@ -654,7 +654,7 @@ Property::Index ProxyObject::RegisterProperty( const std::string& name, const Pr return index; } -Dali::PropertyNotification ProxyObject::AddPropertyNotification(Property::Index index, +Dali::PropertyNotification Object::AddPropertyNotification(Property::Index index, int componentIndex, const Dali::PropertyCondition& condition) { @@ -687,7 +687,7 @@ Dali::PropertyNotification ProxyObject::AddPropertyNotification(Property::Index return propertyNotification; } -void ProxyObject::RemovePropertyNotification(Dali::PropertyNotification propertyNotification) +void Object::RemovePropertyNotification(Dali::PropertyNotification propertyNotification) { if( mPropertyNotifications ) { @@ -707,7 +707,7 @@ void ProxyObject::RemovePropertyNotification(Dali::PropertyNotification property } } -void ProxyObject::RemovePropertyNotifications() +void Object::RemovePropertyNotifications() { if( mPropertyNotifications ) { @@ -724,7 +724,7 @@ void ProxyObject::RemovePropertyNotifications() } } -void ProxyObject::EnablePropertyNotifications() +void Object::EnablePropertyNotifications() { if( mPropertyNotifications ) { @@ -738,7 +738,7 @@ void ProxyObject::EnablePropertyNotifications() } } -void ProxyObject::DisablePropertyNotifications() +void Object::DisablePropertyNotifications() { if( mPropertyNotifications ) { @@ -752,17 +752,17 @@ void ProxyObject::DisablePropertyNotifications() } } -Dali::ActiveConstraint ProxyObject::ApplyConstraint( Constraint& constraint ) +Dali::ActiveConstraint Object::ApplyConstraint( Constraint& constraint ) { return Dali::ActiveConstraint( DoApplyConstraint( constraint, Dali::Constrainable() ) ); } -Dali::ActiveConstraint ProxyObject::ApplyConstraint( Constraint& constraint, Dali::Constrainable weightObject ) +Dali::ActiveConstraint Object::ApplyConstraint( Constraint& constraint, Dali::Constrainable weightObject ) { return Dali::ActiveConstraint( DoApplyConstraint( constraint, weightObject ) ); } -ActiveConstraintBase* ProxyObject::DoApplyConstraint( Constraint& constraint, Dali::Constrainable weightObject ) +ActiveConstraintBase* Object::DoApplyConstraint( Constraint& constraint, Dali::Constrainable weightObject ) { ActiveConstraintBase* activeConstraintImpl = constraint.CreateActiveConstraint(); DALI_ASSERT_DEBUG( NULL != activeConstraintImpl ); @@ -771,7 +771,7 @@ ActiveConstraintBase* ProxyObject::DoApplyConstraint( Constraint& constraint, Da if( weightObject ) { - ProxyObject& weightObjectImpl = GetImplementation( weightObject ); + Object& weightObjectImpl = GetImplementation( weightObject ); Property::Index weightIndex = weightObjectImpl.GetPropertyIndex( "weight" ); if( Property::INVALID_INDEX != weightIndex ) @@ -791,7 +791,7 @@ ActiveConstraintBase* ProxyObject::DoApplyConstraint( Constraint& constraint, Da return activeConstraintImpl; } -void ProxyObject::SetSceneGraphProperty( Property::Index index, const CustomProperty& entry, const Property::Value& value ) +void Object::SetSceneGraphProperty( Property::Index index, const CustomProperty& entry, const Property::Value& value ) { switch ( entry.type ) { @@ -892,7 +892,7 @@ void ProxyObject::SetSceneGraphProperty( Property::Index index, const CustomProp } } -const TypeInfo* ProxyObject::GetTypeInfo() const +const TypeInfo* Object::GetTypeInfo() const { if ( !mTypeInfo ) { @@ -909,7 +909,7 @@ const TypeInfo* ProxyObject::GetTypeInfo() const return mTypeInfo; } -void ProxyObject::RemoveConstraint( ActiveConstraint& constraint, bool isInScenegraph ) +void Object::RemoveConstraint( ActiveConstraint& constraint, bool isInScenegraph ) { // guard against constraint sending messages during core destruction if ( Stage::IsInstalled() ) @@ -922,7 +922,7 @@ void ProxyObject::RemoveConstraint( ActiveConstraint& constraint, bool isInScene } } -void ProxyObject::RemoveConstraint( Dali::ActiveConstraint activeConstraint ) +void Object::RemoveConstraint( Dali::ActiveConstraint activeConstraint ) { // guard against constraint sending messages during core destruction if( mConstraints && Stage::IsInstalled() ) @@ -938,7 +938,7 @@ void ProxyObject::RemoveConstraint( Dali::ActiveConstraint activeConstraint ) } } -void ProxyObject::RemoveConstraints( unsigned int tag ) +void Object::RemoveConstraints( unsigned int tag ) { // guard against constraint sending messages during core destruction if( mConstraints && Stage::IsInstalled() ) @@ -962,7 +962,7 @@ void ProxyObject::RemoveConstraints( unsigned int tag ) } } -void ProxyObject::RemoveConstraints() +void Object::RemoveConstraints() { // guard against constraint sending messages during core destruction if( mConstraints && Stage::IsInstalled() ) @@ -983,15 +983,15 @@ void ProxyObject::RemoveConstraints() } } -void ProxyObject::SetTypeInfo( const TypeInfo* typeInfo ) +void Object::SetTypeInfo( const TypeInfo* typeInfo ) { mTypeInfo = typeInfo; } -ProxyObject::~ProxyObject() +Object::~Object() { // Notification for this object's constraints - // (note that the ActiveConstraint handles may outlive the ProxyObject) + // (note that the ActiveConstraint handles may outlive the Object) if( mConstraints ) { const ActiveConstraintConstIter endIter = mConstraints->end(); @@ -1005,14 +1005,14 @@ ProxyObject::~ProxyObject() // Notification for observers for( ConstObserverIter iter = mObservers.Begin(), endIter = mObservers.End(); iter != endIter; ++iter) { - (*iter)->ProxyDestroyed(*this); + (*iter)->ObjectDestroyed(*this); } delete mConstraints; delete mPropertyNotifications; } -CustomProperty* ProxyObject::FindCustomProperty( Property::Index index ) const +CustomProperty* Object::FindCustomProperty( Property::Index index ) const { CustomProperty* property( NULL ); int arrayIndex = index - PROPERTY_CUSTOM_START_INDEX; diff --git a/dali/internal/event/common/object-impl.h b/dali/internal/event/common/object-impl.h index df70fa5..270a73b 100644 --- a/dali/internal/event/common/object-impl.h +++ b/dali/internal/event/common/object-impl.h @@ -19,9 +19,23 @@ */ // INTERNAL INCLUDES +#include +#include +#include +#include #include +#include #include #include +#include +#include +#include +#include +#include +#include +#include +#include + namespace Dali { @@ -30,14 +44,50 @@ class PropertyNotification; namespace Internal { +class Constraint; class Handle; - class PropertyCondition; +class PropertyInputImpl; +class Stage; +class TypeInfo; + +/** + * @brief Structure for setting up default properties and their details. + */ +struct PropertyDetails +{ + const char* name; ///< The name of the property. + Property::Type type; ///< The property type. + bool writable:1; ///< Whether the property is writable + bool animatable:1; ///< Whether the property is animatable. + bool constraintInput:1; ///< Whether the property can be used as an input to a constraint. +}; + +namespace SceneGraph +{ +class PropertyBase; +class PropertyOwner; +} + +typedef std::vector< Dali::ActiveConstraint > ActiveConstraintContainer; +typedef ActiveConstraintContainer::iterator ActiveConstraintIter; +typedef ActiveConstraintContainer::const_iterator ActiveConstraintConstIter; /** * A base class for objects which optionally provide properties. * The concrete derived class is responsible for implementing the property system methods. * Classes may derive from Dali::BaseObject, until any properties are required. + * + * An object for a property-owning object in the scene-graph. + * This provides an interface for observing the addition/removal of scene-objects. + * + * The concrete derived class is responsible for: + * 1) Adding & removing an object from the scene-graph. The OnSceneObjectAdd() and OnSceneObjectRemove() + * methods should be called by the derived class, to trigger observer callbacks. + * 3) Implementing the GetSceneObject() methods, used to access the scene-object. + * 4) Providing access to properties stored by the scene-graph object. These should match the properties + * reported by the base Dali::Internal::Object methods. + * */ class Object : public Dali::BaseObject { @@ -45,104 +95,346 @@ public: typedef Dali::Handle::Capability Capability; + class Observer + { + public: + + /** + * Called immediately after the object has created & passed ownership of a scene-graph object. + * @param[in] object The object object. + */ + virtual void SceneObjectAdded(Object& object) = 0; + + /** + * Called shortly before the object sends a message to remove its scene object. + * @param[in] object The object object. + */ + virtual void SceneObjectRemoved(Object& object) = 0; + + /** + * Called shortly before the object itself is destroyed; no further callbacks will be received. + * @param[in] object The object object. + */ + virtual void ObjectDestroyed(Object& object) = 0; + + protected: + + /** + * Virtual destructor + */ + virtual ~Observer(){} + }; + + /** + * Constructor. + */ + Object(); + + /** + * Add an observer to the object. + * @param[in] observer The observer to add. + */ + virtual void AddObserver( Observer& observer ); + + /** + * Remove an observer from the object + * @pre The observer has already been added. + * @param[in] observer The observer to remove. + */ + virtual void RemoveObserver( Observer& observer ); + /** * @copydoc Dali::Handle::Supports() */ - virtual bool Supports( Capability capability ) const = 0; + virtual bool Supports( Capability capability ) const; /** * @copydoc Dali::Handle::GetPropertyCount() */ - virtual unsigned int GetPropertyCount() const = 0; + virtual unsigned int GetPropertyCount() const; /** * @copydoc Dali::Handle::GetPropertyName() */ - virtual std::string GetPropertyName( Property::Index index ) const = 0; + virtual std::string GetPropertyName( Property::Index index ) const; /** * @copydoc Dali::Handle::GetPropertyIndex() */ - virtual Property::Index GetPropertyIndex( const std::string& name ) const = 0; + virtual Property::Index GetPropertyIndex( const std::string& name ) const; /** * @copydoc Dali::Handle::IsPropertyWritable() */ - virtual bool IsPropertyWritable( Property::Index index ) const = 0; + virtual bool IsPropertyWritable( Property::Index index ) const; /** * @copydoc Dali::Handle::IsPropertyAnimatable() */ - virtual bool IsPropertyAnimatable( Property::Index index ) const = 0; + virtual bool IsPropertyAnimatable( Property::Index index ) const; /** * @copydoc Dali::Handle::IsPropertyAConstraintInput() */ - virtual bool IsPropertyAConstraintInput( Property::Index index ) const = 0; + virtual bool IsPropertyAConstraintInput( Property::Index index ) const; /** * @copydoc Dali::Handle::GetPropertyType() */ - virtual Property::Type GetPropertyType( Property::Index index ) const = 0; + virtual Property::Type GetPropertyType( Property::Index index ) const; /** * @copydoc Dali::Handle::SetProperty() */ - virtual void SetProperty( Property::Index index, const Property::Value& propertyValue ) = 0; + virtual void SetProperty( Property::Index index, const Property::Value& propertyValue ); /** * @copydoc Dali::Handle::GetProperty() */ - virtual Property::Value GetProperty( Property::Index index ) const = 0; + virtual Property::Value GetProperty( Property::Index index ) const; /** * @copydoc Dali::Handle::GetPropertyIndices() */ - virtual void GetPropertyIndices( Property::IndexContainer& indices ) const = 0; + virtual void GetPropertyIndices( Property::IndexContainer& indices ) const; /** * @copydoc Dali::Handle::RegisterProperty() */ - virtual Property::Index RegisterProperty( const std::string& name, const Property::Value& propertyValue ) = 0; + virtual Property::Index RegisterProperty( const std::string& name, const Property::Value& propertyValue ); /** * @copydoc Dali::Handle::RegisterProperty(std::string name, Property::Value propertyValue, Property::AccessMode accessMode) */ - virtual Property::Index RegisterProperty( const std::string& name, const Property::Value& propertyValue, Property::AccessMode accessMode ) = 0; + virtual Property::Index RegisterProperty( const std::string& name, const Property::Value& propertyValue, Property::AccessMode accessMode ); /** * @copydoc Dali::Handle::AddPropertyNotification() */ virtual Dali::PropertyNotification AddPropertyNotification( Property::Index index, int componentIndex, - const Dali::PropertyCondition& condition ) = 0; + const Dali::PropertyCondition& condition ); /** * @copydoc Dali::Handle::RemovePropertyNotification() */ - virtual void RemovePropertyNotification( Dali::PropertyNotification propertyNotification ) = 0; + virtual void RemovePropertyNotification( Dali::PropertyNotification propertyNotification ); /** * @copydoc Dali::Handle::RemovePropertyNotifications() */ - virtual void RemovePropertyNotifications() = 0; + virtual void RemovePropertyNotifications(); -protected: + // Constraints + + /** + * Apply a constraint to a Object. + * @param[in] constraint The constraint to apply. + */ + Dali::ActiveConstraint ApplyConstraint( Constraint& constraint ); + + /** + * Apply a constraint to a Object. + * @param[in] constraint The constraint to apply. + * @param[in] weightObject An object with a "weight" float property. + */ + Dali::ActiveConstraint ApplyConstraint( Constraint& constraint, Dali::Constrainable weightObject ); + + /** + * Remove one constraint from a Object. + * @param[in] activeConstraint The active constraint to remove. + */ + void RemoveConstraint( Dali::ActiveConstraint activeConstraint ); + + /** + * Remove all constraints from a Object. + */ + void RemoveConstraints(); /** - * Default constructor. + * Remove all constraints from a Object with a matching tag */ - Object() + void RemoveConstraints( unsigned int tag ); + + /** + * Called by TypeInfo to set the type-info that this object-impl is created by. + * @param[in] typeInfo The TypeInfo that creates this object-impl. + */ + void SetTypeInfo( const TypeInfo* typeInfo ); + + /** + * @return the index from which custom properties start + */ + unsigned int CustomPropertyStartIndex() { + return PROPERTY_CUSTOM_START_INDEX; } + // To be overridden by deriving classes + + /** + * 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* GetSceneObject() const = 0; + + /** + * Retrieve an animatable property owned by the scene-graph object. + * @pre -1 < index < GetPropertyCount(). + * @param[in] index The index of the property. + * @return A dereferenceable pointer to a property, or NULL if a scene-object does not exist with this property. + */ + virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const = 0; + + /** + * Retrieve an constraint input-property owned by the scene-graph object. + * @pre -1 < index < GetPropertyCount(). + * @param[in] index The index of the property. + * @return A dereferenceable pointer to an input property, or NULL if a scene-object does not exist with this property. + */ + virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const = 0; + + /** + * Query whether the property is a component of a scene-graph property. + * @pre -1 < index < GetPropertyCount(). + * @param[in] index The index of the property. + * @return The index or Property::INVALID_COMPONENT_INDEX. + */ + virtual int GetPropertyComponentIndex( Property::Index index ) const; + +protected: + /** * A reference counted object may only be deleted by calling Unreference() */ - virtual ~Object() + virtual ~Object(); + + /** + * Called immediately by derived classes, after the scene-object has been created & passed to the scene-graph. + */ + void OnSceneObjectAdd(); + + /** + * Called by derived classes, shortly before send a message to remove the scene-object. + */ + void OnSceneObjectRemove(); + + /** + * For use in derived classes. + * This is called after a non animatable custom 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 + */ + CustomProperty* FindCustomProperty( Property::Index index ) const; + +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(); } + /** + * Notify derived class of installation of a new scene-object property. + * This method is called after the message is to sent to install the property + * @param [in] newProperty A newly allocated scene-object property. Ownership is obviously not passed. + * @param [in] name The name allocated to this custom property. + * @param [in] index The index allocated to this custom property. + */ + virtual void NotifyScenePropertyInstalled( const SceneGraph::PropertyBase& newProperty, const std::string& name, unsigned int index ) + { } + private: // Not implemented @@ -150,6 +442,52 @@ private: // Not implemented Object& operator=(const Object& rhs); + + /** + * Enable property notifications in scene graph + */ + void EnablePropertyNotifications(); + + /** + * Enable property notifications in scene graph + */ + void DisablePropertyNotifications(); + + /** + * Helper for ApplyConstraint overloads. + * @param[in] constraint The constraint to apply. + * @param[in] weightObject An object with a "weight" float property, or an empty handle. + * @return The new active-constraint which is owned by Object. + */ + ActiveConstraintBase* DoApplyConstraint( Constraint& constraint, Dali::Constrainable weightObject ); + + /** + * Helper to remove active constraints + */ + void RemoveConstraint( ActiveConstraint& constraint, bool isInScenegraph ); + + /** + * Set the value of scene graph property. + * @param [in] index The index of the property. + * @param [in] entry An entry from the CustomPropertyLookup. + * @param [in] value The new value of the property. + */ + virtual void SetSceneGraphProperty( Property::Index index, const CustomProperty& entry, const Property::Value& value ); + +private: + + typedef OwnerContainer CustomPropertyLookup; + CustomPropertyLookup mCustomProperties; ///< Used for accessing custom Node properties + mutable TypeInfo const * mTypeInfo; ///< The type-info for this object, mutable so it can be lazy initialized from const method if it is required + + Dali::Vector mObservers; + + ActiveConstraintContainer* mConstraints; ///< Container of owned active-constraints. + + typedef std::vector< Dali::PropertyNotification > PropertyNotificationContainer; + typedef PropertyNotificationContainer::iterator PropertyNotificationContainerIter; + typedef PropertyNotificationContainer::const_iterator PropertyNotificationContainerConstIter; + PropertyNotificationContainer* mPropertyNotifications; ///< Container of owned property notifications. }; } // namespace Internal diff --git a/dali/internal/event/common/property-notification-impl.cpp b/dali/internal/event/common/property-notification-impl.cpp index ca4a4b8..7531a64 100644 --- a/dali/internal/event/common/property-notification-impl.cpp +++ b/dali/internal/event/common/property-notification-impl.cpp @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include #include #include @@ -65,7 +65,7 @@ PropertyNotification::PropertyNotification(UpdateManager& updateManager, : mUpdateManager(updateManager), mPropertyNotification(NULL), mPropertyNotificationManager(propertyNotificationManager), - mProxyPropertyIndex(target.propertyIndex), + mObjectPropertyIndex(target.propertyIndex), mPropertyType(Property::NONE), mComponentIndex(componentIndex), mCondition(condition), @@ -86,13 +86,13 @@ PropertyNotification::PropertyNotification(UpdateManager& updateManager, ++iter; } - // Observe target proxy and create/destroy notification scene object accordingly. - mProxy = dynamic_cast( &GetImplementation(target.object) ); - if ( mProxy ) + // Observe target object and create/destroy notification scene object accordingly. + mObject = dynamic_cast( &GetImplementation(target.object) ); + if ( mObject ) { - mPropertyType = mProxy->GetPropertyType(mProxyPropertyIndex); + mPropertyType = mObject->GetPropertyType(mObjectPropertyIndex); - int internalComponentIndex = mProxy->GetPropertyComponentIndex(mProxyPropertyIndex); + int internalComponentIndex = mObject->GetPropertyComponentIndex(mObjectPropertyIndex); if( internalComponentIndex != Property::INVALID_COMPONENT_INDEX ) { // override the one passed in @@ -100,7 +100,7 @@ PropertyNotification::PropertyNotification(UpdateManager& updateManager, } if(mComponentIndex != Property::INVALID_COMPONENT_INDEX) { - Property::Type type = mProxy->GetPropertyType(mProxyPropertyIndex); + Property::Type type = mObject->GetPropertyType(mObjectPropertyIndex); if( type == Property::VECTOR2 || type == Property::VECTOR3 || type == Property::VECTOR4 ) @@ -111,7 +111,7 @@ PropertyNotification::PropertyNotification(UpdateManager& updateManager, // Check if target scene-object already present, and if so create our notification // scene-object - const SceneGraph::PropertyOwner* object = mProxy->GetSceneObject(); + const SceneGraph::PropertyOwner* object = mObject->GetSceneObject(); if (object) { CreateSceneObject(); @@ -173,14 +173,14 @@ const Dali::PropertyCondition& PropertyNotification::GetCondition() const Dali::Handle PropertyNotification::GetTarget() const { - Dali::Handle handle(mProxy); + Dali::Handle handle(mObject); return handle; } Property::Index PropertyNotification::GetTargetProperty() const { - return mProxyPropertyIndex; + return mObjectPropertyIndex; } void PropertyNotification::SetNotifyMode( NotifyMode mode ) @@ -213,8 +213,8 @@ void PropertyNotification::CreateSceneObject() if( !mPropertyNotification ) { // Create a new PropertyNotification, temporarily owned - SceneGraph::PropertyNotification* propertyNotification = SceneGraph::PropertyNotification::New( *mProxy, - mProxyPropertyIndex, + SceneGraph::PropertyNotification* propertyNotification = SceneGraph::PropertyNotification::New( *mObject, + mObjectPropertyIndex, mPropertyType, mComponentIndex, GetImplementation(mCondition).type, diff --git a/dali/internal/event/common/property-notification-impl.h b/dali/internal/event/common/property-notification-impl.h index f6c2768..d337365 100644 --- a/dali/internal/event/common/property-notification-impl.h +++ b/dali/internal/event/common/property-notification-impl.h @@ -40,7 +40,7 @@ class UpdateManager; class Actor; class PropertyNotification; -class ProxyObject; +class Object; class PropertyNotificationManager; typedef IntrusivePtr PropertyNotificationPtr; @@ -189,8 +189,8 @@ protected: private: PropertyNotificationManager& mPropertyNotificationManager; ///< Reference to the property notification manager - ProxyObject* mProxy; ///< Target object, not owned by PropertyNotification. - Property::Index mProxyPropertyIndex; ///< Target object's property index of interest. + Object* mObject; ///< Target object, not owned by PropertyNotification. + Property::Index mObjectPropertyIndex; ///< Target object's property index of interest. Property::Type mPropertyType; ///< The type of property to evaluate int mComponentIndex; ///< Index to a specific component of a complex property such as a Vector Dali::PropertyCondition mCondition; ///< The PropertyCondition handle. diff --git a/dali/internal/event/common/proxy-object.h b/dali/internal/event/common/proxy-object.h deleted file mode 100644 index 0ae1e31..0000000 --- a/dali/internal/event/common/proxy-object.h +++ /dev/null @@ -1,507 +0,0 @@ -#ifndef __DALI_INTERNAL_PROXY_OBJECT_H__ -#define __DALI_INTERNAL_PROXY_OBJECT_H__ - -/* - * Copyright (c) 2014 Samsung Electronics Co., Ltd. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - */ - -// EXTERNAL INCLUDES -#include - -// INTERNAL INCLUDES -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -namespace Dali -{ - -namespace Internal -{ - -class Stage; -class PropertyInputImpl; -class ProxyObject; -class Constraint; -class TypeInfo; - -/** - * @brief Structure for setting up default properties and their details. - */ -struct PropertyDetails -{ - const char* name; ///< The name of the property. - Property::Type type; ///< The property type. - bool writable:1; ///< Whether the property is writable - bool animatable:1; ///< Whether the property is animatable. - bool constraintInput:1; ///< Whether the property can be used as an input to a constraint. -}; - -namespace SceneGraph -{ -class PropertyBase; -class PropertyOwner; -} - -typedef std::vector< Dali::ActiveConstraint > ActiveConstraintContainer; -typedef ActiveConstraintContainer::iterator ActiveConstraintIter; -typedef ActiveConstraintContainer::const_iterator ActiveConstraintConstIter; - -/** - * A proxy for a property-owning object in the scene-graph. - * This provides an interface for observing the addition/removal of scene-objects. - * - * The concrete derived class is responsible for: - * 1) Adding & removing an object from the scene-graph. The OnSceneObjectAdd() and OnSceneObjectRemove() - * methods should be called by the derived class, to trigger observer callbacks. - * 3) Implementing the GetSceneObject() methods, used to access the scene-object. - * 4) Providing access to properties stored by the scene-graph object. These should match the properties - * reported by the base Dali::Internal::Object methods. - */ -class ProxyObject : public Object -{ -public: - - class Observer - { - public: - - /** - * Called immediately after the proxy has created & passed ownership of a scene-graph object. - * @param[in] proxy The proxy object. - */ - virtual void SceneObjectAdded(ProxyObject& proxy) = 0; - - /** - * Called shortly before the proxy sends a message to remove its scene object. - * @param[in] proxy The proxy object. - */ - virtual void SceneObjectRemoved(ProxyObject& proxy) = 0; - - /** - * Called shortly before the proxy itself is destroyed; no further callbacks will be received. - * @param[in] proxy The proxy object. - */ - virtual void ProxyDestroyed(ProxyObject& proxy) = 0; - - protected: - /** - * Virtual destructor - */ - virtual ~Observer(){} - }; - - /** - * Constructor. - */ - ProxyObject(); - - /** - * Add an observer to the proxy. - * @param[in] observer The observer to add. - */ - virtual void AddObserver( Observer& observer ); - - /** - * Remove an observer from the proxy - * @pre The observer has already been added. - * @param[in] observer The observer to remove. - */ - virtual void RemoveObserver( Observer& observer ); - - /** - * Retrieve the scene-graph object added by this proxy. - * @return A pointer to the object, or NULL if no object has been added to the scene-graph. - */ - virtual const SceneGraph::PropertyOwner* GetSceneObject() const = 0; - - /** - * Retrieve an animatable property owned by the scene-graph object. - * @pre -1 < index < GetPropertyCount(). - * @param[in] index The index of the property. - * @return A dereferenceable pointer to a property, or NULL if a scene-object does not exist with this property. - */ - virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const = 0; - - /** - * Retrieve an constraint input-property owned by the scene-graph object. - * @pre -1 < index < GetPropertyCount(). - * @param[in] index The index of the property. - * @return A dereferenceable pointer to an input property, or NULL if a scene-object does not exist with this property. - */ - virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const = 0; - - /** - * Query whether the property is a component of a scene-graph property. - * @pre -1 < index < GetPropertyCount(). - * @param[in] index The index of the property. - * @return The index or Property::INVALID_COMPONENT_INDEX. - */ - virtual int GetPropertyComponentIndex( Property::Index index ) const; - -public: // Property system interface from Internal::Object - - /** - * @copydoc Dali::Internal::Object::Supports() - */ - virtual bool Supports( Object::Capability capability ) const; - - /** - * @copydoc Dali::Internal::Object::GetPropertyCount() - */ - virtual unsigned int GetPropertyCount() const; - - /** - * @copydoc Dali::Internal::Object::GetPropertyName() - */ - virtual std::string GetPropertyName( Property::Index index ) const; - - /** - * @copydoc Dali::Internal::Object::GetPropertyIndex() - */ - virtual Property::Index GetPropertyIndex( const std::string& name ) const; - - /** - * @copydoc Dali::Internal::Object::IsPropertyWritable() - */ - virtual bool IsPropertyWritable( Property::Index index ) const; - - /** - * @copydoc Dali::Internal::Object::IsPropertyAnimatable() - */ - virtual bool IsPropertyAnimatable( Property::Index index ) const; - - /** - * @copydoc Dali::Internal::Object::IsPropertyAConstraintInput() - */ - virtual bool IsPropertyAConstraintInput( Property::Index index ) const; - - /** - * @copydoc Dali::Internal::Object::GetPropertyType() - */ - virtual Property::Type GetPropertyType( Property::Index index ) const; - - /** - * @copydoc Dali::Internal::Object::SetProperty() - */ - virtual void SetProperty( Property::Index index, const Property::Value& propertyValue ); - - /** - * @copydoc Dali::Internal::Object::GetProperty() - */ - virtual Property::Value GetProperty( Property::Index index ) const; - - /** - * @copydoc Dali::Handle::GetPropertyIndices() - */ - virtual void GetPropertyIndices( Property::IndexContainer& indices ) const; - - /** - * @copydoc Dali::Internal::Object::RegisterProperty() - */ - virtual Property::Index RegisterProperty( const std::string& name, const Property::Value& propertyValue ); - - /** - * @copydoc Dali::Internal::Object::RegisterProperty(std::string name, Property::Value propertyValue, Property::AccessMode accessMode) - */ - virtual Property::Index RegisterProperty( const std::string& name, const Property::Value& propertyValue, Property::AccessMode accessMode ); - - /** - * @copydoc Dali::Internal::Object::AddPropertyNotification() - */ - virtual Dali::PropertyNotification AddPropertyNotification( Property::Index index, - int componentIndex, - const Dali::PropertyCondition& condition ); - - /** - * @copydoc Dali::Internal::Object::RemovePropertyNotification() - */ - virtual void RemovePropertyNotification( Dali::PropertyNotification propertyNotification ); - - /** - * @copydoc Dali::Internal::Object::RemovePropertyNotifications() - */ - void RemovePropertyNotifications(); - -private: - - /** - * Enable property notifications in scene graph - */ - void EnablePropertyNotifications(); - - /** - * Enable property notifications in scene graph - */ - void DisablePropertyNotifications(); - -public: // Constraints - - /** - * Apply a constraint to a ProxyObject. - * @param[in] constraint The constraint to apply. - */ - Dali::ActiveConstraint ApplyConstraint( Constraint& constraint ); - - /** - * Apply a constraint to a ProxyObject. - * @param[in] constraint The constraint to apply. - * @param[in] weightObject An object with a "weight" float property. - */ - Dali::ActiveConstraint ApplyConstraint( Constraint& constraint, Dali::Constrainable weightObject ); - - /** - * Remove one constraint from a ProxyObject. - * @param[in] activeConstraint The active constraint to remove. - */ - void RemoveConstraint( Dali::ActiveConstraint activeConstraint ); - - /** - * Remove all constraints from a ProxyObject. - */ - void RemoveConstraints(); - - /** - * Remove all constraints from a ProxyObject with a matching tag - */ - void RemoveConstraints( unsigned int tag ); - -public: - - /** - * Called by TypeInfo to set the type-info that this proxy-object is created by. - * @param[in] typeInfo The TypeInfo that creates this proxy-object. - */ - void SetTypeInfo( const TypeInfo* typeInfo ); - - /** - * @return the index from which custom properties start - */ - unsigned int CustomPropertyStartIndex() - { - return PROPERTY_CUSTOM_START_INDEX; - } - -protected: - - /** - * Called immediately by derived classes, after the scene-object has been created & passed to the scene-graph. - */ - void OnSceneObjectAdd(); - - /** - * Called by derived classes, shortly before send a message to remove the scene-object. - */ - void OnSceneObjectRemove(); - - /** - * A reference counted object may only be deleted by calling Unreference() - */ - virtual ~ProxyObject(); - -private: - - // Undefined - ProxyObject( const ProxyObject& ); - - // Undefined - ProxyObject& operator=( const ProxyObject& rhs ); - - /** - * Helper for ApplyConstraint overloads. - * @param[in] constraint The constraint to apply. - * @param[in] weightObject An object with a "weight" float property, or an empty handle. - * @return The new active-constraint which is owned by ProxyObject. - */ - ActiveConstraintBase* DoApplyConstraint( Constraint& constraint, Dali::Constrainable weightObject ); - - /** - * Helper to remove active constraints - */ - void RemoveConstraint( ActiveConstraint& constraint, bool isInScenegraph ); - - /** - * Set the value of scene graph property. - * @param [in] index The index of the property. - * @param [in] entry An entry from the CustomPropertyLookup. - * @param [in] value The new value of the property. - */ - virtual void SetSceneGraphProperty( Property::Index index, const CustomProperty& entry, const Property::Value& value ); - -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 proxy. - * @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(); - } - - /** - * Notify derived class of installation of a new scene-object property. - * This method is called after the message is to sent to install the property - * @param [in] newProperty A newly allocated scene-object property. Ownership is obviously not passed. - * @param [in] name The name allocated to this custom property. - * @param [in] index The index allocated to this custom property. - */ - virtual void NotifyScenePropertyInstalled( const SceneGraph::PropertyBase& newProperty, const std::string& name, unsigned int index ) - { } - -protected: - - /** - * For use in derived classes. - * This is called after a non animatable custom 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 - */ - CustomProperty* FindCustomProperty( Property::Index index ) const; - -private: - - typedef OwnerContainer CustomPropertyLookup; - CustomPropertyLookup mCustomProperties; ///< Used for accessing custom Node properties - mutable TypeInfo const * mTypeInfo; ///< The type-info for this object, mutable so it can be lazy initialized from const method if it is required - - Dali::Vector mObservers; - - ActiveConstraintContainer* mConstraints; ///< Container of owned active-constraints. - - typedef std::vector< Dali::PropertyNotification > PropertyNotificationContainer; - typedef PropertyNotificationContainer::iterator PropertyNotificationContainerIter; - typedef PropertyNotificationContainer::const_iterator PropertyNotificationContainerConstIter; - PropertyNotificationContainer* mPropertyNotifications; ///< Container of owned property notifications. -}; - -} // namespace Internal - -inline Internal::ProxyObject& GetImplementation(Dali::Constrainable& object) -{ - DALI_ASSERT_ALWAYS( object && "ProxyObject handle is empty" ); - BaseObject& handle = object.GetBaseObject(); - return static_cast(handle); -} - -inline const Internal::ProxyObject& GetImplementation(const Dali::Constrainable& object) -{ - DALI_ASSERT_ALWAYS( object && "ProxyObject handle is empty" ); - const BaseObject& handle = object.GetBaseObject(); - return static_cast(handle); -} - - -} // namespace Dali - -#endif // __DALI_INTERNAL_PROXY_OBJECT_H__ diff --git a/dali/internal/event/common/type-info-impl.cpp b/dali/internal/event/common/type-info-impl.cpp index a4cf3bb..91e50cf 100644 --- a/dali/internal/event/common/type-info-impl.cpp +++ b/dali/internal/event/common/type-info-impl.cpp @@ -25,7 +25,7 @@ // INTERNAL INCLUDES #include #include -#include +#include using std::find_if; @@ -104,11 +104,11 @@ BaseHandle TypeInfo::CreateInstance() const if ( ret ) { BaseObject& handle = ret.GetBaseObject(); - ProxyObject *proxyObject = dynamic_cast(&handle); + Object *object = dynamic_cast(&handle); - if ( proxyObject ) + if ( object ) { - proxyObject->SetTypeInfo( this ); + object->SetTypeInfo( this ); } } } @@ -276,7 +276,7 @@ const std::string& TypeInfo::GetPropertyName( Property::Index index ) const return GetImplementation(base).GetPropertyName( index ); } - DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject + DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as Object } void TypeInfo::AddActionFunction( const std::string &actionName, Dali::TypeInfo::ActionFunction function ) @@ -406,7 +406,7 @@ bool TypeInfo::IsPropertyWritable( Property::Index index ) const } else { - DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject + DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as Object } } @@ -433,7 +433,7 @@ Property::Type TypeInfo::GetPropertyType( Property::Index index ) const } else { - DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject + DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as Object } } @@ -460,7 +460,7 @@ void TypeInfo::SetProperty( BaseObject *object, Property::Index index, const Pro } else { - DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject + DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as Object } } } @@ -504,7 +504,7 @@ Property::Value TypeInfo::GetProperty( const BaseObject *object, Property::Index return GetImplementation( base ).GetProperty( object, index ); } - DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as ProxyObject + DALI_ASSERT_ALWAYS( ! "Cannot find property index" ); // use the same assert as Object } Property::Value TypeInfo::GetProperty( const BaseObject *object, const std::string& name ) const diff --git a/dali/internal/event/effects/shader-effect-impl.h b/dali/internal/event/effects/shader-effect-impl.h index 2faee40..09b7a25 100644 --- a/dali/internal/event/effects/shader-effect-impl.h +++ b/dali/internal/event/effects/shader-effect-impl.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -39,11 +39,11 @@ class UpdateManager; } /** - * An abstract base class for a shader effect proxy. + * An abstract base class for a shader effect object. * The corresponding scene-graph object is a collection of shader programs, * which can apply the same effect to different geometry types. */ -class ShaderEffect : public ProxyObject +class ShaderEffect : public Object { public: typedef Dali::ShaderEffect::UniformCoordinateType UniformCoordinateType; @@ -132,75 +132,75 @@ public: */ void Disconnect(); -public: // Default property extensions from ProxyObject +public: // Default property extensions from Object /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount() + * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() */ virtual unsigned int GetDefaultPropertyCount() const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName() + * @copydoc Dali::Internal::Object::GetDefaultPropertyName() */ virtual const char* GetDefaultPropertyName( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex( const std::string& name ) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() */ virtual bool IsDefaultPropertyWritable( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() */ virtual bool IsDefaultPropertyAnimatable( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType() + * @copydoc Dali::Internal::Object::GetDefaultPropertyType() */ virtual Property::Type GetDefaultPropertyType( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty() + * @copydoc Dali::Internal::Object::SetDefaultProperty() */ virtual void SetDefaultProperty( Property::Index index, const Property::Value& propertyValue ); /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty() + * @copydoc Dali::Internal::Object::GetDefaultProperty() */ virtual Property::Value GetDefaultProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::NotifyScenePropertyInstalled() + * @copydoc Dali::Internal::Object::NotifyScenePropertyInstalled() */ virtual void NotifyScenePropertyInstalled( const SceneGraph::PropertyBase& newProperty, const std::string& name, unsigned int index ); /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObject() + * @copydoc Dali::Internal::Object::GetSceneObject() */ virtual const SceneGraph::PropertyOwner* GetSceneObject() const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectAnimatableProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty() */ virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectInputProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty() */ virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const; diff --git a/dali/internal/event/events/actor-observer.cpp b/dali/internal/event/events/actor-observer.cpp index ff1ce2d..f345ca7 100644 --- a/dali/internal/event/events/actor-observer.cpp +++ b/dali/internal/event/events/actor-observer.cpp @@ -83,22 +83,22 @@ void ActorObserver::ResetActor() } } -void ActorObserver::SceneObjectRemoved( ProxyObject& proxy ) +void ActorObserver::SceneObjectRemoved( Object& object ) { DALI_LOG_TRACE_METHOD( gLogFilter ); - if ( mActor == &proxy ) + if ( mActor == &object ) { - // do not call proxy.RemoveObserver here, proxy is currently iterating through observers... you wouldnt want to upset proxy now would you? + // do not call object.RemoveObserver here, object is currently iterating through observers mActorDisconnected = true; } } -void ActorObserver::ProxyDestroyed(ProxyObject& proxy) +void ActorObserver::ObjectDestroyed(Object& object) { DALI_LOG_TRACE_METHOD( gLogFilter ); - if ( mActor == &proxy ) + if ( mActor == &object ) { DALI_LOG_INFO(gLogFilter, Debug::Verbose, "Stop Observing: %p\n", mActor); mActor = NULL; diff --git a/dali/internal/event/events/actor-observer.h b/dali/internal/event/events/actor-observer.h index 1beb297..3cc8b19 100644 --- a/dali/internal/event/events/actor-observer.h +++ b/dali/internal/event/events/actor-observer.h @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include namespace Dali { @@ -32,7 +32,7 @@ class Actor; /** * Stores an actor pointer and connects/disconnects to any required signals appropriately when set/unset. */ -struct ActorObserver : public ProxyObject::Observer +struct ActorObserver : public Object::Observer { public: @@ -78,25 +78,25 @@ private: /** * This will never get called as we do not observe objects that have not been added to the scene. - * @param[in] proxy The proxy object. - * @see ProxyObject::Observer::SceneObjectAdded() + * @param[in] object The object object. + * @see Object::Observer::SceneObjectAdded() */ - virtual void SceneObjectAdded(ProxyObject& proxy) { } + virtual void SceneObjectAdded(Object& object) { } /** * This will be called when the actor is removed from the stage, we should clear and stop * observing it. - * @param[in] proxy The proxy object. - * @see ProxyObject::Observer::SceneObjectRemoved() + * @param[in] object The object object. + * @see Object::Observer::SceneObjectRemoved() */ - virtual void SceneObjectRemoved(ProxyObject& proxy); + virtual void SceneObjectRemoved(Object& object); /** * This will be called when the actor is destroyed. We should clear the actor. * No need to stop observing as the object is being destroyed anyway. - * @see ProxyObject::Observer::ProxyDestroyed() + * @see Object::Observer::ObjectDestroyed() */ - virtual void ProxyDestroyed(ProxyObject& proxy); + virtual void ObjectDestroyed(Object& object); private: Actor* mActor; ///< Raw pointer to an Actor. diff --git a/dali/internal/event/events/gesture-detector-impl.cpp b/dali/internal/event/events/gesture-detector-impl.cpp index bf012cc..eb2060d 100644 --- a/dali/internal/event/events/gesture-detector-impl.cpp +++ b/dali/internal/event/events/gesture-detector-impl.cpp @@ -160,18 +160,18 @@ bool GestureDetector::IsAttached(Actor& actor) const return find(mAttachedActors.begin(), mAttachedActors.end(), &actor) != mAttachedActors.end(); } -void GestureDetector::ProxyDestroyed(ProxyObject& proxy) +void GestureDetector::ObjectDestroyed(Object& object) { if ( !mAttachedActors.empty() ) { - GestureDetectorActorContainer::iterator match = find(mAttachedActors.begin(), mAttachedActors.end(), &proxy); + GestureDetectorActorContainer::iterator match = find(mAttachedActors.begin(), mAttachedActors.end(), &object); if ( match != mAttachedActors.end() ) { mAttachedActors.erase(match); // Notification for derived classes - OnActorDestroyed(proxy); + OnActorDestroyed(object); // Unregister from gesture event processor if we do not have any actors if ( mAttachedActors.empty() ) diff --git a/dali/internal/event/events/gesture-detector-impl.h b/dali/internal/event/events/gesture-detector-impl.h index f0566ef..3fc429c 100644 --- a/dali/internal/event/events/gesture-detector-impl.h +++ b/dali/internal/event/events/gesture-detector-impl.h @@ -56,7 +56,7 @@ struct DerivedGestureDetectorContainer /** * @copydoc Dali::GestureDetector */ -class GestureDetector : public ProxyObject, public ProxyObject::Observer +class GestureDetector : public Object, public Object::Observer { public: @@ -126,19 +126,19 @@ private: GestureDetector& operator=(const GestureDetector& rhs); /** - * @copydoc Dali::Internal::ProxyObject::Observer::SceneObjectAdded() + * @copydoc Dali::Internal::Object::Observer::SceneObjectAdded() */ - virtual void SceneObjectAdded(ProxyObject& proxy) {} + virtual void SceneObjectAdded(Object& object) {} /** - * @copydoc Dali::Internal::ProxyObject::Observer::SceneObjectAdded() + * @copydoc Dali::Internal::Object::Observer::SceneObjectAdded() */ - virtual void SceneObjectRemoved(ProxyObject& proxy) {} + virtual void SceneObjectRemoved(Object& object) {} /** - * @copydoc Dali::Internal::ProxyObject::Observer::ProxyDestroyed() + * @copydoc Dali::Internal::Object::Observer::ObjectDestroyed() */ - virtual void ProxyDestroyed(ProxyObject& proxy); + virtual void ObjectDestroyed(Object& object); /** * For use in derived classes, called after an actor is attached. @@ -160,77 +160,77 @@ private: */ virtual void OnActorDestroyed(Object& object) = 0; -private: // Default property extensions from ProxyObject +private: // Default property extensions from Object /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount() + * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() */ virtual unsigned int GetDefaultPropertyCount() const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName() + * @copydoc Dali::Internal::Object::GetDefaultPropertyName() */ virtual const char* GetDefaultPropertyName(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() */ virtual bool IsDefaultPropertyWritable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() */ virtual bool IsDefaultPropertyAnimatable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType() + * @copydoc Dali::Internal::Object::GetDefaultPropertyType() */ virtual Property::Type GetDefaultPropertyType(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty() + * @copydoc Dali::Internal::Object::SetDefaultProperty() */ virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue); /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty() + * @copydoc Dali::Internal::Object::GetDefaultProperty() */ virtual Property::Value GetDefaultProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObject() + * @copydoc Dali::Internal::Object::GetSceneObject() */ virtual const SceneGraph::PropertyOwner* GetSceneObject() const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectAnimatableProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty() */ virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectInputProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty() */ virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const; protected: Gesture::Type mType; ///< The gesture detector will detect this type of gesture. - GestureDetectorActorContainer mAttachedActors; ///< Proxy::Observer is used to provide weak-pointer behaviour + GestureDetectorActorContainer mAttachedActors; ///< Object::Observer is used to provide weak-pointer behaviour GestureEventProcessor& mGestureEventProcessor; ///< A reference to the gesture event processor. }; diff --git a/dali/internal/event/events/gesture-processor.cpp b/dali/internal/event/events/gesture-processor.cpp index 1457467..a196d1a 100644 --- a/dali/internal/event/events/gesture-processor.cpp +++ b/dali/internal/event/events/gesture-processor.cpp @@ -207,22 +207,22 @@ Actor* GestureProcessor::GetCurrentGesturedActor() return mGesturedActorDisconnected ? NULL : mCurrentGesturedActor; } -void GestureProcessor::SceneObjectRemoved(ProxyObject& proxy) +void GestureProcessor::SceneObjectRemoved(Object& object) { - if ( mCurrentGesturedActor == &proxy && + if ( mCurrentGesturedActor == &object && !mGesturedActorDisconnected ) { // Inform deriving classes. OnGesturedActorStageDisconnection(); - // do not call proxy.RemoveObserver here, proxy is currently iterating through observers... you wouldnt want to upset proxy now would you? + // do not call object.RemoveObserver here, object is currently iterating through observers... you wouldnt want to upset object now would you? mGesturedActorDisconnected = true; } } -void GestureProcessor::ProxyDestroyed(ProxyObject& proxy) +void GestureProcessor::ObjectDestroyed(Object& object) { - if ( mCurrentGesturedActor == &proxy ) + if ( mCurrentGesturedActor == &object ) { // Inform deriving classes. OnGesturedActorStageDisconnection(); diff --git a/dali/internal/event/events/gesture-processor.h b/dali/internal/event/events/gesture-processor.h index 2469f33..8b661b3 100644 --- a/dali/internal/event/events/gesture-processor.h +++ b/dali/internal/event/events/gesture-processor.h @@ -21,7 +21,7 @@ // INTERNAL INCLUDES #include #include -#include +#include namespace Dali { @@ -34,7 +34,7 @@ namespace Internal /** * Base class for the different Gesture Processors. */ -class GestureProcessor : public ProxyObject::Observer +class GestureProcessor : public Object::Observer { protected: @@ -141,25 +141,25 @@ private: /** * This will never get called as we do not observe objects that have not been added to the scene. - * @param[in] proxy The proxy object. - * @see ProxyObject::Observer::SceneObjectAdded() + * @param[in] object The object object. + * @see Object::Observer::SceneObjectAdded() */ - virtual void SceneObjectAdded(ProxyObject& proxy) { } + virtual void SceneObjectAdded(Object& object) { } /** * This will be called when the actor is removed from the stage, we should clear and stop * observing it. - * @param[in] proxy The proxy object. - * @see ProxyObject::Observer::SceneObjectRemoved() + * @param[in] object The object object. + * @see Object::Observer::SceneObjectRemoved() */ - virtual void SceneObjectRemoved(ProxyObject& proxy); + virtual void SceneObjectRemoved(Object& object); /** * This will be called when the actor is destroyed. We should clear the actor. * No need to stop observing as the object is being destroyed anyway. - * @see ProxyObject::Observer::ProxyDestroyed() + * @see Object::Observer::ObjectDestroyed() */ - virtual void ProxyDestroyed(ProxyObject& proxy); + virtual void ObjectDestroyed(Object& object); private: // Data diff --git a/dali/internal/event/events/pan-gesture-detector-impl.h b/dali/internal/event/events/pan-gesture-detector-impl.h index 262b6bf..257d123 100644 --- a/dali/internal/event/events/pan-gesture-detector-impl.h +++ b/dali/internal/event/events/pan-gesture-detector-impl.h @@ -206,70 +206,70 @@ private: virtual void OnActorDestroyed(Object& object); - // Default property extensions from ProxyObject + // Default property extensions from Object /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount() + * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() */ virtual unsigned int GetDefaultPropertyCount() const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName() + * @copydoc Dali::Internal::Object::GetDefaultPropertyName() */ virtual const char* GetDefaultPropertyName(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() */ virtual bool IsDefaultPropertyWritable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() */ virtual bool IsDefaultPropertyAnimatable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType() + * @copydoc Dali::Internal::Object::GetDefaultPropertyType() */ virtual Property::Type GetDefaultPropertyType(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty() + * @copydoc Dali::Internal::Object::SetDefaultProperty() */ virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue); /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty() + * @copydoc Dali::Internal::Object::GetDefaultProperty() */ virtual Property::Value GetDefaultProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObject() + * @copydoc Dali::Internal::Object::GetSceneObject() */ virtual const SceneGraph::PropertyOwner* GetSceneObject() const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectAnimatableProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty() */ virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectInputProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty() */ virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const; diff --git a/dali/internal/event/modeling/animatable-mesh-impl.h b/dali/internal/event/modeling/animatable-mesh-impl.h index 0d001ec..c1c71cc 100644 --- a/dali/internal/event/modeling/animatable-mesh-impl.h +++ b/dali/internal/event/modeling/animatable-mesh-impl.h @@ -21,7 +21,7 @@ // INTERNAL INCLUDES #include #include -#include +#include #include namespace Dali @@ -38,7 +38,7 @@ class AnimatableMesh; } -class AnimatableMesh : public ProxyObject +class AnimatableMesh : public Object { public: /** @@ -148,74 +148,74 @@ public: // Intended for internal use only. MeshIPtr GetMesh(); -public: // Implementation of ProxyObject +public: // Implementation of Object /** - * @copydoc Dali::Internal::ProxyObject::Supports() + * @copydoc Dali::Internal::Object::Supports() */ virtual bool Supports( Capability capability ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount() + * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() */ virtual unsigned int GetDefaultPropertyCount() const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName() + * @copydoc Dali::Internal::Object::GetDefaultPropertyName() */ virtual const char* GetDefaultPropertyName(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() */ virtual bool IsDefaultPropertyWritable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() */ virtual bool IsDefaultPropertyAnimatable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType() + * @copydoc Dali::Internal::Object::GetDefaultPropertyType() */ virtual Property::Type GetDefaultPropertyType(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty() + * @copydoc Dali::Internal::Object::SetDefaultProperty() */ virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue); /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty() + * @copydoc Dali::Internal::Object::GetDefaultProperty() */ virtual Property::Value GetDefaultProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObject() + * @copydoc Dali::Internal::Object::GetSceneObject() */ virtual const SceneGraph::PropertyOwner* GetSceneObject() const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectAnimatableProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty() */ virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectInputProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty() */ virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const; diff --git a/dali/internal/event/object/custom-object-internal.h b/dali/internal/event/object/custom-object-internal.h index b16caec..17b0986 100644 --- a/dali/internal/event/object/custom-object-internal.h +++ b/dali/internal/event/object/custom-object-internal.h @@ -19,7 +19,7 @@ */ // INTERNAL INCLUDES -#include +#include namespace Dali { @@ -32,7 +32,7 @@ namespace SceneGraph class PropertyOwner; } -class CustomObject : public ProxyObject +class CustomObject : public Object { public: @@ -43,67 +43,67 @@ public: static CustomObject* New(); /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObject() + * @copydoc Dali::Internal::Object::GetSceneObject() */ virtual const SceneGraph::PropertyOwner* GetSceneObject() const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectAnimatableProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty() */ virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectInputProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty() */ virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount() + * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() */ virtual unsigned int GetDefaultPropertyCount() const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName() + * @copydoc Dali::Internal::Object::GetDefaultPropertyName() */ virtual const char* GetDefaultPropertyName(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() */ virtual bool IsDefaultPropertyWritable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() */ virtual bool IsDefaultPropertyAnimatable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType() + * @copydoc Dali::Internal::Object::GetDefaultPropertyType() */ virtual Property::Type GetDefaultPropertyType(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty() + * @copydoc Dali::Internal::Object::SetDefaultProperty() */ virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue); /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty() + * @copydoc Dali::Internal::Object::GetDefaultProperty() */ virtual Property::Value GetDefaultProperty( Property::Index index ) const; diff --git a/dali/internal/event/render-tasks/render-task-impl.cpp b/dali/internal/event/render-tasks/render-task-impl.cpp index 5976370..7b7539a 100644 --- a/dali/internal/event/render-tasks/render-task-impl.cpp +++ b/dali/internal/event/render-tasks/render-task-impl.cpp @@ -764,17 +764,17 @@ void RenderTask::Connector::SetActor( Actor* actor ) } } -void RenderTask::Connector::SceneObjectAdded( ProxyObject& proxy ) +void RenderTask::Connector::SceneObjectAdded( Object& object ) { UpdateRenderTask(); } -void RenderTask::Connector::SceneObjectRemoved( ProxyObject& proxy ) +void RenderTask::Connector::SceneObjectRemoved( Object& object ) { UpdateRenderTask(); } -void RenderTask::Connector::ProxyDestroyed( ProxyObject& proxy ) +void RenderTask::Connector::ObjectDestroyed( Object& object ) { mActor = NULL; diff --git a/dali/internal/event/render-tasks/render-task-impl.h b/dali/internal/event/render-tasks/render-task-impl.h index e3f671e..7e4744c 100644 --- a/dali/internal/event/render-tasks/render-task-impl.h +++ b/dali/internal/event/render-tasks/render-task-impl.h @@ -22,7 +22,7 @@ #include #include #include -#include +#include namespace Dali { @@ -39,7 +39,7 @@ namespace SceneGraph class RenderTask; } -class RenderTask : public ProxyObject +class RenderTask : public Object { public: @@ -231,70 +231,70 @@ public: // Used by RenderTaskList, which owns the SceneGraph::RenderTasks */ void DiscardSceneObject(); -public: // Implementation of ProxyObject +public: // Implementation of Object /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyCount() + * @copydoc Dali::Internal::Object::GetDefaultPropertyCount() */ virtual unsigned int GetDefaultPropertyCount() const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndices() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndices() */ virtual void GetDefaultPropertyIndices( Property::IndexContainer& indices ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyName() + * @copydoc Dali::Internal::Object::GetDefaultPropertyName() */ virtual const char* GetDefaultPropertyName(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyIndex() + * @copydoc Dali::Internal::Object::GetDefaultPropertyIndex() */ virtual Property::Index GetDefaultPropertyIndex(const std::string& name) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyWritable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyWritable() */ virtual bool IsDefaultPropertyWritable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAnimatable() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAnimatable() */ virtual bool IsDefaultPropertyAnimatable(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::IsDefaultPropertyAConstraintInput() + * @copydoc Dali::Internal::Object::IsDefaultPropertyAConstraintInput() */ virtual bool IsDefaultPropertyAConstraintInput( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultPropertyType() + * @copydoc Dali::Internal::Object::GetDefaultPropertyType() */ virtual Property::Type GetDefaultPropertyType(Property::Index index) const; /** - * @copydoc Dali::Internal::ProxyObject::SetDefaultProperty() + * @copydoc Dali::Internal::Object::SetDefaultProperty() */ virtual void SetDefaultProperty(Property::Index index, const Property::Value& propertyValue); /** - * @copydoc Dali::Internal::ProxyObject::GetDefaultProperty() + * @copydoc Dali::Internal::Object::GetDefaultProperty() */ virtual Property::Value GetDefaultProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObject() + * @copydoc Dali::Internal::Object::GetSceneObject() */ virtual const SceneGraph::PropertyOwner* GetSceneObject() const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectAnimatableProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectAnimatableProperty() */ virtual const SceneGraph::PropertyBase* GetSceneObjectAnimatableProperty( Property::Index index ) const; /** - * @copydoc Dali::Internal::ProxyObject::GetSceneObjectInputProperty() + * @copydoc Dali::Internal::Object::GetSceneObjectInputProperty() */ virtual const PropertyInputImpl* GetSceneObjectInputProperty( Property::Index index ) const; @@ -347,7 +347,7 @@ protected: /** * Helper class for connecting Nodes to the scene-graph RenderTask */ - class Connector : public ProxyObject::Observer + class Connector : public Object::Observer { public: @@ -379,22 +379,22 @@ protected: */ void UpdateRenderTask(); - public: // From ProxyObject::Observer + public: // From Object::Observer /** - * @copydoc Dali::Internal::ProxyObject::Observer::SceneObjectAdded + * @copydoc Dali::Internal::Object::Observer::SceneObjectAdded */ - virtual void SceneObjectAdded( ProxyObject& proxy ); + virtual void SceneObjectAdded( Object& object ); /** - * @copydoc Dali::Internal::ProxyObject::Observer::SceneObjectAdded + * @copydoc Dali::Internal::Object::Observer::SceneObjectAdded */ - virtual void SceneObjectRemoved( ProxyObject& proxy ); + virtual void SceneObjectRemoved( Object& object ); /** - * @copydoc Dali::Internal::ProxyObject::Observer::ProxyDestroyed + * @copydoc Dali::Internal::Object::Observer::ObjectDestroyed */ - virtual void ProxyDestroyed( ProxyObject& proxy ); + virtual void ObjectDestroyed( Object& object ); private: diff --git a/dali/internal/file.list b/dali/internal/file.list index 9cd4cfe..587de24 100644 --- a/dali/internal/file.list +++ b/dali/internal/file.list @@ -35,12 +35,12 @@ internal_src_files = \ $(internal_src_dir)/event/animation/path-impl.cpp \ $(internal_src_dir)/event/common/demangler.cpp \ $(internal_src_dir)/event/common/notification-manager.cpp \ + $(internal_src_dir)/event/common/object-impl.cpp \ $(internal_src_dir)/event/common/object-registry-impl.cpp \ $(internal_src_dir)/event/common/projection.cpp \ $(internal_src_dir)/event/common/property-notification-manager.cpp \ $(internal_src_dir)/event/common/property-conditions-impl.cpp \ $(internal_src_dir)/event/common/property-notification-impl.cpp \ - $(internal_src_dir)/event/common/proxy-object.cpp \ $(internal_src_dir)/event/common/stage-impl.cpp \ $(internal_src_dir)/event/common/system-overlay-impl.cpp \ $(internal_src_dir)/event/common/thread-local-storage.cpp \ diff --git a/dali/internal/update/common/property-condition-functions.h b/dali/internal/update/common/property-condition-functions.h index 8296091..08825c9 100644 --- a/dali/internal/update/common/property-condition-functions.h +++ b/dali/internal/update/common/property-condition-functions.h @@ -32,7 +32,7 @@ namespace Dali namespace Internal { -class ProxyObject; +class Object; class PropertyNotification; namespace SceneGraph diff --git a/dali/internal/update/common/property-condition-step-functions.h b/dali/internal/update/common/property-condition-step-functions.h index 8f07188..44537bc 100644 --- a/dali/internal/update/common/property-condition-step-functions.h +++ b/dali/internal/update/common/property-condition-step-functions.h @@ -28,7 +28,7 @@ namespace Dali namespace Internal { -class ProxyObject; +class Object; class PropertyNotification; namespace SceneGraph diff --git a/dali/internal/update/common/property-condition-variable-step-functions.h b/dali/internal/update/common/property-condition-variable-step-functions.h index 35927b6..b5b1133 100644 --- a/dali/internal/update/common/property-condition-variable-step-functions.h +++ b/dali/internal/update/common/property-condition-variable-step-functions.h @@ -28,7 +28,7 @@ namespace Dali namespace Internal { -class ProxyObject; +class Object; class PropertyNotification; namespace SceneGraph diff --git a/dali/internal/update/common/scene-graph-property-notification.cpp b/dali/internal/update/common/scene-graph-property-notification.cpp index e569c3b..ed33b3c 100644 --- a/dali/internal/update/common/scene-graph-property-notification.cpp +++ b/dali/internal/update/common/scene-graph-property-notification.cpp @@ -15,7 +15,7 @@ * */ -#include +#include #include #include #include @@ -33,7 +33,7 @@ namespace Internal namespace SceneGraph { -PropertyNotification* PropertyNotification::New(ProxyObject& proxy, +PropertyNotification* PropertyNotification::New(Object& object, Property::Index propertyIndex, Property::Type propertyType, int componentIndex, @@ -41,18 +41,18 @@ PropertyNotification* PropertyNotification::New(ProxyObject& proxy, RawArgumentContainer& arguments, NotifyMode notifyMode) { - return new PropertyNotification( proxy, propertyIndex, propertyType, componentIndex, condition, arguments, notifyMode ); + return new PropertyNotification( object, propertyIndex, propertyType, componentIndex, condition, arguments, notifyMode ); } -PropertyNotification::PropertyNotification(ProxyObject& proxy, +PropertyNotification::PropertyNotification(Object& object, Property::Index propertyIndex, Property::Type propertyType, int componentIndex, ConditionType condition, RawArgumentContainer& arguments, NotifyMode notifyMode) -: mProxy(&proxy), +: mObject(&object), mPropertyIndex(propertyIndex), mPropertyType(propertyType), mProperty(NULL), @@ -103,8 +103,8 @@ PropertyNotification::PropertyNotification(ProxyObject& proxy, } } - mProperty = mProxy->GetSceneObjectInputProperty( mPropertyIndex ); - int internalComponentIndex = mProxy->GetPropertyComponentIndex(mPropertyIndex); + mProperty = mObject->GetSceneObjectInputProperty( mPropertyIndex ); + int internalComponentIndex = mObject->GetPropertyComponentIndex(mPropertyIndex); if( internalComponentIndex != Property::INVALID_COMPONENT_INDEX ) { // override the one passed in diff --git a/dali/internal/update/common/scene-graph-property-notification.h b/dali/internal/update/common/scene-graph-property-notification.h index 75b2472..6681fbb 100644 --- a/dali/internal/update/common/scene-graph-property-notification.h +++ b/dali/internal/update/common/scene-graph-property-notification.h @@ -30,7 +30,7 @@ namespace Dali namespace Internal { -class ProxyObject; +class Object; class PropertyNotification; namespace SceneGraph @@ -58,7 +58,7 @@ public: /** * Construct a new PropertyNotification - * @param[in] proxy The proxy for a scene-graph object to inspect. + * @param[in] object The event-object for a scene-graph object to inspect. * @param[in] propertyIndex The index of a property provided by the object. * @param[in] propertyType The type of property we're inspecting. * @param[in] componentIndex Index to the component of a complex property such as a Vector @@ -67,7 +67,7 @@ public: * @param[in] notifyMode The notification mode setting * @return A new PropertyNotification object. */ - static PropertyNotification* New(ProxyObject& proxy, + static PropertyNotification* New(Object& object, Property::Index propertyIndex, Property::Type propertyType, int componentIndex, @@ -107,7 +107,7 @@ protected: /** * Construct the PropertyNotification - * @param[in] proxy The proxy for a scene-graph object to inspect. + * @param[in] object The event-object for a scene-graph object to inspect. * @param[in] propertyIndex The index of a property provided by the object. * @param[in] propertyType The type of property we're inspecting. * @param[in] componentIndex Index to the component of a complex property such as a Vector @@ -115,7 +115,7 @@ protected: * @param[in] arguments The arguments which accompany the condition. * @param[in] notifyMode The notification mode setting */ - PropertyNotification(ProxyObject& proxy, + PropertyNotification(Object& object, Property::Index propertyIndex, Property::Type propertyType, int componentIndex, @@ -141,7 +141,7 @@ private: protected: - ProxyObject* mProxy; ///< Not owned by the property notification. Valid until ProxyDestroyed() is called. + Object* mObject; ///< Not owned by the property notification. Valid until ObjectDestroyed() is called. Property::Index mPropertyIndex; ///< The index of this property. Property::Type mPropertyType; ///< The type of property this is. const PropertyInputImpl* mProperty; ///< The scene graph property diff --git a/dali/public-api/object/constrainable.cpp b/dali/public-api/object/constrainable.cpp index eb3a291..1404751 100644 --- a/dali/public-api/object/constrainable.cpp +++ b/dali/public-api/object/constrainable.cpp @@ -22,7 +22,7 @@ #include #include #include -#include +#include #include #include @@ -45,7 +45,7 @@ Constrainable::Constrainable() Constrainable Constrainable::DownCast( BaseHandle handle ) { - return Constrainable( dynamic_cast(handle.GetObjectPtr()) ); + return Constrainable( dynamic_cast(handle.GetObjectPtr()) ); } Constrainable::~Constrainable() diff --git a/dali/public-api/scripting/scripting.cpp b/dali/public-api/scripting/scripting.cpp index 5e34b56..6eddb5c 100644 --- a/dali/public-api/scripting/scripting.cpp +++ b/dali/public-api/scripting/scripting.cpp @@ -539,7 +539,7 @@ void CreatePropertyMap( Image image, Property::Map& map ) { std::string imageType( "ResourceImage" ); - // Get Type - cannot use TypeRegistry as Image is not a ProxyObject and thus, not registered + // Get Type - cannot use TypeRegistry as Image is not an Object and thus, not registered if ( BitmapImage::DownCast( image ) ) { imageType = "BitmapImage";