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

Connects a constraint which takes another property as an input. More...

#include <constraint-impl.h>

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

Public Types

typedef SceneGraph::Constraint
< PropertyType,
PropertyAccessor< PropertyType > > 
SceneGraphConstraint
 
typedef const
SceneGraph::AnimatableProperty
< PropertyType > * 
ScenePropertyPtr
 
typedef PropertyConstraintPtr
< PropertyType >::Type 
ConstraintFunctionPtr
 
- Public Types inherited from Dali::Internal::ConstraintBase
typedef
Dali::Constraint::RemoveAction 
RemoveAction
 

Public Member Functions

virtual ConstraintBaseClone (Object &object)
 Clone this constraint for another object. More...
 
virtual ~Constraint ()
 Virtual destructor. More...
 
- Public Member Functions inherited from Dali::Internal::ConstraintBase
 ConstraintBase (Object &object, Property::Index targetPropertyIndex, SourceContainer &sources)
 Constructor. More...
 
virtual ~ConstraintBase ()
 Virtual destructor. More...
 
void AddSource (Source source)
 Adds a constraint source to the constraint. More...
 
void Apply ()
 Applies this constraint. More...
 
void Remove ()
 Removes this constraint. More...
 
void RemoveInternal ()
 Called when the Constraint is removed. More...
 
ObjectGetParent ()
 Retrieve the parent of the constraint. More...
 
Dali::Handle GetTargetObject ()
 Retrieve the object which this constraint is targeting. More...
 
Property::Index GetTargetProperty ()
 Retrieve the property which this constraint is targeting. 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...
 
void SetTag (const unsigned int tag)
 Set a tag for the constraint so it can be identified later. More...
 
unsigned int GetTag () const
 Get the tag. More...
 
- Public Member Functions inherited from Dali::BaseObject
template<class T >
bool ConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, const T &functor)
 Connects a void() functor to a specified signal. More...
 
bool DoAction (const std::string &actionName, const Property::Map &attributes)
 Perform action on this object with the given action name and attributes. More...
 
const std::string & GetTypeName () const
 Returns the type name for the Handle. More...
 
bool GetTypeInfo (Dali::TypeInfo &info) const
 Returns the type info for the Handle. More...
 
bool DoConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, FunctorDelegate *functorDelegate)
 Not intended for application developers. More...
 
- 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 ConstraintBaseNew (Object &object, Property::Index targetIndex, SourceContainer &sources, ConstraintFunctionPtr func)
 Construct a new constraint. More...
 

Protected Attributes

Property::Index mTargetIndex
 
ConstraintFunctionPtr mUserFunction
 
- Protected Attributes inherited from Dali::Internal::ConstraintBase
EventThreadServicesmEventThreadServices
 
ObjectmTargetObject
 The object owns the constraint. More...
 
const SceneGraph::ConstraintBasemSceneGraphConstraint
 
SourceContainer mSources
 
ObjectContainer mObservedObjects
 
Property::Index mTargetPropertyIndex
 
RemoveAction mRemoveAction
 
unsigned int mTag
 
bool mApplied:1
 Whether the constraint has been applied. More...
 
bool mSourceDestroyed:1
 Is set to true if any of our input source objects are destroyed. More...
 

Private Member Functions

 Constraint (Object &object, Property::Index targetIndex, SourceContainer &sources, ConstraintFunctionPtr &func)
 Private constructor; see also Constraint::New(). More...
 
 Constraint (const Constraint &)
 
Constraintoperator= (const Constraint &rhs)
 
void ConnectConstraint ()
 Create and connect a constraint for a scene-object. More...
 
PropertyConstraint
< PropertyType > * 
ConnectConstraintFunction (SceneGraph::PropertyOwnerContainer &propertyOwners)
 Helper for ConnectConstraint. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Dali::Internal::ConstraintBase
EventThreadServicesGetEventThreadServices ()
 Get the event thread services object - used for sending messages to the scene graph Assert if called from the wrong thread. More...
 
const EventThreadServicesGetEventThreadServices () const
 Get the event thread services object - used for sending messages to the scene graph Assert if called from the wrong thread This is intentionally inline for performance reasons. More...
 

Detailed Description

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

Connects a constraint which takes another property as an input.

Definition at line 62 of file constraint-impl.h.

Member Typedef Documentation

template<typename PropertyType>
typedef PropertyConstraintPtr<PropertyType>::Type Dali::Internal::Constraint< PropertyType >::ConstraintFunctionPtr

Definition at line 68 of file constraint-impl.h.

template<typename PropertyType>
typedef SceneGraph::Constraint< PropertyType, PropertyAccessor<PropertyType> > Dali::Internal::Constraint< PropertyType >::SceneGraphConstraint

Definition at line 66 of file constraint-impl.h.

template<typename PropertyType>
typedef const SceneGraph::AnimatableProperty<PropertyType>* Dali::Internal::Constraint< PropertyType >::ScenePropertyPtr

Definition at line 67 of file constraint-impl.h.

Constructor & Destructor Documentation

template<typename PropertyType>
virtual Dali::Internal::Constraint< PropertyType >::~Constraint ( )
inlinevirtual

Virtual destructor.

Definition at line 112 of file constraint-impl.h.

template<typename PropertyType>
Dali::Internal::Constraint< PropertyType >::Constraint ( Object object,
Property::Index  targetIndex,
SourceContainer sources,
ConstraintFunctionPtr func 
)
inlineprivate

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

Definition at line 122 of file constraint-impl.h.

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

Member Function Documentation

template<typename PropertyType>
virtual ConstraintBase* Dali::Internal::Constraint< PropertyType >::Clone ( Object object)
inlinevirtual
template<typename PropertyType>
void Dali::Internal::Constraint< PropertyType >::ConnectConstraint ( )
inlineprivatevirtual
template<typename PropertyType>
PropertyConstraint<PropertyType>* Dali::Internal::Constraint< PropertyType >::ConnectConstraintFunction ( SceneGraph::PropertyOwnerContainer propertyOwners)
inlineprivate

Helper for ConnectConstraint.

Creates a connected constraint-function. Also populates the property-owner container, for each input connected to the constraint-function.

Parameters
[out]propertyOwnersThe container of property-owners providing the scene-graph properties.
Returns
A connected constraint-function, or NULL if the scene-graph properties are not available.

Definition at line 193 of file constraint-impl.h.

References Dali::Internal::AddUnique(), DALI_ASSERT_ALWAYS, Dali::Internal::Actor::GetParent(), Dali::Internal::Object::GetPropertyComponentIndex(), Dali::Internal::Object::GetSceneObject(), Dali::Internal::Object::GetSceneObjectInputProperty(), Dali::Property::INVALID_COMPONENT_INDEX, Dali::Internal::Object::IsPropertyAConstraintInput(), Dali::LOCAL_PROPERTY, Dali::Internal::ConstraintBase::mSources, Dali::Internal::ConstraintBase::mTargetObject, Dali::Internal::Constraint< PropertyType >::mUserFunction, Dali::Internal::Source::object, Dali::OBJECT_PROPERTY, Dali::PARENT_PROPERTY, Dali::Internal::Source::propertyIndex, Dali::Internal::PropertyConstraint< PropertyType >::SetInput(), and Dali::Internal::Source::sourceType.

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

Here is the call graph for this function:

Here is the caller graph for this function:

template<typename PropertyType>
static ConstraintBase* Dali::Internal::Constraint< PropertyType >::New ( Object object,
Property::Index  targetIndex,
SourceContainer sources,
ConstraintFunctionPtr  func 
)
inlinestatic

Construct a new constraint.

Parameters
[in]objectThe property-owning object.
[in]targetIndexThe index of the property to constrain.
[in]sourcesThe sources of the input properties passed to func.
[in]funcThe constraint function.
Returns
A newly allocated active-constraint.

Definition at line 78 of file constraint-impl.h.

template<typename PropertyType>
Constraint& Dali::Internal::Constraint< PropertyType >::operator= ( const Constraint< PropertyType > &  rhs)
private

Member Data Documentation

template<typename PropertyType>
Property::Index Dali::Internal::Constraint< PropertyType >::mTargetIndex
protected
template<typename PropertyType>
ConstraintFunctionPtr Dali::Internal::Constraint< PropertyType >::mUserFunction
protected

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