/*! \page boost-function Boost function usage
Signal handler functions
boost::function is mostly used to define callback function types in Dali.
For example in text-actor.h:
\code
class TextActor : public RenderableActor
{
public:
...
typedef boost::function TextCallbackType;
typedef Signal TextSignal;
public:
TextSignal SignalTextAvailable();
...
}
\endcode
\p "boost::function" specifies a function type which has no return value and takes \p TextActor as an argument.
The application can set a function of this type to be called when the text available signal is emitted.
Specifying custom functions (eg. sorting)
Dali::Layer::SetSortFunction() is an example where the developer should use a boost function in order to specify the sorting algorithm.\n
This API accepts both standalone functions or class methods.\n
Standalone functions can be simply given as:
\code
static float TestSortFunction(const Vector3& position, float sortModifier)
{
// do something
}
void TestApp::SetRootSort()
{
Layer root = Stage::GetCurrent().GetLayer( 0 );
root.SetSortFunction(TestSortFunction);
}
\endcode
For member functions \b binding needs to be done:
\code
float TestApp::TestSortFunction(const Vector3& position, float sortModifier)
{
// do something
}
void TestApp::SetRootSort()
{
Layer root = Stage::GetCurrent().GetLayer( 0 );
root.SetSortFunction(boost::bind(&TestApp::TestSortFunction, this));
}
\endcode
\n\n
For more information please see the boost project documentation.
*/