-#ifndef __DALI_CALLBACK_H__
-#define __DALI_CALLBACK_H__
+#ifndef DALI_CALLBACK_H
+#define DALI_CALLBACK_H
/*
- * Copyright (c) 2018 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2019 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.
// the code has to be loaded, otherwise we crash boom bang
if( callback.mImpl && callback.mImpl->mObjectPointer )
{
- typedef R(*Dispatcher)(CallbackBase& base);
+ using Dispatcher = R ( * )( CallbackBase& );
Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher );
returnVal = (*dispatcher)( callback );
}
else if( !callback.mImpl && callback.mFunction )
{
- typedef R(*Function1)();
+ using Function1 = R ( * )();
returnVal = (*(reinterpret_cast< Function1 >( callback.mFunction )))();
}
// so the library containing the code has to be loaded, otherwise we crash boom bang
if( callback.mImpl && callback.mImpl->mObjectPointer )
{
- typedef void(*Dispatcher)(CallbackBase& base,P1);
+ using Dispatcher = void ( * )( CallbackBase&, P1 );
Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher );
(*dispatcher)( callback, param1 );
}
else if( !callback.mImpl && callback.mFunction )
{
// convert function type
- typedef void(*Function1)(P1);
+ using Function1 = void ( * )( P1 );
(*(reinterpret_cast< Function1 >( callback.mFunction )))( param1 );
}
}
// so the library containing the code has to be loaded, otherwise we crash boom bang
if( callback.mImpl && callback.mImpl->mObjectPointer )
{
- typedef R(*Dispatcher)(CallbackBase& base,P1);
+ using Dispatcher = R ( * )( CallbackBase&, P1 );
Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher );
returnVal = (*dispatcher)( callback, param1 );
}
else if( !callback.mImpl && callback.mFunction )
{
// convert function type
- typedef R(*Function1)(P1);
+ using Function1 = R ( * )( P1 );
returnVal = (*(reinterpret_cast< Function1 >( callback.mFunction )))( param1 );
}
// so the library containing the code has to be loaded, otherwise we crash boom bang
if( callback.mImpl && callback.mImpl->mObjectPointer )
{
- typedef void(*Dispatcher)(CallbackBase& base,P1,P2);
+ using Dispatcher = void ( * )( CallbackBase&, P1, P2 );
Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher );
(*dispatcher)( callback, param1, param2 );
}
else if( !callback.mImpl && callback.mFunction )
{
// convert function type
- typedef void(*Function2)(P1,P2);
+ using Function2 = void ( * )( P1, P2 );
(*(reinterpret_cast< Function2 >( callback.mFunction )))( param1, param2 );
}
}
// so the library containing the code has to be loaded, otherwise we crash boom bang
if( callback.mImpl && callback.mImpl->mObjectPointer )
{
- typedef R(*Dispatcher)(CallbackBase& base,P1,P2);
+ using Dispatcher = R ( * )( CallbackBase&, P1, P2 );
Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher );
returnVal = (*dispatcher)( callback, param1, param2 );
}
else if( !callback.mImpl && callback.mFunction )
{
// convert function type
- typedef R(*Function2)(P1,P2);
+ using Function2 = R ( * )( P1, P2 );
returnVal = (*(reinterpret_cast< Function2 >( callback.mFunction )))( param1, param2 );
}
// so the library containing the code has to be loaded, otherwise we crash boom bang
if( callback.mImpl && callback.mImpl->mObjectPointer )
{
- typedef void(*Dispatcher)(CallbackBase& base,P1,P2,P3);
+ using Dispatcher = void ( * )( CallbackBase&, P1, P2, P3 );
Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher );
(*dispatcher)( callback, param1, param2, param3 );
}
else if( !callback.mImpl && callback.mFunction )
{
// convert function type
- typedef void(*Function2)(P1,P2,P3);
+ using Function2 = void ( * )( P1, P2, P3 );
(*(reinterpret_cast< Function2 >( callback.mFunction )))( param1, param2, param3 );
}
}
// so the library containing the code has to be loaded, otherwise we crash boom bang
if( callback.mImpl && callback.mImpl->mObjectPointer )
{
- typedef R(*Dispatcher)(CallbackBase& base,P1,P2,P3);
+ using Dispatcher = R ( * )( CallbackBase&, P1, P2, P3 );
Dispatcher dispatcher = reinterpret_cast< Dispatcher >( callback.mImpl->mMemberFunctionDispatcher );
returnVal = (*dispatcher)( callback, param1, param2, param3 );
}
else if( !callback.mImpl && callback.mFunction )
{
// convert function type
- typedef R(*Function2)(P1,P2,P3);
+ using Function2 = R ( * )( P1, P2, P3 );
returnVal = (*(reinterpret_cast< Function2 >( callback.mFunction )))( param1, param2, param3 );
}
* @brief Function with static linkage.
* @SINCE_1_0.0
*/
- typedef void(*Function)(void);
+ using Function = void ( * )();
/**
* @brief Member function.
* @SINCE_1_0.0
*/
- typedef void (CallbackBase::*MemberFunction)( void );
+ using MemberFunction = void ( CallbackBase::* )();
/**
* @brief Used to call the correct member function.
* @SINCE_1_0.0
*/
- typedef void (*Dispatcher)( CallbackBase& base );
+ using Dispatcher = void ( * )( CallbackBase& );
/**
* @brief Used to destroy mObjectPointer (NULL if not mObjectPointer is not owned).
* @SINCE_1_0.0
*/
- typedef void(*Destructor)(void* object);
+ using Destructor = void ( * )( void* );
/**
* @brief Copy constructor operator not declared.
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef void(T::*MemberFunction)(void);
+ using MemberFunction = void ( T::* )();
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
(object->*function)();
}
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef void(T::*MemberFunction)(P1);
+ using MemberFunction = void ( T::* )( P1 );
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
(object->*function)( param1 );
}
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef void(T::*MemberFunction)(P1, P2);
+ using MemberFunction = void ( T::* )( P1, P2 );
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
(object->*function)( param1, param2 );
}
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef void(T::*MemberFunction)(P1, P2, P3);
+ using MemberFunction = void ( T::* )( P1, P2, P3 );
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
(object->*function)( param1, param2, param3 );
}
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef R(T::*MemberFunction)(void);
+ using MemberFunction = R ( T::* )();
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
return (object->*function)();
}
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef R(T::*MemberFunction)(P1);
+ using MemberFunction = R ( T::* )( P1 );
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
return (object->*function)( param1 );
}
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef R(T::*MemberFunction)(P1, P2);
+ using MemberFunction = R ( T::* )( P1, P2 );
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
return (object->*function)( param1, param2 );
}
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef R(T::*MemberFunction)(P1, P2, P3);
+ using MemberFunction = R ( T::* )( P1, P2, P3 );
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
return (object->*function)( param1, param2, param3 );
}
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef void(T::*MemberFunction)(void);
+ using MemberFunction = void ( T::* )();
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
(object->*function)();
}
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef void(T::*MemberFunction)(void);
+ using MemberFunction = void ( T::* )();
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
(object->*function)(/*ignore params*/);
}
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef void(T::*MemberFunction)(void);
+ using MemberFunction = void ( T::* )();
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
(object->*function)(/*ignore params*/);
}
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef void(T::*MemberFunction)(void);
+ using MemberFunction = void ( T::* )();
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
(object->*function)(/*ignore params*/);
}
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef void(T::*MemberFunction)(void);
+ using MemberFunction = void ( T::* )();
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
(object->*function)(/*ignore params*/);
return R();
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef void(T::*MemberFunction)(void);
+ using MemberFunction = void ( T::* )();
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
(object->*function)(/*ignore params*/);
return R();
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef void(T::*MemberFunction)(void);
+ using MemberFunction = void ( T::* )();
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
(object->*function)(/*ignore params*/);
return R();
{
// "downcast" the object and function type back to the correct ones
T* object = reinterpret_cast< T* >( callback.mImpl->mObjectPointer );
- typedef void(T::*MemberFunction)(void);
+ using MemberFunction = void ( T::* )();
MemberFunction function = reinterpret_cast< MemberFunction >( callback.mMemberFunction );
(object->*function)(/*ignore params*/);
return R();
*/
} // namespace DALI
-#endif // __DALI_CALLBACK_H__
+#endif // DALI_CALLBACK_H