Tizen Native API
6.5
|
Template for the Function that is called by the Constraint system. More...
Public Member Functions | |
Function (void(*function)(P &, const PropertyInputContainer &)) | |
Constructor which connects to the provided C function (or a static member function). | |
template<class T > | |
Function (const T &object) | |
Constructor which copies a function object and connects to the functor of that object. | |
template<class T > | |
Function (const T &object, void(T::*memberFunction)(P &, const PropertyInputContainer &)) | |
Constructor which copies a function object and allows a connection to a member method. | |
CallbackBase * | Clone () |
Clones the Function object. |
Detailed Description
template<typename P>
class Dali::Constraint::Function< P >
Template for the Function that is called by the Constraint system.
Supports:
- C style functions
- Static member methods of an object
- Member functions of a particular class
- Functors of a particular class
- If a functor or method is provided, then a copy of the object is made.
The expected signature of the callback should be:
void Function( P&, const PropertyInputContainer& );
The P& parameter is an in,out parameter which stores the current value of the property. The callback should change this value to the desired one. The PropertyInputContainer is a const reference to the property inputs added to the Constraint in the order they were added via AddSource().
- Since:
- 3.0, DALi version 1.0.0
- Template Parameters:
-
P The property type to constrain
Constructor & Destructor Documentation
Dali::Constraint::Function< P >::Function | ( | void(*)(P &, const PropertyInputContainer &) | function | ) |
Constructor which connects to the provided C function (or a static member function).
The expected signature of the function is:
void MyFunction( P&, const PropertyInputContainer& );
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] function The function to call
Dali::Constraint::Function< P >::Function | ( | const T & | object | ) |
Constructor which copies a function object and connects to the functor of that object.
The function object should have a functor with the following signature:
void operator()( P&, const PropertyInputContainer& );
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] object The object to copy
- Template Parameters:
-
T The type of the object
Dali::Constraint::Function< P >::Function | ( | const T & | object, |
void(T::*)(P &, const PropertyInputContainer &) | memberFunction | ||
) |
Constructor which copies a function object and allows a connection to a member method.
The object should have a method with the signature:
void MyObject::MyMethod( P&, const PropertyInputContainer& );
- Since:
- 3.0, DALi version 1.0.0
- Parameters:
-
[in] object The object to copy [in] memberFunction The member function to call. This has to be a member of the same class
- Template Parameters:
-
T The type of the object
Member Function Documentation
CallbackBase* Dali::Constraint::Function< P >::Clone | ( | ) |