X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=dali%2Fpublic-api%2Fsignals%2Fcallback.h;h=5224ee81e76e2a8a9d4c89554c519b127364261c;hb=649ec06daecb510fb84fe4642a6af957f127e7ab;hp=902947b301996b5979f89a0dca1875cec66ec258;hpb=432923e17cb38a99fc012473ef97fa8c4fc36162;p=platform%2Fcore%2Fuifw%2Fdali-core.git diff --git a/dali/public-api/signals/callback.h b/dali/public-api/signals/callback.h index 902947b..5224ee8 100644 --- a/dali/public-api/signals/callback.h +++ b/dali/public-api/signals/callback.h @@ -2,7 +2,7 @@ #define __DALI_CALLBACK_H__ /* - * Copyright (c) 2015 Samsung Electronics Co., Ltd. + * Copyright (c) 2018 Samsung Electronics Co., Ltd. * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -27,35 +27,44 @@ namespace Dali { +/** + * @addtogroup dali_core_signals + * @{ + */ class CallbackBase; /** * @brief Callback base class to hold the data for callback function and member function calls. + * @SINCE_1_0.0 */ -class DALI_IMPORT_API CallbackBase +class DALI_CORE_API CallbackBase { public: /** - * @brief Default constructor + * @brief Default constructor. + * @SINCE_1_0.0 */ CallbackBase(); /** - * @brief Destructor + * @brief Destructor. + * @SINCE_1_0.0 */ ~CallbackBase(); /** * @brief Resets the object pointer so that we know not to call methods of this object any more. + * @SINCE_1_0.0 */ void Reset(); /** - * @brief Function to call the function or member function dispatcher + * @brief Function to call the function or member function dispatcher. * - * @param[in] callback The callback to call. + * @SINCE_1_0.0 + * @param[in] callback The callback to call */ static void Execute( CallbackBase& callback ) { @@ -76,15 +85,16 @@ public: } else { - DALI_ASSERT_DEBUG( 0 && "no function to execute" ); + DALI_ASSERT_ALWAYS( 0 && "no function to execute" ); } } /** * @brief Function to call the function or member function dispatcher. * - * @param[in] callback The callback to call. - * @return value from the function + * @SINCE_1_0.0 + * @param[in] callback The callback to call + * @return The value from the function */ template< typename R > static R ExecuteReturn( CallbackBase& callback ) @@ -112,9 +122,10 @@ public: /** * @brief Function to call the function or member function dispatcher. * - * This function template gets instantiated at the call site - * @param[in] callback The callback to call. - * @param[in] param1 The first parameter to pass into the function. + * This function template gets instantiated at the call site. + * @SINCE_1_0.0 + * @param[in] callback The callback to call + * @param[in] param1 The first parameter to pass into the function */ template< typename P1 > static void Execute( CallbackBase& callback, P1 param1 ) @@ -140,10 +151,11 @@ public: /** * @brief Function to call the function or member function dispatcher. * - * This function template gets instantiated at the call site - * @param[in] callback The callback to call. - * @param[in] param1 The first parameter to pass into the function. - * @return the value from the function + * This function template gets instantiated at the call site. + * @SINCE_1_0.0 + * @param[in] callback The callback to call + * @param[in] param1 The first parameter to pass into the function + * @return The value from the function */ template< typename R, typename P1 > static R ExecuteReturn( CallbackBase& callback, P1 param1 ) @@ -173,9 +185,10 @@ public: * @brief Function to call the function or member function dispatcher. * * This function template gets instantiated at the call site. - * @param[in] callback The callback to call. - * @param[in] param1 The first parameter to pass into the function. - * @param[in] param2 The second parameter to pass into the function. + * @SINCE_1_0.0 + * @param[in] callback The callback to call + * @param[in] param1 The first parameter to pass into the function + * @param[in] param2 The second parameter to pass into the function */ template< typename P1, typename P2 > static void Execute( CallbackBase& callback, P1 param1, P2 param2 ) @@ -201,10 +214,11 @@ public: /** * @brief Function to call the function or member function dispatcher. * - * This function template gets instantiated at the call site - * @param[in] callback The callback to call. - * @param[in] param1 The first parameter to pass into the function. - * @param[in] param2 The second parameter to pass into the function. + * This function template gets instantiated at the call site. + * @SINCE_1_0.0 + * @param[in] callback The callback to call + * @param[in] param1 The first parameter to pass into the function + * @param[in] param2 The second parameter to pass into the function * @return The return value from the function */ template< typename R, typename P1, typename P2 > @@ -235,10 +249,11 @@ public: * @brief Function to call the function or member function dispatcher. * * This function template gets instantiated at the call site. - * @param[in] callback The callback to call. - * @param[in] param1 The first parameter to pass into the function. - * @param[in] param2 The second parameter to pass into the function. - * @param[in] param3 The third parameter to pass into the function. + * @SINCE_1_0.0 + * @param[in] callback The callback to call + * @param[in] param1 The first parameter to pass into the function + * @param[in] param2 The second parameter to pass into the function + * @param[in] param3 The third parameter to pass into the function */ template< typename P1, typename P2, typename P3 > static void Execute( CallbackBase& callback, P1 param1, P2 param2, P3 param3 ) @@ -264,11 +279,12 @@ public: /** * @brief Function to call the function or member function dispatcher. * - * This function template gets instantiated at the call site - * @param[in] callback The callback to call. - * @param[in] param1 The first parameter to pass into the function. - * @param[in] param2 The second parameter to pass into the function. - * @param[in] param3 The third parameter to pass into the function. + * This function template gets instantiated at the call site. + * @SINCE_1_0.0 + * @param[in] callback The callback to call + * @param[in] param1 The first parameter to pass into the function + * @param[in] param2 The second parameter to pass into the function + * @param[in] param3 The third parameter to pass into the function * @return The return value from the function */ template< typename R, typename P1, typename P2, typename P3 > @@ -298,68 +314,82 @@ public: protected: // Constructors for deriving classes /** - * @brief Function with static linkage + * @brief Function with static linkage. + * @SINCE_1_0.0 */ typedef void(*Function)(void); /** - * @brief Member function + * @brief Member function. + * @SINCE_1_0.0 */ typedef void (CallbackBase::*MemberFunction)( void ); /** - * @brief Used to call the correct member function + * @brief Used to call the correct member function. + * @SINCE_1_0.0 */ typedef void (*Dispatcher)( CallbackBase& base ); /** - * @brief Used to destroy mObjectPointer (NULL if not mObjectPointer is not owned) + * @brief Used to destroy mObjectPointer (NULL if not mObjectPointer is not owned). + * @SINCE_1_0.0 */ typedef void(*Destructor)(void* object); /** * @brief Copy constructor operator not declared. + * @SINCE_1_0.0 + * @param[in] rhs Handle to an object */ CallbackBase( const CallbackBase& rhs ); + /** - * @brief assignment operator not declared. + * @brief Assignment operator not declared. + * @SINCE_1_0.0 + * @param[in] rhs Handle to an object + * @return A reference to this */ - const CallbackBase& operator=( const CallbackBase& rhs ); + CallbackBase& operator=( const CallbackBase& rhs ); /** * @brief Constructor for function with static linkage. * - * @param[in] function The function to call. + * @SINCE_1_0.0 + * @param[in] function The function to call */ CallbackBase( Function function ); /** * @brief Constructor for member function. * - * @param[in] object The object to call (not owned). - * @param[in] function The member function of the object. - * @param[in] dispatcher Used to call the actual object. + * @SINCE_1_0.0 + * @param[in] object The object to call (not owned) + * @param[in] function The member function of the object + * @param[in] dispatcher Used to call the actual object */ CallbackBase( void* object, MemberFunction function, Dispatcher dispatcher ); /** * @brief Constructor for member function. * - * @param[in] object The object to call (owned). - * @param[in] function The member function of the object. - * @param dispatcher Used to call the actual object. - * @param destructor Used to delete the owned object. + * @SINCE_1_0.0 + * @param[in] object The object to call (owned) + * @param[in] function The member function of the object + * @param dispatcher Used to call the actual object + * @param destructor Used to delete the owned object */ CallbackBase( void* object, MemberFunction function, Dispatcher dispatcher, Destructor destructor ); public: // Data for deriving classes & Dispatchers /** - * @brief struct to hold the extra data needed for member functions. + * @brief Struct to hold the extra data needed for member functions. + * @SINCE_1_0.0 */ struct Impl { - Impl(); ///< Default constructor + Impl(); ///< Default constructor @SINCE_1_0.0 void* mObjectPointer; ///< Object whose member function will be called. Not owned if mDestructorDispatcher is NULL. Dispatcher mMemberFunctionDispatcher; ///< Dispatcher for member functions @@ -375,18 +405,25 @@ public: // Data for deriving classes & Dispatchers }; /** - * @brief Non-member equality operator + * @brief Non-member equality operator. + * @SINCE_1_0.0 + * @param[in] lhs A reference to compare + * @param[in] rhs A reference to compare to + * @return True if lhs is same as rhs */ bool operator==( const CallbackBase& lhs, const CallbackBase& rhs ); /** * @brief Dispatcher to delete an object. + * @SINCE_1_0.0 */ template< class T > struct Destroyer { /** * @brief Dispatcher to delete an object. + * @SINCE_1_0.0 + * @param[in] object An object to delete */ static void Delete( void* object ) { @@ -398,14 +435,16 @@ struct Destroyer /** * @brief Dispatcher to call the actual member function. + * @SINCE_1_0.0 */ template< class T > struct Dispatcher0 { /** - * @brief Call an actual member function. + * @brief Calls an actual member function. * - * @param[in] callback The callback information. + * @SINCE_1_0.0 + * @param[in] callback The callback information */ static void Dispatch( CallbackBase& callback ) { @@ -419,15 +458,17 @@ struct Dispatcher0 /** * @brief Dispatcher to call the actual member function. + * @SINCE_1_0.0 */ template< class T, typename P1 > struct Dispatcher1 { /** - * @brief Call an actual member function. + * @brief Calls an actual member function. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function */ static void Dispatch( CallbackBase& callback, P1 param1 ) { @@ -441,6 +482,7 @@ struct Dispatcher1 /** * @brief Dispatcher to call the actual member function. + * @SINCE_1_0.0 */ template< class T, typename P1, typename P2 > struct Dispatcher2 @@ -448,9 +490,10 @@ struct Dispatcher2 /** * @brief Call an actual member function. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. - * @param[in] param2 The second parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function + * @param[in] param2 The second parameter to pass to the real member function */ static void Dispatch( CallbackBase& callback, P1 param1, P2 param2 ) { @@ -464,6 +507,7 @@ struct Dispatcher2 /** * @brief Dispatcher to call the actual member function. + * @SINCE_1_0.0 */ template< class T, typename P1, typename P2, typename P3 > struct Dispatcher3 @@ -471,10 +515,11 @@ struct Dispatcher3 /** * @brief Call an actual member function. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. - * @param[in] param2 The second parameter to pass to the real member function. - * @param[in] param3 The third parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function + * @param[in] param2 The second parameter to pass to the real member function + * @param[in] param3 The third parameter to pass to the real member function */ static void Dispatch( CallbackBase& callback, P1 param1, P2 param2, P3 param3 ) { @@ -488,15 +533,17 @@ struct Dispatcher3 /** * @brief Dispatcher to call the actual member function. + * @SINCE_1_0.0 */ template< class T, typename R > struct DispatcherReturn0 { /** - * @brief Call an actual member function. + * @brief Calls an actual member function. * - * @param[in] callback The callback information. - * @return the value. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @return The value */ static R Dispatch( CallbackBase& callback ) { @@ -510,15 +557,17 @@ struct DispatcherReturn0 /** * @brief Dispatcher to call the actual member function. + * @SINCE_1_0.0 */ template< class T, typename R, typename P1 > struct DispatcherReturn1 { /** - * @brief Call an actual member function. + * @brief Calls an actual member function. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function * @return The return value from the function */ static R Dispatch( CallbackBase& callback, P1 param1 ) @@ -533,16 +582,18 @@ struct DispatcherReturn1 /** * @brief Dispatcher to call the actual member function. + * @SINCE_1_0.0 */ template< class T, typename R, typename P1, typename P2 > struct DispatcherReturn2 { /** - * @brief Call an actual member function. + * @brief Calls an actual member function. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. - * @param[in] param2 The second parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function + * @param[in] param2 The second parameter to pass to the real member function * @return The return value from the function */ static R Dispatch( CallbackBase& callback, P1 param1, P2 param2 ) @@ -557,17 +608,19 @@ struct DispatcherReturn2 /** * @brief Dispatcher to call the actual member function. + * @SINCE_1_0.0 */ template< class T, typename R, typename P1, typename P2, typename P3 > struct DispatcherReturn3 { /** - * @brief Call an actual member function. + * @brief Calls an actual member function. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. - * @param[in] param2 The second parameter to pass to the real member function. - * @param[in] param3 The third parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function + * @param[in] param2 The second parameter to pass to the real member function + * @param[in] param3 The third parameter to pass to the real member function * @return The return value from the function */ static R Dispatch( CallbackBase& callback, P1 param1, P2 param2, P3 param3 ) @@ -582,14 +635,16 @@ struct DispatcherReturn3 /** * @brief Dispatcher to call a functor. + * @SINCE_1_0.0 */ template< class T > struct FunctorDispatcher0 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. + * @SINCE_1_0.0 + * @param[in] callback The callback information */ static void Dispatch( CallbackBase& callback ) { @@ -601,14 +656,16 @@ struct FunctorDispatcher0 /** * @brief Dispatcher to call a functor. + * @SINCE_1_0.0 */ template< class T, typename P1 > struct FunctorDispatcher1 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. + * @SINCE_1_0.0 + * @param[in] callback The callback information * @param[in] param1 The first parameter to pass to the real member function. */ static void Dispatch( CallbackBase& callback, P1 param1 ) @@ -621,16 +678,18 @@ struct FunctorDispatcher1 /** * @brief Dispatcher to call a functor. + * @SINCE_1_0.0 */ template< class T, typename P1, typename P2 > struct FunctorDispatcher2 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. - * @param[in] param2 The second parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function + * @param[in] param2 The second parameter to pass to the real member function */ static void Dispatch( CallbackBase& callback, P1 param1, P2 param2 ) { @@ -642,17 +701,19 @@ struct FunctorDispatcher2 /** * @brief Dispatcher to call a functor. + * @SINCE_1_0.0 */ template< class T, typename P1, typename P2, typename P3 > struct FunctorDispatcher3 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. - * @param[in] param2 The second parameter to pass to the real member function. - * @param[in] param3 The third parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function + * @param[in] param2 The second parameter to pass to the real member function + * @param[in] param3 The third parameter to pass to the real member function */ static void Dispatch( CallbackBase& callback, P1 param1, P2 param2, P3 param3 ) { @@ -664,15 +725,17 @@ struct FunctorDispatcher3 /** * @brief Dispatcher to call a functor. + * @SINCE_1_0.0 */ template< class T, typename R > struct FunctorDispatcherReturn0 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. - * @return the value. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @return The value */ static R Dispatch( CallbackBase& callback ) { @@ -684,15 +747,17 @@ struct FunctorDispatcherReturn0 /** * @brief Dispatcher to call a functor. + * @SINCE_1_0.0 */ template< class T, typename R, typename P1 > struct FunctorDispatcherReturn1 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function * @return The return value from the function */ static R Dispatch( CallbackBase& callback, P1 param1 ) @@ -705,16 +770,18 @@ struct FunctorDispatcherReturn1 /** * @brief Dispatcher to call a functor. + * @SINCE_1_0.0 */ template< class T, typename R, typename P1, typename P2 > struct FunctorDispatcherReturn2 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. - * @param[in] param2 The second parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function + * @param[in] param2 The second parameter to pass to the real member function * @return The return value from the function */ static R Dispatch( CallbackBase& callback, P1 param1, P2 param2 ) @@ -727,17 +794,19 @@ struct FunctorDispatcherReturn2 /** * @brief Dispatcher to call a functor. + * @SINCE_1_0.0 */ template< class T, typename R, typename P1, typename P2, typename P3 > struct FunctorDispatcherReturn3 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. - * @param[in] param2 The second parameter to pass to the real member function. - * @param[in] param3 The third parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function + * @param[in] param2 The second parameter to pass to the real member function + * @param[in] param3 The third parameter to pass to the real member function * @return The return value from the function */ static R Dispatch( CallbackBase& callback, P1 param1, P2 param2, P3 param3 ) @@ -750,15 +819,18 @@ struct FunctorDispatcherReturn3 /** * @brief Dispatcher to call a functor. + * * This variant calls a specific void() member function. + * @SINCE_1_0.0 */ template< class T > struct VoidFunctorDispatcher0 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. + * @SINCE_1_0.0 + * @param[in] callback The callback information */ static void Dispatch( CallbackBase& callback ) { @@ -773,16 +845,18 @@ struct VoidFunctorDispatcher0 /** * @brief Dispatcher to call a functor. * - * This variant calls a void() member, ignoring any signal parameters + * This variant calls a void() member, ignoring any signal parameters. + * @SINCE_1_0.0 */ template< class T, typename P1 > struct VoidFunctorDispatcher1 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function */ static void Dispatch( CallbackBase& callback, P1 param1 ) { @@ -797,17 +871,19 @@ struct VoidFunctorDispatcher1 /** * @brief Dispatcher to call a functor. * - * This variant calls a void() member, ignoring any signal parameters + * This variant calls a void() member, ignoring any signal parameters. + * @SINCE_1_0.0 */ template< class T, typename P1, typename P2 > struct VoidFunctorDispatcher2 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. - * @param[in] param2 The second parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function + * @param[in] param2 The second parameter to pass to the real member function */ static void Dispatch( CallbackBase& callback, P1 param1, P2 param2 ) { @@ -822,18 +898,20 @@ struct VoidFunctorDispatcher2 /** * @brief Dispatcher to call a functor. * - * This variant calls a void() member, ignoring any signal parameters + * This variant calls a void() member, ignoring any signal parameters. + * @SINCE_1_0.0 */ template< class T, typename P1, typename P2, typename P3 > struct VoidFunctorDispatcher3 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. - * @param[in] param2 The second parameter to pass to the real member function. - * @param[in] param3 The third parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function + * @param[in] param2 The second parameter to pass to the real member function + * @param[in] param3 The third parameter to pass to the real member function */ static void Dispatch( CallbackBase& callback, P1 param1, P2 param2, P3 param3 ) { @@ -848,16 +926,18 @@ struct VoidFunctorDispatcher3 /** * @brief Dispatcher to call a functor. * - * This variant calls a void() member, and returns a default-constructed value + * This variant calls a void() member, and returns a default-constructed value. + * @SINCE_1_0.0 */ template< class T, typename R > struct VoidFunctorDispatcherReturn0 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. - * @return the value. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @return The value */ static R Dispatch( CallbackBase& callback ) { @@ -873,16 +953,18 @@ struct VoidFunctorDispatcherReturn0 /** * @brief Dispatcher to call a functor. * - * This variant calls a void() member, and returns a default-constructed value + * This variant calls a void() member, and returns a default-constructed value. + * @SINCE_1_0.0 */ template< class T, typename R, typename P1 > struct VoidFunctorDispatcherReturn1 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function * @return The return value from the function */ static R Dispatch( CallbackBase& callback, P1 param1 ) @@ -899,17 +981,19 @@ struct VoidFunctorDispatcherReturn1 /** * @brief Dispatcher to call a functor. * - * This variant calls a void() member, and returns a default-constructed value + * This variant calls a void() member, and returns a default-constructed value. + * @SINCE_1_0.0 */ template< class T, typename R, typename P1, typename P2 > struct VoidFunctorDispatcherReturn2 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. - * @param[in] param2 The second parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function + * @param[in] param2 The second parameter to pass to the real member function * @return The return value from the function */ static R Dispatch( CallbackBase& callback, P1 param1, P2 param2 ) @@ -926,18 +1010,20 @@ struct VoidFunctorDispatcherReturn2 /** * @brief Dispatcher to call a functor. * - * This variant calls a void() member, and returns a default-constructed value + * This variant calls a void() member, and returns a default-constructed value. + * @SINCE_1_0.0 */ template< class T, typename R, typename P1, typename P2, typename P3 > struct VoidFunctorDispatcherReturn3 { /** - * @brief Call a function object. + * @brief Calls a function object. * - * @param[in] callback The callback information. - * @param[in] param1 The first parameter to pass to the real member function. - * @param[in] param2 The second parameter to pass to the real member function. - * @param[in] param3 The third parameter to pass to the real member function. + * @SINCE_1_0.0 + * @param[in] callback The callback information + * @param[in] param1 The first parameter to pass to the real member function + * @param[in] param2 The second parameter to pass to the real member function + * @param[in] param3 The third parameter to pass to the real member function * @return The return value from the function */ static R Dispatch( CallbackBase& callback, P1 param1, P2 param2, P3 param3 ) @@ -954,7 +1040,8 @@ struct VoidFunctorDispatcherReturn3 /** * @brief Thin template to provide type safety for member function callbacks. * - * version with two parameters and return value + * Version with two parameters and return value. + * @SINCE_1_0.0 */ template< class T > class Callback : public CallbackBase @@ -964,6 +1051,7 @@ public: /** * @brief Default constructor. * + * @SINCE_1_0.0 */ Callback() : CallbackBase() @@ -974,8 +1062,9 @@ public: * @brief Constructor for member function. * * Copies the function object. - * @param[in] object The object to call. - * @param[in] memberFunction The member function of the object. + * @SINCE_1_0.0 + * @param[in] object The object to call + * @param[in] memberFunction The member function of the object */ Callback( T* object, void(T::*memberFunction)(void) ) : CallbackBase( object, @@ -1021,6 +1110,7 @@ public: /** * @brief Specializations for static function callbacks. + * @SINCE_1_0.0 */ class CallbackFunction : public CallbackBase { @@ -1028,6 +1118,7 @@ public: /** * @brief Default constructor. + * @SINCE_1_0.0 */ CallbackFunction() : CallbackBase() @@ -1037,7 +1128,8 @@ public: /** * @brief Constructors for functions with static linkage. * - * @param[in] function The function to call. + * @SINCE_1_0.0 + * @param[in] function The function to call */ CallbackFunction( void(*function)() ) : CallbackBase( reinterpret_cast< CallbackBase::Function >( function ) ) @@ -1075,6 +1167,7 @@ public: /** * @brief Specializations for function object callbacks. + * @SINCE_1_0.0 */ template< class T > class CallbackFunctor0 : public CallbackBase @@ -1084,7 +1177,8 @@ public: /** * @brief Constructor which copies a function object. * - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctor0( const T& object ) : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object @@ -1094,7 +1188,8 @@ public: }; /** - * @brief Function object callback for connecting void() methods + * @brief Function object callback for connecting void() methods. + * @SINCE_1_0.0 */ class CallbackFunctorDelegate0 : public CallbackBase { @@ -1104,7 +1199,8 @@ public: * @brief Constructor which copies a function object. * * This variant calls a void() member, ignoring any signal parameters. - * @param[in] object A newly allocated object (ownership is transferred). + * @SINCE_1_0.0 + * @param[in] object A newly allocated object (ownership is transferred) */ CallbackFunctorDelegate0( FunctorDelegate* object ) : CallbackBase( reinterpret_cast< void* >( object ), // transfer ownership @@ -1115,6 +1211,7 @@ public: /** * @brief Function object callback for matching callbacks to signal signature. + * @SINCE_1_0.0 */ template< class T, typename P1 > class CallbackFunctor1 : public CallbackBase @@ -1124,7 +1221,8 @@ public: /** * @brief Constructor which copies a function object. * - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctor1( const T& object ) : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object @@ -1135,6 +1233,7 @@ public: /** * @brief Function object callback for connecting void() methods. + * @SINCE_1_0.0 */ template< typename P1 > class CallbackFunctorDelegate1 : public CallbackBase @@ -1145,7 +1244,8 @@ public: * @brief Constructor which copies a function object. * * This variant calls a void() member, ignoring any signal parameters. - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctorDelegate1( FunctorDelegate* object ) : CallbackBase( reinterpret_cast< void* >( object ), // transfer ownership @@ -1155,7 +1255,8 @@ public: }; /** - * @brief Function object callback for matching callbacks to signal signature + * @brief Function object callback for matching callbacks to signal signature. + * @SINCE_1_0.0 */ template< class T, typename P1, typename P2 > class CallbackFunctor2 : public CallbackBase @@ -1165,7 +1266,8 @@ public: /** * @brief Constructor which copies a function object. * - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctor2( const T& object ) : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object @@ -1175,7 +1277,8 @@ public: }; /** - * @brief Function object callback for connecting void() methods + * @brief Function object callback for connecting void() methods. + * @SINCE_1_0.0 */ template< typename P1, typename P2 > class CallbackFunctorDelegate2 : public CallbackBase @@ -1186,7 +1289,8 @@ public: * @brief Constructor which copies a function object. * * This variant calls a void() member, ignoring any signal parameters. - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctorDelegate2( FunctorDelegate* object ) : CallbackBase( reinterpret_cast< void* >( object ), // transfer ownership @@ -1196,7 +1300,8 @@ public: }; /** - * @brief Function object callback for matching callbacks to signal signature + * @brief Function object callback for matching callbacks to signal signature. + * @SINCE_1_0.0 */ template< class T, typename P1, typename P2, typename P3 > class CallbackFunctor3 : public CallbackBase @@ -1206,7 +1311,8 @@ public: /** * @brief Constructor which copies a function object. * - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctor3( const T& object ) : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object @@ -1216,7 +1322,8 @@ public: }; /** - * @brief Function object callback for connecting void() methods + * @brief Function object callback for connecting void() methods. + * @SINCE_1_0.0 */ template< typename P1, typename P2, typename P3 > class CallbackFunctorDelegate3 : public CallbackBase @@ -1228,7 +1335,8 @@ public: * @brief Constructor which copies a function object. * * This variant calls a void() member, ignoring any signal parameters. - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctorDelegate3( FunctorDelegate* object ) : CallbackBase( reinterpret_cast< void* >( object ), // transfer ownership @@ -1238,7 +1346,8 @@ public: }; /** - * @brief Function object callback for matching callbacks to signal signature + * @brief Function object callback for matching callbacks to signal signature. + * @SINCE_1_0.0 */ template< class T, typename R > class CallbackFunctorReturn0 : public CallbackBase @@ -1248,7 +1357,8 @@ public: /** * @brief Constructor which copies a function object. * - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctorReturn0( const T& object ) : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object @@ -1258,7 +1368,8 @@ public: }; /** - * @brief Function object callback for connecting void() methods + * @brief Function object callback for connecting void() methods. + * @SINCE_1_0.0 */ template< typename R > class CallbackFunctorDelegateReturn0 : public CallbackBase @@ -1269,7 +1380,8 @@ public: * @brief Constructor which copies a function object. * * This variant calls a void() member, ignoring any signal parameters. - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctorDelegateReturn0( FunctorDelegate* object ) : CallbackBase( reinterpret_cast< void* >( object ), // transfer ownership @@ -1279,7 +1391,8 @@ public: }; /** - * @brief Function object callback for matching callbacks to signal signature + * @brief Function object callback for matching callbacks to signal signature. + * @SINCE_1_0.0 */ template< class T, typename P1, typename R > class CallbackFunctorReturn1 : public CallbackBase @@ -1289,7 +1402,8 @@ public: /** * @brief Constructor which copies a function object. * - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctorReturn1( const T& object ) : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object @@ -1299,7 +1413,8 @@ public: }; /** - * @brief Function object callback for connecting void() methods + * @brief Function object callback for connecting void() methods. + * @SINCE_1_0.0 */ template< typename P1, typename R > class CallbackFunctorDelegateReturn1 : public CallbackBase @@ -1310,7 +1425,8 @@ public: * @brief Constructor which copies a function object. * * This variant calls a void() member, ignoring any signal parameters. - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctorDelegateReturn1( FunctorDelegate* object ) : CallbackBase( reinterpret_cast< void* >( object ), // transfer ownership @@ -1320,7 +1436,8 @@ public: }; /** - * @brief Function object callback for matching callbacks to signal signature + * @brief Function object callback for matching callbacks to signal signature. + * @SINCE_1_0.0 */ template< class T, typename P1, typename P2, typename R > class CallbackFunctorReturn2 : public CallbackBase @@ -1330,7 +1447,8 @@ public: /** * @brief Constructor which copies a function object. * - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctorReturn2( const T& object ) : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object @@ -1340,7 +1458,8 @@ public: }; /** - * @brief Function object callback for connecting void() methods + * @brief Function object callback for connecting void() methods. + * @SINCE_1_0.0 */ template< typename P1, typename P2, typename R > class CallbackFunctorDelegateReturn2 : public CallbackBase @@ -1351,7 +1470,8 @@ public: * @brief Constructor which copies a function object. * * This variant calls a void() member, ignoring any signal parameters. - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctorDelegateReturn2( FunctorDelegate* object ) : CallbackBase( reinterpret_cast< void* >( object ), // transfer ownership @@ -1361,7 +1481,8 @@ public: }; /** - * @brief Function object callback for matching callbacks to signal signature + * @brief Function object callback for matching callbacks to signal signature. + * @SINCE_1_0.0 */ template< class T, typename P1, typename P2, typename P3, typename R > class CallbackFunctorReturn3 : public CallbackBase @@ -1371,7 +1492,8 @@ public: /** * @brief Constructor which copies a function object. * - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctorReturn3( const T& object ) : CallbackBase( reinterpret_cast< void* >( new T( object ) ), // copy the object @@ -1381,7 +1503,8 @@ public: }; /** - * @brief Function object callback for connecting void() methods + * @brief Function object callback for connecting void() methods. + * @SINCE_1_0.0 */ template< typename P1, typename P2, typename P3, typename R > class CallbackFunctorDelegateReturn3 : public CallbackBase @@ -1392,7 +1515,8 @@ public: * @brief Constructor which copies a function object. * * This variant calls a void() member, ignoring any signal parameters. - * @param[in] object The object to copy. + * @SINCE_1_0.0 + * @param[in] object The object to copy */ CallbackFunctorDelegateReturn3( FunctorDelegate* object ) : CallbackBase( reinterpret_cast< void* >( object ), // transfer ownership @@ -1406,8 +1530,9 @@ public: /** * @brief Creates a callback from a C function or static member function with no parameters. * - * @param[in] function The function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * @SINCE_1_0.0 + * @param[in] function The function to call + * @return A newly allocated Callback object, ownership transferred to caller */ inline CallbackBase* MakeCallback( void(*function)(void) ) { @@ -1417,8 +1542,9 @@ inline CallbackBase* MakeCallback( void(*function)(void) ) /** * @brief Creates a callback from a C function or static member function with one parameter. * - * @param[in] function The function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * @SINCE_1_0.0 + * @param[in] function The function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< typename P1 > inline CallbackBase* MakeCallback( void(*function)(P1) ) @@ -1429,8 +1555,9 @@ inline CallbackBase* MakeCallback( void(*function)(P1) ) /** * @brief Creates a callback from a C function or static member function with no parameters and a return type. * - * @param[in] function The function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * @SINCE_1_0.0 + * @param[in] function The function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< typename R > inline CallbackBase* MakeCallback( R(*function)(void) ) @@ -1441,8 +1568,9 @@ inline CallbackBase* MakeCallback( R(*function)(void) ) /** * @brief Creates a callback from a C function or static member function with one parameter and a return type. * - * @param[in] function The function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * @SINCE_1_0.0 + * @param[in] function The function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< typename R, typename P1 > inline CallbackBase* MakeCallback( R(*function)(P1) ) @@ -1453,8 +1581,9 @@ inline CallbackBase* MakeCallback( R(*function)(P1) ) /** * @brief Creates a callback from a C function or static member function with two parameters. * - * @param[in] function The function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * @SINCE_1_0.0 + * @param[in] function The function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< typename P1, typename P2 > inline CallbackBase* MakeCallback( void(*function)(P1,P2) ) @@ -1465,8 +1594,9 @@ inline CallbackBase* MakeCallback( void(*function)(P1,P2) ) /** * @brief Creates a callback from a C function or static member function with two parameters and a return type. * - * @param[in] function The function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * @SINCE_1_0.0 + * @param[in] function The function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< typename R, typename P1, typename P2 > inline CallbackBase* MakeCallback( R(*function)(P1,P2) ) @@ -1477,8 +1607,9 @@ inline CallbackBase* MakeCallback( R(*function)(P1,P2) ) /** * @brief Creates a callback from a C function or static member function with three parameters. * - * @param[in] function The function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * @SINCE_1_0.0 + * @param[in] function The function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< typename P1, typename P2, typename P3 > inline CallbackBase* MakeCallback( void(*function)(P1,P2,P3) ) @@ -1489,8 +1620,9 @@ inline CallbackBase* MakeCallback( void(*function)(P1,P2,P3) ) /** * @brief Creates a callback from a C function or static member function with three parameters and a return type. * - * @param[in] function The function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * @SINCE_1_0.0 + * @param[in] function The function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< typename R, typename P1, typename P2, typename P3 > inline CallbackBase* MakeCallback( R(*function)(P1,P2,P3) ) @@ -1501,10 +1633,11 @@ inline CallbackBase* MakeCallback( R(*function)(P1,P2,P3) ) /** * @brief Creates a callback from a class member function with no parameters. * - * requires the function to be member of the same class - * @param[in] object The object to call. - * @param[in] function The member function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * Requires the function to be member of the same class. + * @SINCE_1_0.0 + * @param[in] object The object to call + * @param[in] function The member function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< class T > inline CallbackBase* MakeCallback( T* object, void(T::*function)(void) ) @@ -1515,10 +1648,11 @@ inline CallbackBase* MakeCallback( T* object, void(T::*function)(void) ) /** * @brief Creates a callback from a class member function with one parameter. * - * requires the function to be member of the same class - * @param[in] object The object to call. - * @param[in] function The member function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * Requires the function to be member of the same class. + * @SINCE_1_0.0 + * @param[in] object The object to call + * @param[in] function The member function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< class T, typename P1 > inline CallbackBase* MakeCallback( T* object, void(T::*function)(P1) ) @@ -1529,10 +1663,11 @@ inline CallbackBase* MakeCallback( T* object, void(T::*function)(P1) ) /** * @brief Creates a callback from a class member function with two parameters. * - * requires the function to be member of the same class - * @param[in] object The object to call. - * @param[in] function The member function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * Requires the function to be member of the same class. + * @SINCE_1_0.0 + * @param[in] object The object to call + * @param[in] function The member function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< class T, typename P1, typename P2 > inline CallbackBase* MakeCallback( T* object, void(T::*function)(P1,P2) ) @@ -1543,10 +1678,11 @@ inline CallbackBase* MakeCallback( T* object, void(T::*function)(P1,P2) ) /** * @brief Creates a callback from a class member function with three parameters. * - * requires the function to be member of the same class - * @param[in] object The object to call. - * @param[in] function The member function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * Requires the function to be member of the same class. + * @SINCE_1_0.0 + * @param[in] object The object to call + * @param[in] function The member function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< class T, typename P1, typename P2, typename P3 > inline CallbackBase* MakeCallback( T* object, void(T::*function)(P1,P2,P3) ) @@ -1557,10 +1693,11 @@ inline CallbackBase* MakeCallback( T* object, void(T::*function)(P1,P2,P3) ) /** * @brief Creates a callback from a class member function with no parameters and a return type. * - * requires the function to be member of the same class - * @param[in] object The object to call. - * @param[in] function The member function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * Requires the function to be member of the same class. + * @SINCE_1_0.0 + * @param[in] object The object to call + * @param[in] function The member function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< class T, typename R > inline CallbackBase* MakeCallback( T* object, R(T::*function)() ) @@ -1571,10 +1708,11 @@ inline CallbackBase* MakeCallback( T* object, R(T::*function)() ) /** * @brief Creates a callback from a class member function with one parameter and a return type. * - * requires the function to be member of the same class - * @param[in] object The object to call. - * @param[in] function The member function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * Requires the function to be member of the same class. + * @SINCE_1_0.0 + * @param[in] object The object to call + * @param[in] function The member function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< class T, typename P1, typename R > inline CallbackBase* MakeCallback( T* object, R(T::*function)(P1) ) @@ -1585,10 +1723,11 @@ inline CallbackBase* MakeCallback( T* object, R(T::*function)(P1) ) /** * @brief Creates a callback from a class member function with two parameters and a return type. * - * requires the function to be member of the same class - * @param[in] object The object to call. - * @param[in] function The member function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * Requires the function to be member of the same class. + * @SINCE_1_0.0 + * @param[in] object The object to call + * @param[in] function The member function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< class T, typename P1, typename P2, typename R > inline CallbackBase* MakeCallback( T* object, R(T::*function)(P1,P2) ) @@ -1599,10 +1738,11 @@ inline CallbackBase* MakeCallback( T* object, R(T::*function)(P1,P2) ) /** * @brief Creates a callback from a class member function with three parameters and a return type. * - * requires the function to be member of the same class - * @param[in] object The object to call. - * @param[in] function The member function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * Requires the function to be member of the same class. + * @SINCE_1_0.0 + * @param[in] object The object to call + * @param[in] function The member function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< class T, typename P1, typename P2, typename P3, typename R > inline CallbackBase* MakeCallback( T* object, R(T::*function)(P1,P2,P3) ) @@ -1613,10 +1753,11 @@ inline CallbackBase* MakeCallback( T* object, R(T::*function)(P1,P2,P3) ) /** * @brief Creates a callback from a class's parent member function with no parameters. * - * requires the function to be member of the same class - * @param[in] object The object to call. - * @param[in] function The member function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * Requires the function to be member of the same class. + * @SINCE_1_0.0 + * @param[in] object The object to call + * @param[in] function The member function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< class T, class Base > inline CallbackBase* MakeCallback( T* object, void(Base::*function)(void) ) @@ -1626,10 +1767,11 @@ inline CallbackBase* MakeCallback( T* object, void(Base::*function)(void) ) /** * @brief Creates a callback from a class's parent member function with no parameters. * - * requires the function to be member of the same class - * @param[in] object The object to call. - * @param[in] function The member function to call. - * @return a newly allocated Callback object, ownership transferred to caller + * Requires the function to be member of the same class. + * @SINCE_1_0.0 + * @param[in] object The object to call + * @param[in] function The member function to call + * @return A newly allocated Callback object, ownership transferred to caller */ template< class T, class Base > inline CallbackBase* MakeCallback( T& object, void(Base::*function)(void) ) @@ -1637,6 +1779,9 @@ inline CallbackBase* MakeCallback( T& object, void(Base::*function)(void) ) return new Callback< T >( object, function ); } +/** + * @} + */ } // namespace DALI #endif // __DALI_CALLBACK_H__