Dali 3D User Interface Engine
List of all members | Public Types | Public Member Functions | Private Attributes
Dali::Internal::ObjectConnector< Object > Class Template Reference

Wrapper class which helps managing intrusive pointer assignments and Connect / Disconnect. More...

#include <object-connector.h>

Inheritance diagram for Dali::Internal::ObjectConnector< Object >:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::ObjectConnector< Object >:
Collaboration graph
[legend]

Public Types

typedef IntrusivePtr< ObjectObjectPtr
 

Public Member Functions

 ObjectConnector ()
 Default constructor. More...
 
 ~ObjectConnector ()
 Destructor. More...
 
 ObjectConnector (const ObjectConnector &connector)
 Copy constructor. More...
 
ObjectConnectoroperator= (const ObjectConnector &connector)
 Assignment operator. More...
 
ObjectPtr Get () const
 Returns a smart pointer to the object. More...
 
void Set (Object &object, bool onStage)
 Assigns the object, calling Connect and Disconnect methods accordingly, taking onStage into account. More...
 
void OnStageConnect ()
 Manages connection reference count. More...
 
void OnStageDisconnect ()
 Manages connection reference count. More...
 

Private Attributes

ObjectPtr mObject
 intrusive pointer to the Object. ObjectConnector owns this. More...
 

Detailed Description

template<typename Object>
class Dali::Internal::ObjectConnector< Object >

Wrapper class which helps managing intrusive pointer assignments and Connect / Disconnect.

Should be used with objects that implement Dali::Internal::Connectable

Definition at line 36 of file object-connector.h.

Member Typedef Documentation

template<typename Object>
typedef IntrusivePtr<Object> Dali::Internal::ObjectConnector< Object >::ObjectPtr

Definition at line 39 of file object-connector.h.

Constructor & Destructor Documentation

template<typename Object>
Dali::Internal::ObjectConnector< Object >::ObjectConnector ( )
inline

Default constructor.

Definition at line 44 of file object-connector.h.

template<typename Object>
Dali::Internal::ObjectConnector< Object >::~ObjectConnector ( )
inline

Destructor.

Definition at line 49 of file object-connector.h.

template<typename Object>
Dali::Internal::ObjectConnector< Object >::ObjectConnector ( const ObjectConnector< Object > &  connector)
inline

Copy constructor.

Definition at line 54 of file object-connector.h.

Member Function Documentation

template<typename Object>
ObjectPtr Dali::Internal::ObjectConnector< Object >::Get ( ) const
inline

Returns a smart pointer to the object.

Returns
a smart pointer to the object

Definition at line 72 of file object-connector.h.

template<typename Object>
void Dali::Internal::ObjectConnector< Object >::OnStageConnect ( )
inline

Manages connection reference count.

Must be called from owner when connected to stage.

Definition at line 107 of file object-connector.h.

template<typename Object>
void Dali::Internal::ObjectConnector< Object >::OnStageDisconnect ( )
inline

Manages connection reference count.

Must be called from owner when disconnecting from stage.

Definition at line 120 of file object-connector.h.

template<typename Object>
ObjectConnector& Dali::Internal::ObjectConnector< Object >::operator= ( const ObjectConnector< Object > &  connector)
inline

Assignment operator.

Definition at line 62 of file object-connector.h.

template<typename Object>
void Dali::Internal::ObjectConnector< Object >::Set ( Object object,
bool  onStage 
)
inline

Assigns the object, calling Connect and Disconnect methods accordingly, taking onStage into account.

Parameters
[in]objectsmart pointer to a object
[in]onStagewhether the object is used on stage or not

Definition at line 82 of file object-connector.h.

Member Data Documentation

template<typename Object>
ObjectPtr Dali::Internal::ObjectConnector< Object >::mObject
private

The documentation for this class was generated from the following file:
Dali Docs Home
Read more about Dali