Dali 3D User Interface Engine
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Attributes | Private Member Functions
Dali::Internal::AnimatorConnector< PropertyType > Class Template Reference

AnimatorConnector is used to connect SceneGraph::Animators for newly created scene-graph objects. More...

#include <animator-connector.h>

Inheritance diagram for Dali::Internal::AnimatorConnector< PropertyType >:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::AnimatorConnector< PropertyType >:
Collaboration graph
[legend]

Public Types

typedef SceneGraph::Animator
< PropertyType,
PropertyAccessor< PropertyType > > 
AnimatorType
 
typedef
SceneGraph::AnimatableProperty
< PropertyType > 
PropertyInterfaceType
 

Public Member Functions

virtual ~AnimatorConnector ()
 Virtual destructor. More...
 
void SetParent (Animation &parent)
 From AnimatorConnectorBase. More...
 
- Public Member Functions inherited from Dali::Internal::AnimatorConnectorBase
 AnimatorConnectorBase (AlphaFunction alpha, const TimePeriod &period)
 Constructor. More...
 
virtual ~AnimatorConnectorBase ()
 Virtual destructor. More...
 
AnimationGetParent ()
 Retrieve the parent of the AnimatorConnector. More...
 

Static Public Member Functions

static AnimatorConnectorBaseNew (Object &object, Property::Index propertyIndex, int componentIndex, AnimatorFunctionBase *animatorFunction, AlphaFunction alpha, const TimePeriod &period)
 Construct a new animator connector. More...
 

Protected Attributes

ObjectmObject
 Not owned by the animator connector. Valid until ObjectDestroyed() is called. More...
 
SceneGraph::AnimatorBasemAnimator
 
Property::Index mPropertyIndex
 
int mComponentIndex
 
Internal::AnimatorFunctionBasemAnimatorFunction
 Owned by the animator connector until an Scenegraph::Animator is created. More...
 
- Protected Attributes inherited from Dali::Internal::AnimatorConnectorBase
AnimationmParent
 The parent owns the connector. More...
 
AlphaFunction mAlphaFunction
 
TimePeriod mTimePeriod
 

Private Member Functions

 AnimatorConnector (Object &object, Property::Index propertyIndex, int componentIndex, Internal::AnimatorFunctionBase *animatorFunction, AlphaFunction alpha, const TimePeriod &period)
 Private constructor; see also AnimatorConnector::New(). More...
 
 AnimatorConnector (const AnimatorConnector &)
 
AnimatorConnectoroperator= (const AnimatorConnector &rhs)
 
virtual void SceneObjectAdded (Object &object)
 From Object::Observer. More...
 
virtual void SceneObjectRemoved (Object &object)
 From Object::Observer. More...
 
virtual void ObjectDestroyed (Object &object)
 From Object::Observer. More...
 
void CreateAnimator ()
 Helper function to create a Scenegraph::Animator and add it to its correspondent SceneGraph::Animation. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Dali::Internal::Object::Observer
virtual ~Observer ()
 Virtual destructor. More...
 

Detailed Description

template<typename PropertyType>
class Dali::Internal::AnimatorConnector< PropertyType >

AnimatorConnector is used to connect SceneGraph::Animators for newly created scene-graph objects.

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.

Definition at line 47 of file animator-connector.h.

Member Typedef Documentation

template<typename PropertyType>
typedef SceneGraph::Animator< PropertyType, PropertyAccessor<PropertyType> > Dali::Internal::AnimatorConnector< PropertyType >::AnimatorType

Definition at line 51 of file animator-connector.h.

template<typename PropertyType>
typedef SceneGraph::AnimatableProperty< PropertyType > Dali::Internal::AnimatorConnector< PropertyType >::PropertyInterfaceType

Definition at line 52 of file animator-connector.h.

Constructor & Destructor Documentation

template<typename PropertyType>
virtual Dali::Internal::AnimatorConnector< PropertyType >::~AnimatorConnector ( )
inlinevirtual
template<typename PropertyType>
Dali::Internal::AnimatorConnector< PropertyType >::AnimatorConnector ( Object object,
Property::Index  propertyIndex,
int  componentIndex,
Internal::AnimatorFunctionBase animatorFunction,
AlphaFunction  alpha,
const TimePeriod period 
)
inlineprivate

Private constructor; see also AnimatorConnector::New().

Definition at line 118 of file animator-connector.h.

template<typename PropertyType>
Dali::Internal::AnimatorConnector< PropertyType >::AnimatorConnector ( const AnimatorConnector< PropertyType > &  )
private

Member Function Documentation

template<typename PropertyType>
void Dali::Internal::AnimatorConnector< PropertyType >::CreateAnimator ( )
inlineprivate

Helper function to create a Scenegraph::Animator and add it to its correspondent SceneGraph::Animation.

Note
This function will only be called the first time the object is added to the scene or at creation time if the object was already in the scene

Animating the whole property

Animating a component of the property

Definition at line 172 of file animator-connector.h.

References Dali::Internal::SceneGraph::AddAnimatorMessage(), DALI_ASSERT_DEBUG, Dali::PropertyTypes::Get< Vector2 >(), Dali::PropertyTypes::Get< Vector3 >(), Dali::PropertyTypes::Get< Vector4 >(), Dali::Internal::Animation::GetEventThreadServices(), Dali::Internal::Object::GetPropertyComponentIndex(), Dali::Internal::Object::GetSceneObject(), Dali::Internal::Animation::GetSceneObject(), Dali::Internal::Object::GetSceneObjectAnimatableProperty(), Dali::Internal::PropertyInputImpl::GetType(), Dali::Property::INVALID_COMPONENT_INDEX, Dali::Internal::AnimatorConnectorBase::mAlphaFunction, Dali::Internal::AnimatorConnector< PropertyType >::mAnimator, Dali::Internal::AnimatorConnector< PropertyType >::mAnimatorFunction, Dali::Internal::AnimatorConnector< PropertyType >::mComponentIndex, Dali::Internal::AnimatorConnector< PropertyType >::mObject, Dali::Internal::AnimatorConnectorBase::mParent, Dali::Internal::AnimatorConnector< PropertyType >::mPropertyIndex, Dali::Internal::AnimatorConnectorBase::mTimePeriod, Dali::Internal::AnimatorConnector< PropertyType >::New(), and Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::New().

Referenced by Dali::Internal::AnimatorConnector< PropertyType >::SceneObjectAdded(), and Dali::Internal::AnimatorConnector< PropertyType >::SetParent().

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename PropertyType>
static AnimatorConnectorBase* Dali::Internal::AnimatorConnector< PropertyType >::New ( Object object,
Property::Index  propertyIndex,
int  componentIndex,
AnimatorFunctionBase animatorFunction,
AlphaFunction  alpha,
const TimePeriod period 
)
inlinestatic

Construct a new animator connector.

Parameters
[in]objectThe object for a scene-graph object to animate.
[in]propertyIndexThe index of a property provided by the object.
[in]componentIndexIndex to a sub component of a property, for use with Vector2, Vector3 and Vector4 (INVALID_PROPERTY_COMPONENTINDEX to use the whole property)
[in]animatorFunctionA function used to animate the property.
[in]alphaThe alpha function to apply.
[in]periodThe time period of the animator.
Returns
A pointer to a newly allocated animator connector.

Definition at line 64 of file animator-connector.h.

Referenced by Dali::Internal::AnimatorConnector< PropertyType >::CreateAnimator().

Here is the caller graph for this function:

template<typename PropertyType>
virtual void Dali::Internal::AnimatorConnector< PropertyType >::ObjectDestroyed ( Object object)
inlineprivatevirtual
template<typename PropertyType>
AnimatorConnector& Dali::Internal::AnimatorConnector< PropertyType >::operator= ( const AnimatorConnector< PropertyType > &  rhs)
private
template<typename PropertyType>
virtual void Dali::Internal::AnimatorConnector< PropertyType >::SceneObjectAdded ( Object object)
inlineprivatevirtual
template<typename PropertyType>
virtual void Dali::Internal::AnimatorConnector< PropertyType >::SceneObjectRemoved ( Object object)
inlineprivatevirtual

From Object::Observer.

Implements Dali::Internal::Object::Observer.

Definition at line 155 of file animator-connector.h.

template<typename PropertyType>
void Dali::Internal::AnimatorConnector< PropertyType >::SetParent ( Animation parent)
inlinevirtual

Member Data Documentation

template<typename PropertyType>
SceneGraph::AnimatorBase* Dali::Internal::AnimatorConnector< PropertyType >::mAnimator
protected
template<typename PropertyType>
Internal::AnimatorFunctionBase* Dali::Internal::AnimatorConnector< PropertyType >::mAnimatorFunction
protected

Owned by the animator connector until an Scenegraph::Animator is created.

Definition at line 362 of file animator-connector.h.

Referenced by Dali::Internal::AnimatorConnector< PropertyType >::CreateAnimator(), and Dali::Internal::AnimatorConnector< PropertyType >::~AnimatorConnector().

template<typename PropertyType>
int Dali::Internal::AnimatorConnector< PropertyType >::mComponentIndex
protected
template<typename PropertyType>
Object* Dali::Internal::AnimatorConnector< PropertyType >::mObject
protected
template<typename PropertyType>
Property::Index Dali::Internal::AnimatorConnector< PropertyType >::mPropertyIndex
protected

The documentation for this class was generated from the following file:
Dali Docs Home
Read more about Dali