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::SceneGraph::Constraint< PropertyType, PropertyAccessorType > Class Template Reference

Used to constrain a property of a scene-object. More...

#include <scene-graph-constraint.h>

Inheritance diagram for Dali::Internal::SceneGraph::Constraint< PropertyType, PropertyAccessorType >:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::SceneGraph::Constraint< PropertyType, PropertyAccessorType >:
Collaboration graph
[legend]

Public Types

typedef PropertyConstraintPtr
< PropertyType >::Type 
ConstraintFunctionPtr
 
- Public Types inherited from Dali::Internal::SceneGraph::ConstraintBase
typedef
Dali::Constraint::RemoveAction 
RemoveAction
 

Public Member Functions

virtual ~Constraint ()
 Virtual destructor. More...
 
virtual void Apply (BufferIndex updateBufferIndex)
 Constrain the associated scene object. More...
 
- Public Member Functions inherited from Dali::Internal::SceneGraph::ConstraintBase
 ConstraintBase (PropertyOwnerContainer &ownerContainer)
 Constructor. More...
 
virtual ~ConstraintBase ()
 Virtual destructor. More...
 
void OnConnect ()
 Initialize the constraint. More...
 
void SetRemoveAction (RemoveAction action)
 Set the remove action. More...
 
RemoveAction GetRemoveAction () const
 Retrieve the remove action that will happen when the constraint is removed. More...
 

Static Public Member Functions

static ConstraintBaseNew (const PropertyBase &targetProperty, PropertyOwnerContainer &ownerContainer, ConstraintFunctionPtr func)
 Create a new scene-graph constraint. More...
 
- Static Public Member Functions inherited from Dali::Internal::SceneGraph::ConstraintBase
static unsigned int GetCurrentInstanceCount ()
 Helper for internal test cases; only available for debug builds. More...
 
static unsigned int GetTotalInstanceCount ()
 Helper for internal test cases; only available for debug builds. More...
 

Protected Attributes

PropertyAccessorType mTargetProperty
 Raw-pointer to the target property. Not owned. More...
 
ConstraintFunctionPtr mFunc
 
- Protected Attributes inherited from Dali::Internal::SceneGraph::ConstraintBase
RemoveAction mRemoveAction
 
bool mFirstApply: 1
 
bool mDisconnected: 1
 

Private Member Functions

 Constraint (PropertyBase &targetProperty, PropertyOwnerContainer &ownerContainer, ConstraintFunctionPtr func)
 Create a new scene-graph constraint. More...
 
 Constraint (const Constraint &constraint)
 
Constraintoperator= (const Constraint &rhs)
 
virtual void OnDisconnect ()
 Notify the derived class to disconnect from property owners. More...
 

Detailed Description

template<class PropertyType, typename PropertyAccessorType>
class Dali::Internal::SceneGraph::Constraint< PropertyType, PropertyAccessorType >

Used to constrain a property of a scene-object.

The constraint function takes another scene-object property as an input.

Definition at line 44 of file scene-graph-constraint.h.

Member Typedef Documentation

template<class PropertyType, typename PropertyAccessorType>
typedef PropertyConstraintPtr< PropertyType >::Type Dali::Internal::SceneGraph::Constraint< PropertyType, PropertyAccessorType >::ConstraintFunctionPtr

Definition at line 48 of file scene-graph-constraint.h.

Constructor & Destructor Documentation

template<class PropertyType, typename PropertyAccessorType>
virtual Dali::Internal::SceneGraph::Constraint< PropertyType, PropertyAccessorType >::~Constraint ( )
inlinevirtual

Virtual destructor.

Definition at line 72 of file scene-graph-constraint.h.

template<class PropertyType, typename PropertyAccessorType>
Dali::Internal::SceneGraph::Constraint< PropertyType, PropertyAccessorType >::Constraint ( PropertyBase targetProperty,
PropertyOwnerContainer ownerContainer,
ConstraintFunctionPtr  func 
)
inlineprivate

Create a new scene-graph constraint.

Parameters
[in]targetPropertyThe target property.
[in]ownerSetA set of property owners; func is connected to the properties provided by these objects.
[in]funcThe function to calculate the final constrained value.
Returns
A smart-pointer to a newly allocated constraint.

Definition at line 114 of file scene-graph-constraint.h.

template<class PropertyType, typename PropertyAccessorType>
Dali::Internal::SceneGraph::Constraint< PropertyType, PropertyAccessorType >::Constraint ( const Constraint< PropertyType, PropertyAccessorType > &  constraint)
private

Member Function Documentation

template<class PropertyType, typename PropertyAccessorType>
virtual void Dali::Internal::SceneGraph::Constraint< PropertyType, PropertyAccessorType >::Apply ( BufferIndex  updateBufferIndex)
inlinevirtual
template<class PropertyType, typename PropertyAccessorType>
static ConstraintBase* Dali::Internal::SceneGraph::Constraint< PropertyType, PropertyAccessorType >::New ( const PropertyBase targetProperty,
PropertyOwnerContainer ownerContainer,
ConstraintFunctionPtr  func 
)
inlinestatic

Create a new scene-graph constraint.

Parameters
[in]targetPropertyThe target property.
[in]ownerSetA set of property owners; func is connected to the properties provided by these objects.
[in]funcThe function to calculate the final constrained value.
Returns
A smart-pointer to a newly allocated constraint.

Definition at line 57 of file scene-graph-constraint.h.

Referenced by Dali::Internal::Constraint< PropertyType >::ConnectConstraint(), and Dali::Internal::Constraint< float >::ConnectConstraint().

Here is the caller graph for this function:

template<class PropertyType, typename PropertyAccessorType>
virtual void Dali::Internal::SceneGraph::Constraint< PropertyType, PropertyAccessorType >::OnDisconnect ( )
inlineprivatevirtual
template<class PropertyType, typename PropertyAccessorType>
Constraint& Dali::Internal::SceneGraph::Constraint< PropertyType, PropertyAccessorType >::operator= ( const Constraint< PropertyType, PropertyAccessorType > &  rhs)
private

Member Data Documentation

template<class PropertyType, typename PropertyAccessorType>
ConstraintFunctionPtr Dali::Internal::SceneGraph::Constraint< PropertyType, PropertyAccessorType >::mFunc
protected
template<class PropertyType, typename PropertyAccessorType>
PropertyAccessorType Dali::Internal::SceneGraph::Constraint< PropertyType, PropertyAccessorType >::mTargetProperty
protected

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