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

A wrapper class for getting/setting a float component of another property. More...

#include <property-component-accessor.h>

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

Public Member Functions

 PropertyComponentAccessorZ (SceneGraph::PropertyBase *property)
 Create a property component. More...
 
 ~PropertyComponentAccessorZ ()
 Non-virtual destructor; PropertyComponentAccessorZ is not suitable as a base class. More...
 
bool IsSet () const
 Query whether the accessor is set. More...
 
void Reset ()
 Reset the property accessor. More...
 
bool IsClean () const
 Query whether the property has changed. More...
 
const float & Get (BufferIndex bufferIndex) const
 Read access to the property. More...
 
void Set (BufferIndex bufferIndex, float value) const
 Set the property value. More...
 
void Bake (BufferIndex bufferIndex, float value) const
 Set both the property value & base value. More...
 

Private Member Functions

 PropertyComponentAccessorZ (const PropertyComponentAccessorZ &property)
 
PropertyComponentAccessorZoperator= (const PropertyComponentAccessorZ &rhs)
 

Private Attributes

SceneGraph::AnimatableProperty
< PropertyType > * 
mProperty
 The real property. More...
 

Detailed Description

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

A wrapper class for getting/setting a float component of another property.

Animators use this instead of accessing properties directly.

Definition at line 220 of file property-component-accessor.h.

Constructor & Destructor Documentation

template<typename PropertyType >
Dali::Internal::PropertyComponentAccessorZ< PropertyType >::PropertyComponentAccessorZ ( SceneGraph::PropertyBase property)
inline

Create a property component.

Parameters
[in]propertyThe property which holds a float component.

Definition at line 228 of file property-component-accessor.h.

template<typename PropertyType >
Dali::Internal::PropertyComponentAccessorZ< PropertyType >::~PropertyComponentAccessorZ ( )
inline

Non-virtual destructor; PropertyComponentAccessorZ is not suitable as a base class.

Definition at line 236 of file property-component-accessor.h.

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

Member Function Documentation

template<typename PropertyType >
void Dali::Internal::PropertyComponentAccessorZ< PropertyType >::Bake ( BufferIndex  bufferIndex,
float  value 
) const
inline

Set both the property value & base value.

Parameters
[in]bufferIndexThe buffer to write for the property value.
[in]valueThe new property value.

Definition at line 288 of file property-component-accessor.h.

References DALI_ASSERT_DEBUG, and Dali::Internal::PropertyComponentAccessorZ< PropertyType >::mProperty.

template<typename PropertyType >
const float& Dali::Internal::PropertyComponentAccessorZ< PropertyType >::Get ( BufferIndex  bufferIndex) const
inline

Read access to the property.

Parameters
[in]bufferIndexThe current update buffer index.

Definition at line 270 of file property-component-accessor.h.

References DALI_ASSERT_DEBUG, and Dali::Internal::PropertyComponentAccessorZ< PropertyType >::mProperty.

template<typename PropertyType >
bool Dali::Internal::PropertyComponentAccessorZ< PropertyType >::IsClean ( ) const
inline

Query whether the property has changed.

Returns
True if the property has not changed.

Definition at line 261 of file property-component-accessor.h.

References Dali::Internal::PropertyComponentAccessorZ< PropertyType >::mProperty.

template<typename PropertyType >
bool Dali::Internal::PropertyComponentAccessorZ< PropertyType >::IsSet ( ) const
inline

Query whether the accessor is set.

Returns
True if set.

Definition at line 244 of file property-component-accessor.h.

References Dali::Internal::PropertyComponentAccessorZ< PropertyType >::mProperty.

template<typename PropertyType >
PropertyComponentAccessorZ& Dali::Internal::PropertyComponentAccessorZ< PropertyType >::operator= ( const PropertyComponentAccessorZ< PropertyType > &  rhs)
private
template<typename PropertyType >
void Dali::Internal::PropertyComponentAccessorZ< PropertyType >::Reset ( )
inline

Reset the property accessor.

Postcondition
Calling any other PropertyComponentAccessorZ is invalid.

Definition at line 253 of file property-component-accessor.h.

References Dali::Internal::PropertyComponentAccessorZ< PropertyType >::mProperty.

template<typename PropertyType >
void Dali::Internal::PropertyComponentAccessorZ< PropertyType >::Set ( BufferIndex  bufferIndex,
float  value 
) const
inline

Set the property value.

This will only persist for the current frame; the property will be reset with the base value, at the beginning of the next frame.

Parameters
[in]bufferIndexThe buffer to write.
[in]valueThe new property value.

Definition at line 279 of file property-component-accessor.h.

References DALI_ASSERT_DEBUG, and Dali::Internal::PropertyComponentAccessorZ< PropertyType >::mProperty.

Member Data Documentation

template<typename PropertyType >
SceneGraph::AnimatableProperty<PropertyType>* Dali::Internal::PropertyComponentAccessorZ< PropertyType >::mProperty
private

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