-#ifndef __DALI_SIGNAL_H__
-#define __DALI_SIGNAL_H__
+#ifndef DALI_SIGNAL_H
+#define DALI_SIGNAL_H
/*
- * Copyright (c) 2015 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2020 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 class should implement Dali::ConnectionTrackerInterface, or inherit from Dali::ConnectionTracker.
+ * @brief The class should implement Dali::ConnectionTrackerInterface, or inherit from Dali::ConnectionTracker.
+ *
* This enforces automatic disconnection when an object is destroyed, so you don't have
* to manually disconnect from signals.
*
* }
* }
* @endcode
+ * @SINCE_1_0.0
*/
// INTERNAL INCLUDES
namespace Dali
{
+/**
+ * @addtogroup dali_core_signals
+ * @{
+ */
/**
* @brief Base Template class to provide signals.
* ...
* };
* @endcode
+ * @SINCE_1_0.0
*/
template< typename _Signature >
class Signal
/**
* @brief A template for Signals with no parameters or return value.
+ * @SINCE_1_0.0
*/
template <>
class Signal< void () >
/**
* @brief Default constructor.
+ * @SINCE_1_0.0
*/
Signal()
{
/**
* @brief Non-virtual destructor.
+ * @SINCE_1_0.0
*/
~Signal()
{
}
/**
- * @brief Query whether there are any connected slots.
+ * @brief Queries whether there are any connected slots.
*
- * @return True if there are any slots connected to the signal.
+ * @SINCE_1_0.0
+ * @return True if there are any slots connected to the signal
*/
bool Empty() const
{
}
/**
- * @brief Query the number of slots.
+ * @brief Queries the number of slots.
*
- * @return The number of slots connected to this signal.
+ * @SINCE_1_0.0
+ * @return The number of slots connected to this signal
*/
std::size_t GetConnectionCount() const
{
}
/**
- * @brief Connect a function.
+ * @brief Connects a function.
*
- * @param[in] func The function to connect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to connect
*/
void Connect( void (*func)() )
{
}
/**
- * @brief Disconnect a function.
+ * @brief Disconnects a function.
*
- * @param[in] func The function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to disconnect
*/
void Disconnect( void (*func)() )
{
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( X* obj, void (X::*func)() )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( X* obj, void (X::*func)() )
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( SlotDelegate<X>& delegate, void (X::*func)() )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( SlotDelegate<X>& delegate, void (X::*func)() )
}
/**
- * @brief Connect a function object.
+ * @brief Connects a function object.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] func The function object to copy.
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] func The function object to copy
*/
template<class X>
void Connect( ConnectionTrackerInterface* connectionTracker, const X& func )
}
/**
- * @brief Connect a function object using FunctorDelegate.
+ * @brief Connects a function object using FunctorDelegate.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken).
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken)
*/
void Connect( ConnectionTrackerInterface* connectionTracker, FunctorDelegate* delegate )
{
}
/**
- * @brief Emit the signal.
+ * @brief Emits the signal.
+ * @SINCE_1_0.0
*/
void Emit()
{
private:
- Signal( const Signal& ); ///< undefined copy constructor, signals don't support copying.
- Signal& operator=( const Signal& ); ///< undefined assignment operator
+ Signal( const Signal& ) = delete; ///< Deleted copy constructor, signals don't support copying. @SINCE_1_0.0
+ Signal( Signal&& ) = delete; ///< Deleted move constructor, signals don't support moving. @SINCE_1_9.25
+ Signal& operator=( const Signal& ) = delete; ///< Deleted copy assignment operator @SINCE_1_0.0
+ Signal& operator=( Signal&& ) = delete; ///< Deleted move assignment operator @SINCE_1_9.25
private:
/**
* @brief A template for Signals with no parameters and a return value.
+ * @SINCE_1_0.0
*/
template < typename Ret >
class Signal< Ret() >
/**
* @brief Default constructor.
+ * @SINCE_1_0.0
*/
Signal()
{
/**
* @brief Non-virtual destructor.
+ * @SINCE_1_0.0
*/
~Signal()
{
}
/**
- * @brief Query whether there are any connected slots.
+ * @brief Queries whether there are any connected slots.
*
- * @return True if there are any slots connected to the signal.
+ * @SINCE_1_0.0
+ * @return True if there are any slots connected to the signal
*/
bool Empty() const
{
}
/**
- * @brief Query the number of slots.
+ * @brief Queries the number of slots.
*
- * @return The number of slots connected to this signal.
+ * @SINCE_1_0.0
+ * @return The number of slots connected to this signal
*/
std::size_t GetConnectionCount() const
{
return mImpl.GetConnectionCount();
}
/**
- * @brief Connect a function.
+ * @brief Connects a function.
*
- * @param[in] func The function to connect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to connect
*/
void Connect( Ret (*func)() )
{
}
/**
- * @brief Disconnect a function.
+ * @brief Disconnects a function.
*
- * @param[in] func The function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to disconnect
*/
void Disconnect( Ret (*func)() )
{
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( X* obj, Ret (X::*func)() )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( X* obj, Ret (X::*func)() )
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( SlotDelegate<X>& delegate, Ret (X::*func)() )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( SlotDelegate<X>& delegate, Ret (X::*func)() )
}
/**
- * @brief Connect a function object.
+ * @brief Connects a function object.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] func The function object to copy.
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] func The function object to copy
*/
template<class X>
void Connect( ConnectionTrackerInterface* connectionTracker, const X& func )
}
/**
- * @brief Connect a function object using FunctorDelegate.
+ * @brief Connects a function object using FunctorDelegate.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken).
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken)
*/
void Connect( ConnectionTrackerInterface* connectionTracker, FunctorDelegate* delegate )
{
}
/**
- * @brief Emit the signal.
+ * @brief Emits the signal.
*
- * @return The value returned by the last callback, or a default constructed value if no callbacks are connected.
+ * @SINCE_1_0.0
+ * @return The value returned by the last callback, or a default constructed value if no callbacks are connected
*/
Ret Emit()
{
private:
- Signal( const Signal& ); ///< undefined copy constructor, signals don't support copying.
- Signal& operator=( const Signal& ); ///< undefined assignment operator
+ Signal( const Signal& ) = delete; ///< Deleted copy constructor, signals don't support copying. @SINCE_1_0.0
+ Signal( Signal&& ) = delete; ///< Deleted move constructor, signals don't support moving. @SINCE_1_9.25
+ Signal& operator=( const Signal& ) = delete; ///< Deleted copy assignment operator @SINCE_1_0.0
+ Signal& operator=( Signal&& ) = delete; ///< Deleted move assignment operator @SINCE_1_9.25
private:
/**
* @brief A template for Signals with 1 parameter.
+ * @SINCE_1_0.0
*/
template < typename Arg0 >
class Signal< void ( Arg0 ) >
/**
* @brief Default constructor.
+ * @SINCE_1_0.0
*/
Signal()
{
/**
* @brief Non-virtual destructor.
+ * @SINCE_1_0.0
*/
~Signal()
{
}
/**
- * @brief Query whether there are any connected slots.
+ * @brief Queries whether there are any connected slots.
*
- * @return True if there are any slots connected to the signal.
+ * @SINCE_1_0.0
+ * @return True if there are any slots connected to the signal
*/
bool Empty() const
{
}
/**
- * @brief Query the number of slots.
+ * @brief Queries the number of slots.
*
- * @return The number of slots connected to this signal.
+ * @SINCE_1_0.0
+ * @return The number of slots connected to this signal
*/
std::size_t GetConnectionCount() const
{
return mImpl.GetConnectionCount();
}
/**
- * @brief Connect a function.
+ * @brief Connects a function.
*
- * @param[in] func The function to connect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to connect
*/
void Connect( void (*func)( Arg0 arg0 ) )
{
}
/**
- * @brief Disconnect a function.
+ * @brief Disconnects a function.
*
- * @param[in] func The function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to disconnect
*/
void Disconnect( void (*func)( Arg0 arg0 ) )
{
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( X* obj, void (X::*func)( Arg0 arg0 ) )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( X* obj, void (X::*func)( Arg0 arg0 ) )
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( SlotDelegate<X>& delegate, void (X::*func)( Arg0 arg0 ) )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( SlotDelegate<X>& delegate, void (X::*func)( Arg0 arg0 ) )
}
/**
- * @brief Connect a function object.
+ * @brief Connects a function object.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] func The function object to copy.
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] func The function object to copy
*/
template<class X>
void Connect( ConnectionTrackerInterface* connectionTracker, const X& func )
}
/**
- * @brief Connect a function object using FunctorDelegate.
+ * @brief Connects a function object using FunctorDelegate.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken).
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken)
*/
void Connect( ConnectionTrackerInterface* connectionTracker, FunctorDelegate* delegate )
{
}
/**
- * @brief Emit the signal.
+ * @brief Emits the signal.
*
- * @param[in] arg0 The first value to pass to callbacks.
+ * @SINCE_1_0.0
+ * @param[in] arg0 The first value to pass to callbacks
*/
void Emit( Arg0 arg0 )
{
private:
- Signal( const Signal& ); ///< undefined copy constructor, signals don't support copying.
- Signal& operator=( const Signal& ); ///< undefined assignment operator
+ Signal( const Signal& ) = delete; ///< Deleted copy constructor, signals don't support copying. @SINCE_1_0.0
+ Signal( Signal&& ) = delete; ///< Deleted move constructor, signals don't support moving. @SINCE_1_9.25
+ Signal& operator=( const Signal& ) = delete; ///< Deleted copy assignment operator @SINCE_1_0.0
+ Signal& operator=( Signal&& ) = delete; ///< Deleted move assignment operator @SINCE_1_9.25
private:
/**
* @brief A template for Signals with 1 parameter and a return value.
+ * @SINCE_1_0.0
*/
template < typename Ret, typename Arg0 >
class Signal< Ret( Arg0 ) >
/**
* @brief Default constructor.
+ * @SINCE_1_0.0
*/
Signal()
{
/**
* @brief Non-virtual destructor.
+ * @SINCE_1_0.0
*/
~Signal()
{
}
/**
- * @brief Query whether there are any connected slots.
+ * @brief Queries whether there are any connected slots.
*
- * @return True if there are any slots connected to the signal.
+ * @SINCE_1_0.0
+ * @return True if there are any slots connected to the signal
*/
bool Empty() const
{
}
/**
- * @brief Query the number of slots.
+ * @brief Queries the number of slots.
*
- * @return The number of slots connected to this signal.
+ * @SINCE_1_0.0
+ * @return The number of slots connected to this signal
*/
std::size_t GetConnectionCount() const
{
return mImpl.GetConnectionCount();
}
/**
- * @brief Connect a function.
+ * @brief Connects a function.
*
- * @param[in] func The function to connect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to connect
*/
void Connect( Ret (*func)( Arg0 arg0 ) )
{
}
/**
- * @brief Disconnect a function.
+ * @brief Disconnects a function.
*
- * @param[in] func The function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to disconnect
*/
void Disconnect( Ret (*func)( Arg0 arg0 ) )
{
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( X* obj, Ret (X::*func)( Arg0 arg0 ) )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( X* obj, Ret (X::*func)( Arg0 arg0 ) )
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( SlotDelegate<X>& delegate, Ret (X::*func)( Arg0 arg0 ) )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( SlotDelegate<X>& delegate, Ret (X::*func)( Arg0 arg0 ) )
}
/**
- * @brief Connect a function object.
+ * @brief Connects a function object.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] func The function object to copy.
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] func The function object to copy
*/
template<class X>
void Connect( ConnectionTrackerInterface* connectionTracker, const X& func )
}
/**
- * @brief Connect a function object using FunctorDelegate.
+ * @brief Connects a function object using FunctorDelegate.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken).
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken)
*/
void Connect( ConnectionTrackerInterface* connectionTracker, FunctorDelegate* delegate )
{
}
/**
- * @brief Emit the signal.
+ * @brief Emits the signal.
*
- * @param[in] arg0 The first value to pass to callbacks.
- * @return The value returned by the last callback, or a default constructed value if no callbacks are connected.
+ * @SINCE_1_0.0
+ * @param[in] arg0 The first value to pass to callbacks
+ * @return The value returned by the last callback, or a default constructed value if no callbacks are connected
*/
Ret Emit( Arg0 arg0 )
{
private:
- Signal( const Signal& ); ///< undefined copy constructor, signals don't support copying.
- Signal& operator=( const Signal& ); ///< undefined assignment operator
+ Signal( const Signal& ) = delete; ///< Deleted copy constructor, signals don't support copying. @SINCE_1_0.0
+ Signal( Signal&& ) = delete; ///< Deleted move constructor, signals don't support moving. @SINCE_1_9.25
+ Signal& operator=( const Signal& ) = delete; ///< Deleted copy assignment operator @SINCE_1_0.0
+ Signal& operator=( Signal&& ) = delete; ///< Deleted move assignment operator @SINCE_1_9.25
private:
/**
* @brief A template for Signals with 2 parameters.
*
+ * @SINCE_1_0.0
*/
template < typename Arg0, typename Arg1 >
class Signal< void ( Arg0, Arg1 ) >
/**
* @brief Default constructor.
*
+ * @SINCE_1_0.0
*/
Signal()
{
/**
* @brief Non-virtual destructor.
*
+ * @SINCE_1_0.0
*/
~Signal()
{
}
/**
- * @brief Query whether there are any connected slots.
+ * @brief Queries whether there are any connected slots.
*
- * @return True if there are any slots connected to the signal.
+ * @SINCE_1_0.0
+ * @return True if there are any slots connected to the signal
*/
bool Empty() const
{
}
/**
- * @brief Query the number of slots.
+ * @brief Queries the number of slots.
*
- * @return The number of slots connected to this signal.
+ * @SINCE_1_0.0
+ * @return The number of slots connected to this signal
*/
std::size_t GetConnectionCount() const
{
return mImpl.GetConnectionCount();
}
/**
- * @brief Connect a function.
+ * @brief Connects a function.
*
- * @param[in] func The function to connect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to connect
*/
void Connect( void (*func)( Arg0 arg0, Arg1 arg1 ) )
{
}
/**
- * @brief Disconnect a function.
+ * @brief Disconnects a function.
*
- * @param[in] func The function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to disconnect
*/
void Disconnect( void (*func)( Arg0 arg0, Arg1 arg1 ) )
{
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( X* obj, void (X::*func)( Arg0 arg0, Arg1 arg1 ) )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( X* obj, void (X::*func)( Arg0 arg0, Arg1 arg1 ) )
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( SlotDelegate<X>& delegate, void (X::*func)( Arg0 arg0, Arg1 arg1 ) )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( SlotDelegate<X>& delegate, void (X::*func)( Arg0 arg0, Arg1 arg1 ) )
}
/**
- * @brief Connect a function object.
+ * @brief Connects a function object.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] func The function object to copy.
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] func The function object to copy
*/
template<class X>
void Connect( ConnectionTrackerInterface* connectionTracker, const X& func )
}
/**
- * @brief Connect a function object using FunctorDelegate.
+ * @brief Connects a function object using FunctorDelegate.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken).
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken)
*/
void Connect( ConnectionTrackerInterface* connectionTracker, FunctorDelegate* delegate )
{
}
/**
- * @brief Emit the signal.
+ * @brief Emits the signal.
*
- * @param[in] arg0 The first value to pass to callbacks.
- * @param[in] arg1 The second value to pass to callbacks.
+ * @SINCE_1_0.0
+ * @param[in] arg0 The first value to pass to callbacks
+ * @param[in] arg1 The second value to pass to callbacks
*/
void Emit( Arg0 arg0, Arg1 arg1 )
{
private:
- Signal( const Signal& ); ///< undefined copy constructor, signals don't support copying.
- Signal& operator=( const Signal& ); ///< undefined assignment operator
+ Signal( const Signal& ) = delete; ///< Deleted copy constructor, signals don't support copying. @SINCE_1_0.0
+ Signal( Signal&& ) = delete; ///< Deleted move constructor, signals don't support moving. @SINCE_1_9.25
+ Signal& operator=( const Signal& ) = delete; ///< Deleted copy assignment operator @SINCE_1_0.0
+ Signal& operator=( Signal&& ) = delete; ///< Deleted move assignment operator @SINCE_1_9.25
private:
/**
* @brief A template for Signals with 2 parameters and a return value.
+ * @SINCE_1_0.0
*/
template < typename Ret, typename Arg0, typename Arg1 >
class Signal< Ret( Arg0, Arg1 ) >
/**
* @brief Default constructor.
+ * @SINCE_1_0.0
*/
Signal()
{
/**
* @brief Non-virtual destructor.
+ * @SINCE_1_0.0
*/
~Signal()
{
}
/**
- * @brief Query whether there are any connected slots.
+ * @brief Queries whether there are any connected slots.
*
- * @return True if there are any slots connected to the signal.
+ * @SINCE_1_0.0
+ * @return True if there are any slots connected to the signal
*/
bool Empty() const
{
}
/**
- * @brief Query the number of slots.
+ * @brief Queries the number of slots.
*
- * @return The number of slots connected to this signal.
+ * @SINCE_1_0.0
+ * @return The number of slots connected to this signal
*/
std::size_t GetConnectionCount() const
{
return mImpl.GetConnectionCount();
}
/**
- * @brief Connect a function.
- * @param[in] func The function to connect.
+ * @brief Connects a function.
+ * @SINCE_1_0.0
+ * @param[in] func The function to connect
*/
void Connect( Ret (*func)( Arg0 arg0, Arg1 arg1 ) )
{
}
/**
- * @brief Disconnect a function.
+ * @brief Disconnects a function.
*
- * @param[in] func The function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to disconnect
*/
void Disconnect( Ret (*func)( Arg0 arg0, Arg1 arg1 ) )
{
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( X* obj, Ret (X::*func)( Arg0 arg0, Arg1 arg1 ) )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( X* obj, Ret (X::*func)( Arg0 arg0, Arg1 arg1 ) )
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( SlotDelegate<X>& delegate, Ret (X::*func)( Arg0 arg0, Arg1 arg1 ) )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( SlotDelegate<X>& delegate, Ret (X::*func)( Arg0 arg0, Arg1 arg1 ) )
}
/**
- * @brief Connect a function object.
+ * @brief Connects a function object.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] func The function object to copy.
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] func The function object to copy
*/
template<class X>
void Connect( ConnectionTrackerInterface* connectionTracker, const X& func )
}
/**
- * @brief Connect a function object using FunctorDelegate.
+ * @brief Connects a function object using FunctorDelegate.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken).
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken)
*/
void Connect( ConnectionTrackerInterface* connectionTracker, FunctorDelegate* delegate )
{
}
/**
- * @brief Emit the signal.
+ * @brief Emits the signal.
*
- * @param[in] arg0 The first value to pass to callbacks.
- * @param[in] arg1 The second value to pass to callbacks.
- * @return The value returned by the last callback, or a default constructed value if no callbacks are connected.
+ * @SINCE_1_0.0
+ * @param[in] arg0 The first value to pass to callbacks
+ * @param[in] arg1 The second value to pass to callbacks
+ * @return The value returned by the last callback, or a default constructed value if no callbacks are connected
*/
Ret Emit( Arg0 arg0, Arg1 arg1 )
{
private:
- Signal( const Signal& ); ///< undefined copy constructor, signals don't support copying.
- Signal& operator=( const Signal& ); ///< undefined assignment operator
+ Signal( const Signal& ) = delete; ///< Deleted copy constructor, signals don't support copying. @SINCE_1_0.0
+ Signal( Signal&& ) = delete; ///< Deleted move constructor, signals don't support moving. @SINCE_1_9.25
+ Signal& operator=( const Signal& ) = delete; ///< Deleted copy assignment operator @SINCE_1_0.0
+ Signal& operator=( Signal&& ) = delete; ///< Deleted move assignment operator @SINCE_1_9.25
private:
/**
* @brief A template for Signals with 3 parameters.
+ * @SINCE_1_0.0
*/
template < typename Arg0, typename Arg1, typename Arg2 >
class Signal< void ( Arg0, Arg1, Arg2 ) >
/**
* @brief Default constructor.
+ * @SINCE_1_0.0
*/
Signal()
{
/**
* @brief Non-virtual destructor.
+ * @SINCE_1_0.0
*/
~Signal()
{
}
/**
- * @brief Query whether there are any connected slots.
+ * @brief Queries whether there are any connected slots.
*
- * @return True if there are any slots connected to the signal.
+ * @SINCE_1_0.0
+ * @return True if there are any slots connected to the signal
*/
bool Empty() const
{
}
/**
- * @brief Query the number of slots.
+ * @brief Queries the number of slots.
*
- * @return The number of slots connected to this signal.
+ * @SINCE_1_0.0
+ * @return The number of slots connected to this signal
*/
std::size_t GetConnectionCount() const
{
return mImpl.GetConnectionCount();
}
/**
- * @brief Connect a function.
+ * @brief Connects a function.
*
- * @param[in] func The function to connect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to connect
*/
void Connect( void (*func)( Arg0 arg0, Arg1 arg1, Arg2 arg2 ) )
{
}
/**
- * @brief Disconnect a function.
+ * @brief Disconnects a function.
*
- * @param[in] func The function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to disconnect
*/
void Disconnect( void (*func)( Arg0 arg0, Arg1 arg1, Arg2 arg2 ) )
{
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( X* obj, void (X::*func)( Arg0 arg0, Arg1 arg1, Arg2 arg2 ) )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( X* obj, void (X::*func)( Arg0 arg0, Arg1 arg1, Arg2 arg2 ) )
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( SlotDelegate<X>& delegate, void (X::*func)( Arg0 arg0, Arg1 arg1, Arg2 arg2 ) )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( SlotDelegate<X>& delegate, void (X::*func)( Arg0 arg0, Arg1 arg1, Arg2 arg2 ) )
}
/**
- * @brief Connect a function object.
+ * @brief Connects a function object.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] func The function object to copy.
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] func The function object to copy
*/
template<class X>
void Connect( ConnectionTrackerInterface* connectionTracker, const X& func )
}
/**
- * @brief Connect a function object using FunctorDelegate.
+ * @brief Connects a function object using FunctorDelegate.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken).
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken)
*/
void Connect( ConnectionTrackerInterface* connectionTracker, FunctorDelegate* delegate )
{
}
/**
- * @brief Emit the signal.
+ * @brief Emits the signal.
*
- * @param[in] arg0 The first value to pass to callbacks.
- * @param[in] arg1 The second value to pass to callbacks.
- * @param[in] arg2 The third value to pass to callbacks.
+ * @SINCE_1_0.0
+ * @param[in] arg0 The first value to pass to callbacks
+ * @param[in] arg1 The second value to pass to callbacks
+ * @param[in] arg2 The third value to pass to callbacks
*/
void Emit( Arg0 arg0, Arg1 arg1, Arg2 arg2 )
{
private:
- Signal( const Signal& ); ///< undefined copy constructor, signals don't support copying.
- Signal& operator=( const Signal& ); ///< undefined assignment operator
+ Signal( const Signal& ) = delete; ///< Deleted copy constructor, signals don't support copying. @SINCE_1_0.0
+ Signal( Signal&& ) = delete; ///< Deleted move constructor, signals don't support moving. @SINCE_1_9.25
+ Signal& operator=( const Signal& ) = delete; ///< Deleted copy assignment operator @SINCE_1_0.0
+ Signal& operator=( Signal&& ) = delete; ///< Deleted move assignment operator @SINCE_1_9.25
private:
/**
* @brief A template for Signals with 2 parameters and a return value.
+ * @SINCE_1_0.0
*/
template < typename Ret, typename Arg0, typename Arg1, typename Arg2 >
class Signal< Ret( Arg0, Arg1, Arg2 ) >
/**
* @brief Default constructor.
+ * @SINCE_1_0.0
*/
Signal()
{
/**
* @brief Non-virtual destructor.
+ * @SINCE_1_0.0
*/
~Signal()
{
}
/**
- * @brief Query whether there are any connected slots.
+ * @brief Queries whether there are any connected slots.
*
- * @return True if there are any slots connected to the signal.
+ * @SINCE_1_0.0
+ * @return True if there are any slots connected to the signal
*/
bool Empty() const
{
}
/**
- * @brief Query the number of slots.
+ * @brief Queries the number of slots.
*
- * @return The number of slots connected to this signal.
+ * @SINCE_1_0.0
+ * @return The number of slots connected to this signal
*/
std::size_t GetConnectionCount() const
{
}
/**
- * @brief Connect a function.
+ * @brief Connects a function.
*
- * @param[in] func The function to connect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to connect
*/
void Connect( Ret (*func)( Arg0 arg0, Arg1 arg1, Arg2 arg2 ) )
{
}
/**
- * @brief Disconnect a function.
+ * @brief Disconnects a function.
*
- * @param[in] func The function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] func The function to disconnect
*/
void Disconnect( Ret (*func)( Arg0 arg0, Arg1 arg1, Arg2 arg2 ) )
{
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( X* obj, Ret (X::*func)( Arg0 arg0, Arg1 arg1, Arg2 arg2 ) )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] obj An object which must implement the ConnectionTrackerInterface.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] obj An object which must implement the ConnectionTrackerInterface
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( X* obj, Ret (X::*func)( Arg0 arg0, Arg1 arg1, Arg2 arg2 ) )
}
/**
- * @brief Connect a member function.
+ * @brief Connects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to connect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to connect
*/
template<class X>
void Connect( SlotDelegate<X>& delegate, Ret (X::*func)( Arg0 arg0, Arg1 arg1, Arg2 arg2 ) )
}
/**
- * @brief Disconnect a member function.
+ * @brief Disconnects a member function.
*
- * @param[in] delegate A slot delegate.
- * @param[in] func The member function to disconnect.
+ * @SINCE_1_0.0
+ * @param[in] delegate A slot delegate
+ * @param[in] func The member function to disconnect
*/
template<class X>
void Disconnect( SlotDelegate<X>& delegate, Ret (X::*func)( Arg0 arg0, Arg1 arg1, Arg2 arg2 ) )
}
/**
- * @brief Connect a function object.
+ * @brief Connects a function object.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] func The function object to copy.
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] func The function object to copy
*/
template<class X>
void Connect( ConnectionTrackerInterface* connectionTracker, const X& func )
}
/**
- * @brief Connect a function object using FunctorDelegate.
+ * @brief Connects a function object using FunctorDelegate.
*
- * @param[in] connectionTracker A connection tracker which can be used to disconnect.
- * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken).
+ * @SINCE_1_0.0
+ * @param[in] connectionTracker A connection tracker which can be used to disconnect
+ * @param[in] delegate A newly allocated FunctorDelegate (ownership is taken)
*/
void Connect( ConnectionTrackerInterface* connectionTracker, FunctorDelegate* delegate )
{
}
/**
- * @brief Emit the signal.
+ * @brief Emits the signal.
*
- * @param[in] arg0 The first value to pass to callbacks.
- * @param[in] arg1 The second value to pass to callbacks.
- * @param[in] arg2 The third value to pass to callbacks.
- * @return The value returned by the last callback, or a default constructed value if no callbacks are connected.
+ * @SINCE_1_0.0
+ * @param[in] arg0 The first value to pass to callbacks
+ * @param[in] arg1 The second value to pass to callbacks
+ * @param[in] arg2 The third value to pass to callbacks
+ * @return The value returned by the last callback, or a default constructed value if no callbacks are connected
*/
Ret Emit( Arg0 arg0, Arg1 arg1, Arg2 arg2 )
{
private:
- Signal( const Signal& ); ///< undefined copy constructor, signals don't support copying.
- Signal& operator=( const Signal& ); ///< undefined assignment operator
+ Signal( const Signal& ) = delete; ///< Deleted copy constructor, signals don't support copying. @SINCE_1_0.0
+ Signal( Signal&& ) = delete; ///< Deleted move constructor, signals don't support moving. @SINCE_1_9.25
+ Signal& operator=( const Signal& ) = delete; ///< Deleted copy assignment operator @SINCE_1_0.0
+ Signal& operator=( Signal&& ) = delete; ///< Deleted move assignment operator @SINCE_1_9.25
private:
BaseSignal mImpl; ///< Implementation
};
+/**
+ * @}
+ */
} // namespace Dali
-#endif // __DALI_SIGNAL_H__
+#endif // DALI_SIGNAL_H