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

The base template class for each key frame specialization. More...

#include <key-frames-impl.h>

Inheritance diagram for Dali::Internal::KeyFrameBaseSpec< V >:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::KeyFrameBaseSpec< V >:
Collaboration graph
[legend]

Public Member Functions

 KeyFrameBaseSpec ()
 Constructor. More...
 
void AddKeyFrame (float t, V v, AlphaFunction alpha)
 Add a key frame to the progress value vector. More...
 
virtual unsigned int GetNumberOfKeyFrames () const
 Get the number of key frames. More...
 
virtual void GetKeyFrame (unsigned int index, float &time, V &value) const
 Get a key frame. More...
 
bool IsActive (float progress) const
 Return whether the progress is valid for the range of keyframes. More...
 
GetValue (float progress, Dali::Animation::Interpolation interpolation) const
 Return an interpolated value for the given progress. More...
 
- Public Member Functions inherited from Dali::Internal::KeyFrameSpec
 KeyFrameSpec ()
 
- Public Member Functions inherited from Dali::RefObject
void Reference ()
 Increment the object's reference count. More...
 
void Unreference ()
 Decrement the object's reference count. More...
 
int ReferenceCount ()
 Retrieve the object's reference count. More...
 

Static Public Member Functions

static KeyFrameBaseSpec< V > * New ()
 
static KeyFrameBaseSpec< V > * Clone (const KeyFrameBaseSpec< V > &keyFrames)
 

Protected Member Functions

 KeyFrameBaseSpec (const KeyFrameBaseSpec< V > &keyFrames)
 Copy Constructor Allow cloning of this object. More...
 
KeyFrameBaseSpec< V > & operator= (const KeyFrameBaseSpec< V > &keyFrames)
 
virtual ~KeyFrameBaseSpec ()
 Destructor. More...
 
- Protected Member Functions inherited from Dali::Internal::KeyFrameSpec
virtual ~KeyFrameSpec ()
 A reference counted object may only be deleted by calling Unreference() More...
 
- Protected Member Functions inherited from Dali::RefObject
 RefObject ()
 Default constructor. More...
 
virtual ~RefObject ()
 RefObject is intended as a base class. More...
 
 RefObject (const RefObject &rhs)
 Copy constructor. More...
 
RefObjectoperator= (const RefObject &rhs)
 Assignment operator. More...
 

Private Types

typedef ProgressValue< V > PV
 
typedef std::vector< PVPVContainer
 

Private Attributes

PVContainer mPVs
 
KeyFrameChannel< V > * mKeyFrames
 

Detailed Description

template<typename V>
class Dali::Internal::KeyFrameBaseSpec< V >

The base template class for each key frame specialization.

It stores a vector of ProgressValue pairs in mPVs, and uses the existing interface for KeyFrameChannel to point at this vector.

Definition at line 134 of file key-frames-impl.h.

Member Typedef Documentation

template<typename V>
typedef ProgressValue<V> Dali::Internal::KeyFrameBaseSpec< V >::PV
private

Definition at line 137 of file key-frames-impl.h.

template<typename V>
typedef std::vector<PV> Dali::Internal::KeyFrameBaseSpec< V >::PVContainer
private

Definition at line 138 of file key-frames-impl.h.

Constructor & Destructor Documentation

template<typename V>
Dali::Internal::KeyFrameBaseSpec< V >::KeyFrameBaseSpec ( )
inline
template<typename V>
Dali::Internal::KeyFrameBaseSpec< V >::KeyFrameBaseSpec ( const KeyFrameBaseSpec< V > &  keyFrames)
inlineprotected
template<typename V>
virtual Dali::Internal::KeyFrameBaseSpec< V >::~KeyFrameBaseSpec ( )
inlineprotectedvirtual

Destructor.

Ensure progress value pairs are cleared down

Definition at line 188 of file key-frames-impl.h.

References Dali::Internal::KeyFrameBaseSpec< V >::mKeyFrames, and Dali::Internal::KeyFrameBaseSpec< V >::mPVs.

Member Function Documentation

template<typename V>
void Dali::Internal::KeyFrameBaseSpec< V >::AddKeyFrame ( float  t,
v,
AlphaFunction  alpha 
)
inline

Add a key frame to the progress value vector.

Key frames should be added in time order (this method does not sort the vector by time)

Parameters
[in]t- progress
[in]v- value
[in]alpha- Alpha function for blending to the next keyframe

Definition at line 202 of file key-frames-impl.h.

References Dali::Internal::KeyFrameBaseSpec< V >::mPVs.

Referenced by Dali::Internal::KeyFrames::Add().

Here is the caller graph for this function:

template<typename V>
static KeyFrameBaseSpec<V>* Dali::Internal::KeyFrameBaseSpec< V >::Clone ( const KeyFrameBaseSpec< V > &  keyFrames)
inlinestatic

Definition at line 149 of file key-frames-impl.h.

Referenced by Dali::Internal::Animation::AnimateBetween().

Here is the caller graph for this function:

template<typename V>
virtual void Dali::Internal::KeyFrameBaseSpec< V >::GetKeyFrame ( unsigned int  index,
float &  time,
V &  value 
) const
inlinevirtual

Get a key frame.

Parameters
[in]indexThe index of the key frame to fetch
[out]timeThe progress of the given key frame
[out]valueThe value of the given key frame

Definition at line 222 of file key-frames-impl.h.

References DALI_ASSERT_ALWAYS, and Dali::Internal::KeyFrameBaseSpec< V >::mPVs.

template<typename V>
virtual unsigned int Dali::Internal::KeyFrameBaseSpec< V >::GetNumberOfKeyFrames ( ) const
inlinevirtual

Get the number of key frames.

Returns
The size of the progress value vector

Implements Dali::Internal::KeyFrameSpec.

Definition at line 211 of file key-frames-impl.h.

References Dali::Internal::KeyFrameBaseSpec< V >::mPVs.

template<typename V>
V Dali::Internal::KeyFrameBaseSpec< V >::GetValue ( float  progress,
Dali::Animation::Interpolation  interpolation 
) const
inline

Return an interpolated value for the given progress.

Parameters
[in]progressThe progress to test
Returns
The interpolated value

Definition at line 245 of file key-frames-impl.h.

References Dali::Internal::KeyFrameBaseSpec< V >::mKeyFrames.

template<typename V>
bool Dali::Internal::KeyFrameBaseSpec< V >::IsActive ( float  progress) const
inline

Return whether the progress is valid for the range of keyframes.

(The first keyframe doesn't have to start at 0, and the last doesn't have to end at 1.0)

Parameters
[in]progressThe progress to test
Returns
True if the progress is valid for this object

Definition at line 235 of file key-frames-impl.h.

References Dali::Internal::KeyFrameBaseSpec< V >::mKeyFrames.

template<typename V>
static KeyFrameBaseSpec<V>* Dali::Internal::KeyFrameBaseSpec< V >::New ( )
inlinestatic

Definition at line 144 of file key-frames-impl.h.

Referenced by Dali::Internal::KeyFrames::CreateKeyFramesSpec().

Here is the caller graph for this function:

template<typename V>
KeyFrameBaseSpec<V>& Dali::Internal::KeyFrameBaseSpec< V >::operator= ( const KeyFrameBaseSpec< V > &  keyFrames)
inlineprotected

Member Data Documentation

template<typename V>
KeyFrameChannel<V>* Dali::Internal::KeyFrameBaseSpec< V >::mKeyFrames
private
template<typename V>
PVContainer Dali::Internal::KeyFrameBaseSpec< V >::mPVs
private

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