Tizen Native API  4.0
Dali::ConnectionTrackerInterface Class Reference

Interface used to track connections between signals and slots. More...

Inheritance diagram for Dali::ConnectionTrackerInterface:
Dali::SignalObserver Dali::ConnectionTracker Dali::Toolkit::Internal::Control

Public Member Functions

 ConnectionTrackerInterface ()
 Constructor.
virtual ~ConnectionTrackerInterface ()
 Virtual destructor.
virtual void SignalConnected (SlotObserver *slotObserver, CallbackBase *callback)=0
 Called when a signal is connected.

Detailed Description

Interface used to track connections between signals and slots.

Performs automatic connection and disconnection when either the slot or signal dies.

 class MyApp : public ConnectionTracker
 {
   Button.ClickedSignal().Connect( this, &MyApp::OnPress );

   void OnPress()
   {
     std::cout << "hello world" << std::endl;
   }
 }

When MyApp is destroyed, it automatically disconnects from Button.ClickSignal. It provides a signal observer interface, to observer when signals are destroyed e.g. if Button object is destroyed while it is still connected.

Since:
2.4, DALi version 1.0.0

Constructor & Destructor Documentation

Constructor.

Since:
2.4, DALi version 1.0.0

Virtual destructor.

Since:
2.4, DALi version 1.0.0

Member Function Documentation

virtual void Dali::ConnectionTrackerInterface::SignalConnected ( SlotObserver slotObserver,
CallbackBase callback 
) [pure virtual]

Called when a signal is connected.

Since:
2.4, DALi version 1.0.0
Parameters:
[in]slotObserverThe slot observer i.e. a signal. Ownership is not passed
[in]callbackThe call back. Ownership is not passed

Implemented in Dali::Toolkit::Internal::Control, and Dali::ConnectionTracker.