#define __DALI_BASE_SIGNAL_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.
* <tr><td> %Callback 2 </td><td> Slot Observer 2 </td></tr>
* </table>
*
- * When the connection tracker is destroyed, SlotDisconnected() is called on every slot observer ( signal )
- * Signals implement the Slot Observer interface, to be told when a slot has disconnected
- * Connection tracker implements the Signal Observer interface, to be told when a signal has disconnected (died)
+ * When the connection tracker is destroyed, SlotDisconnected() is called on every slot observer ( signal ).
+ * Signals implement the Slot Observer interface, to be told when a slot has disconnected.
+ * Connection tracker implements the Signal Observer interface, to be told when a signal has disconnected (died).
*
* @SINCE_1_0.0
*/
-class DALI_IMPORT_API BaseSignal : public SlotObserver
+class DALI_CORE_API BaseSignal : public SlotObserver
{
public:
virtual ~BaseSignal();
/**
- * @brief Query whether there are any connected slots.
+ * @brief Queries whether there are any connected slots.
*
* @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.
*
* @SINCE_1_0.0
- * @return The number of slots connected to this signal.
+ * @return The number of slots connected to this signal
*/
std::size_t GetConnectionCount() const;
* @brief Used to guard against nested Emit() calls.
* @SINCE_1_0.0
*/
- struct EmitGuard
+ struct DALI_CORE_API EmitGuard
{
/**
- * @brief Create the guard.
+ * @brief Creates the guard.
*
* @SINCE_1_0.0
- * @param[in,out] flag This flag will be set to true during Emit() calls.
+ * @param[in,out] flag This flag will be set to true during Emit() calls
*/
EmitGuard( bool& flag );
~EmitGuard();
/**
- * @brief Determine if an error occured.
+ * @brief Determines if an error occurred.
*
* @SINCE_1_0.0
* @return True if an error occurred i.e. if Emit() was called during Emit()
};
/**
- * @brief Emit a signal with no parameters.
+ * @brief Emits a signal with no parameters.
*
* @SINCE_1_0.0
* @pre Cannot be called from inside the same Signal's Emit methods.
void Emit();
/**
- * @brief Emit a signal with no parameters.
+ * @brief Emits a signal with no parameters.
*
* @SINCE_1_0.0
- * @return The value returned by the last callback.
+ * @return The value returned by the last callback
* @pre Cannot be called from inside the same Signal's Emit methods.
*/
template< typename Ret >
}
/**
- * @brief Emit a signal with 1 parameter.
+ * @brief Emits a signal with 1 parameter.
*
* @SINCE_1_0.0
- * @param[in] arg0 The first parameter.
+ * @param[in] arg0 The first parameter
* @pre Cannot be called from inside the same Signal's Emit methods.
*/
template< typename Arg0 >
}
/**
- * @brief Emit a signal with 1 parameter.
+ * @brief Emits a signal with 1 parameter.
*
* @SINCE_1_0.0
- * @param[in] arg0 The first parameter.
- * @return The value returned by the last callback.
+ * @param[in] arg0 The first parameter
+ * @return The value returned by the last callback
* @pre Cannot be called from inside the same Signal's Emit methods.
*/
template< typename Ret, typename Arg0 >
}
/**
- * @brief Emit a signal with 2 parameters.
+ * @brief Emits a signal with 2 parameters.
*
* @SINCE_1_0.0
- * @param[in] arg0 The first parameter.
- * @param[in] arg1 The second parameter.
+ * @param[in] arg0 The first parameter
+ * @param[in] arg1 The second parameter
* @pre Cannot be called from inside the same Signal's Emit methods.
*/
template< typename Arg0, typename Arg1 >
}
/**
- * @brief Emit a signal with 2 parameters.
+ * @brief Emits a signal with 2 parameters.
*
* @SINCE_1_0.0
- * @param[in] arg0 The first parameter.
- * @param[in] arg1 The second parameter.
- * @return The value returned by the last callback.
+ * @param[in] arg0 The first parameter
+ * @param[in] arg1 The second parameter
+ * @return The value returned by the last callback
* @pre Cannot be called from inside the same Signal's Emit methods.
*/
template< typename Ret, typename Arg0, typename Arg1 >
}
/**
- * @brief Emit a signal with 3 parameters.
+ * @brief Emits a signal with 3 parameters.
*
* @SINCE_1_0.0
- * @param[in] arg0 The first parameter.
- * @param[in] arg1 The second parameter.
- * @param[in] arg2 The third parameter.
+ * @param[in] arg0 The first parameter
+ * @param[in] arg1 The second parameter
+ * @param[in] arg2 The third parameter
* @pre Cannot be called from inside the same Signal's Emit methods.
*/
template< typename Arg0, typename Arg1, typename Arg2 >
}
/**
- * @brief Emit a signal with 3 parameters.
+ * @brief Emits a signal with 3 parameters.
*
* @SINCE_1_0.0
- * @param[in] arg0 The first parameter.
- * @param[in] arg1 The second parameter.
- * @param[in] arg2 The third parameter.
- * @return The value returned by the last callback.
+ * @param[in] arg0 The first parameter
+ * @param[in] arg1 The second parameter
+ * @param[in] arg2 The third parameter
+ * @return The value returned by the last callback
* @pre Cannot be called from inside the same Signal's Emit methods.
*/
template< typename Ret, typename Arg0, typename Arg1, typename Arg2 >
// Connect / Disconnect function for use by Signal implementations
/**
- * @brief Called by Signal implementations, when the user calls Signal.Connect( ... )
+ * @brief Called by Signal implementations, when the user calls Signal.Connect( ... ).
*
* @SINCE_1_0.0
- * @param[in] callback A newly allocated callback object (takes ownership).
+ * @param[in] callback A newly allocated callback object (takes ownership)
*/
void OnConnect( CallbackBase* callback );
/**
- * @brief Called by Signal implementations, when the user calls Signal.Disconnect( ... )
+ * @brief Called by Signal implementations, when the user calls Signal.Disconnect( ... ).
*
* @SINCE_1_0.0
- * @param[in] callback A newly allocated callback object (takes ownership).
+ * @param[in] callback A newly allocated callback object (takes ownership)
*/
void OnDisconnect( CallbackBase* callback );
/**
- * @brief Called by Signal implementations, when the user calls Signal.Connect( ... )
+ * @brief Called by Signal implementations, when the user calls Signal.Connect( ... ).
*
* @SINCE_1_0.0
- * @param[in] tracker The connection tracker.
- * @param[in] callback A newly allocated callback object (takes ownership).
+ * @param[in] tracker The connection tracker
+ * @param[in] callback A newly allocated callback object (takes ownership)
*/
void OnConnect( ConnectionTrackerInterface* tracker, CallbackBase* callback );
/**
- * @brief Called by Signal implementations, when the user calls Signal.Disconnect( ... )
+ * @brief Called by Signal implementations, when the user calls Signal.Disconnect( ... ).
*
* @SINCE_1_0.0
- * @param[in] tracker The connection tracker.
- * @param[in] callback A newly allocated callback object (takes ownership).
+ * @param[in] tracker The connection tracker
+ * @param[in] callback A newly allocated callback object (takes ownership)
*/
void OnDisconnect( ConnectionTrackerInterface* tracker, CallbackBase* callback );
* @brief Returns a callback given an index in to the connection array.
*
* @SINCE_1_0.0
- * @param[in] connectionIndex The index of the callback.
- * @return The callback, or NULL if the connection has been deleted.
+ * @param[in] connectionIndex The index of the callback
+ * @return The callback, or NULL if the connection has been deleted
*/
CallbackBase* GetCallback( std::size_t connectionIndex ) const;
* @brief Helper to find whether a callback is connected.
*
* @SINCE_1_0.0
- * @param[in] callback The call back object.
- * @return A valid index if the callback is connected.
+ * @param[in] callback The call back object
+ * @return A valid index if the callback is connected
*/
int FindCallback( CallbackBase* callback );
* @brief Deletes a connection object from the list of connections.
*
* @SINCE_1_0.0
- * @param[in] connectionIndex The index of the callback.
+ * @param[in] connectionIndex The index of the callback
*/
void DeleteConnection( std::size_t connectionIndex );