Dali 3D User Interface Engine
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes
Dali::Internal::PropertyNotification Class Reference

PropertyNotification is a proxy for a SceneGraph::PropertyNotification object. More...

#include <property-notification-impl.h>

Inheritance diagram for Dali::Internal::PropertyNotification:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::PropertyNotification:
Collaboration graph
[legend]

Public Types

typedef
Dali::PropertyNotification::NotifyMode 
NotifyMode
 
typedef PropertyCondition::Type ConditionType
 
typedef Dali::Vector< float > RawArgumentContainer
 RawArgumentContainer provides fast direct access to arguments for condition evaluation. More...
 

Public Member Functions

Dali::PropertyNotifySignalTypeNotifySignal ()
 Connect to this signal to be notified when the notification has occurred. More...
 
void EmitSignalNotify ()
 Emit the Notify signal. More...
 
void Enable ()
 Enables PropertyNotification. More...
 
void Disable ()
 Disables PropertyNotification. More...
 
void SetNotifyResult (bool result)
 Sets the result from the property condition test for use by applications that connect to the notification signal. More...
 
const Dali::PropertyConditionGetCondition () const
 Get the condition of this notification. More...
 
Dali::Handle GetTarget () const
 Get the target handle that this notification is observing. More...
 
Property::Index GetTargetProperty () const
 Get the target handle's property index that this notification is observing. More...
 
void SetNotifyMode (NotifyMode mode)
 Sets the Notification mode. More...
 
NotifyMode GetNotifyMode ()
 Retrieves the current Notification mode. More...
 
bool GetNotifyResult () const
 Gets the result of the last condition check that caused a signal emit, useful when using NotifyOnChanged mode and need to know what it changed to. More...
 
bool CompareSceneObject (const SceneGraph::PropertyNotification *sceneObject)
 Compare the passed sceneObject to the one created by this instance. More...
 
- Public Member Functions inherited from Dali::BaseObject
template<class T >
bool ConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, const T &functor)
 Connects a void() functor to a specified signal. More...
 
bool DoAction (const std::string &actionName, const Property::Map &attributes)
 Perform action on this object with the given action name and attributes. More...
 
const std::string & GetTypeName () const
 Returns the type name for the Handle. More...
 
bool GetTypeInfo (Dali::TypeInfo &info) const
 Returns the type info for the Handle. More...
 
bool DoConnectSignal (ConnectionTrackerInterface *connectionTracker, const std::string &signalName, FunctorDelegate *functorDelegate)
 Not intended for application developers. More...
 
- Public Member Functions inherited from Dali::RefObject
void Reference ()
 Increment the object's reference count. More...
 
void Unreference ()
 Decrement the object's reference count. More...
 
int ReferenceCount ()
 Retrieve the object's reference count. More...
 

Static Public Member Functions

static PropertyNotificationPtr New (Property &target, int componentIndex, const Dali::PropertyCondition &condition)
 Create a new PropertyNotification object. More...
 

Protected Member Functions

 PropertyNotification (SceneGraph::UpdateManager &updateManager, PropertyNotificationManager &propertyNotificationManager, Property &target, int componentIndex, const Dali::PropertyCondition &condition)
 Construct a new PropertyNotification. More...
 
void CreateSceneObject ()
 Helper to create a scene-graph PropertyNotification. More...
 
void DestroySceneObject ()
 Helper to destroy a scene-graph PropertyNotification. More...
 
virtual ~PropertyNotification ()
 A reference counted object may only be deleted by calling Unreference() More...
 
- Protected Member Functions inherited from Dali::BaseObject
 BaseObject ()
 Default constructor. More...
 
virtual ~BaseObject ()
 A reference counted object may only be deleted by calling Unreference(). More...
 
void RegisterObject ()
 Registers the object as created with the Object registry. More...
 
void UnregisterObject ()
 Unregisters the object from Object registry. More...
 
- Protected Member Functions inherited from Dali::RefObject
 RefObject ()
 Default constructor. More...
 
virtual ~RefObject ()
 RefObject is intended as a base class. More...
 
 RefObject (const RefObject &rhs)
 Copy constructor. More...
 
RefObjectoperator= (const RefObject &rhs)
 Assignment operator. More...
 

Protected Attributes

SceneGraph::UpdateManagermUpdateManager
 
const
SceneGraph::PropertyNotification
mPropertyNotification
 
Dali::PropertyNotifySignalType mNotifySignal
 

Private Member Functions

 PropertyNotification (const PropertyNotification &)
 
PropertyNotificationoperator= (const PropertyNotification &rhs)
 

Private Attributes

PropertyNotificationManagermPropertyNotificationManager
 Reference to the property notification manager. More...
 
ObjectmObject
 Target object, not owned by PropertyNotification. More...
 
Property::Index mObjectPropertyIndex
 Target object's property index of interest. More...
 
Property::Type mPropertyType
 The type of property to evaluate. More...
 
int mComponentIndex
 Index to a specific component of a complex property such as a Vector. More...
 
Dali::PropertyCondition mCondition
 The PropertyCondition handle. More...
 
RawArgumentContainer mRawConditionArgs
 The Raw Condition args. (float type) More...
 
NotifyMode mNotifyMode
 The current notification mode. More...
 
bool mNotifyResult
 The result of the last condition check that caused a signal emit. More...
 

Detailed Description

PropertyNotification is a proxy for a SceneGraph::PropertyNotification object.

The UpdateManager owns the PropertyNotification object, but the lifetime of the PropertyNotification is indirectly controlled by the PropertyNotification.

Definition at line 53 of file property-notification-impl.h.

Member Typedef Documentation

Definition at line 58 of file property-notification-impl.h.

Definition at line 57 of file property-notification-impl.h.

RawArgumentContainer provides fast direct access to arguments for condition evaluation.

Definition at line 63 of file property-notification-impl.h.

Constructor & Destructor Documentation

Dali::Internal::PropertyNotification::PropertyNotification ( SceneGraph::UpdateManager updateManager,
PropertyNotificationManager propertyNotificationManager,
Property target,
int  componentIndex,
const Dali::PropertyCondition condition 
)
protected

Construct a new PropertyNotification.

Parameters
[in]updateManagerThe UpdateManager associated with this PropertyNotification.
[in]propertyNotificationManagerThe property notification manager object.
[in]targetThe target property.
[in]componentIndexIndex to the component of a complex property such as a Vector
[in]conditionThe condition for this notification.

Definition at line 66 of file property-notification-impl.cpp.

References Dali::Internal::PropertyCondition::arguments, Dali::VectorBase::Count(), CreateSceneObject(), Dali::Property::FLOAT, Dali::GetImplementation(), Dali::Internal::Object::GetPropertyComponentIndex(), Dali::Internal::Object::GetPropertyType(), Dali::Internal::Object::GetSceneObject(), Dali::Property::INVALID_COMPONENT_INDEX, mComponentIndex, mObject, mObjectPropertyIndex, mPropertyNotificationManager, mPropertyType, mRawConditionArgs, Dali::Property::object, Dali::Internal::PropertyNotificationManager::PropertyNotificationCreated(), Dali::Vector< T, IsTrivialType >::PushBack(), Dali::Property::VECTOR2, Dali::Property::VECTOR3, and Dali::Property::VECTOR4.

Referenced by New().

Here is the call graph for this function:

Here is the caller graph for this function:

Dali::Internal::PropertyNotification::~PropertyNotification ( )
protectedvirtual

A reference counted object may only be deleted by calling Unreference()

Definition at line 125 of file property-notification-impl.cpp.

References Disable(), Dali::Internal::Stage::IsInstalled(), mPropertyNotificationManager, and Dali::Internal::PropertyNotificationManager::PropertyNotificationDestroyed().

Here is the call graph for this function:

Dali::Internal::PropertyNotification::PropertyNotification ( const PropertyNotification )
private

Member Function Documentation

bool Dali::Internal::PropertyNotification::CompareSceneObject ( const SceneGraph::PropertyNotification sceneObject)

Compare the passed sceneObject to the one created by this instance.

Parameters
[in]sceneObjectThe SceneGraph::PropertyNotification pointer to compare
Returns
true if sceneObject is the same as the one created by this instance

Definition at line 205 of file property-notification-impl.cpp.

References mPropertyNotification.

void Dali::Internal::PropertyNotification::CreateSceneObject ( )
protected
void Dali::Internal::PropertyNotification::DestroySceneObject ( )
protected

Helper to destroy a scene-graph PropertyNotification.

Definition at line 231 of file property-notification-impl.cpp.

References mPropertyNotification, mUpdateManager, and Dali::Internal::SceneGraph::RemovePropertyNotificationMessage().

Referenced by Disable().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::PropertyNotification::Disable ( )

Disables PropertyNotification.

Definition at line 154 of file property-notification-impl.cpp.

References DestroySceneObject(), and Dali::Internal::Stage::IsInstalled().

Referenced by ~PropertyNotification().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::PropertyNotification::EmitSignalNotify ( )

Emit the Notify signal.

Definition at line 142 of file property-notification-impl.cpp.

References mNotifySignal.

void Dali::Internal::PropertyNotification::Enable ( )

Enables PropertyNotification.

Definition at line 149 of file property-notification-impl.cpp.

References CreateSceneObject().

Here is the call graph for this function:

const Dali::PropertyCondition & Dali::Internal::PropertyNotification::GetCondition ( ) const

Get the condition of this notification.

.0

Returns
The condition is returned

Definition at line 169 of file property-notification-impl.cpp.

References mCondition.

PropertyNotification::NotifyMode Dali::Internal::PropertyNotification::GetNotifyMode ( )

Retrieves the current Notification mode.

.0

Returns
Notification mode.

Definition at line 195 of file property-notification-impl.cpp.

References mNotifyMode.

bool Dali::Internal::PropertyNotification::GetNotifyResult ( ) const

Gets the result of the last condition check that caused a signal emit, useful when using NotifyOnChanged mode and need to know what it changed to.

.0

Returns
whether condition result that triggered last emit was true or false

Definition at line 200 of file property-notification-impl.cpp.

References mNotifyResult.

Dali::Handle Dali::Internal::PropertyNotification::GetTarget ( ) const

Get the target handle that this notification is observing.

.0

Definition at line 174 of file property-notification-impl.cpp.

References mObject.

Property::Index Dali::Internal::PropertyNotification::GetTargetProperty ( ) const

Get the target handle's property index that this notification is observing.

.0

Returns
The target property.

Definition at line 181 of file property-notification-impl.cpp.

References mObjectPropertyIndex.

PropertyNotificationPtr Dali::Internal::PropertyNotification::New ( Property target,
int  componentIndex,
const Dali::PropertyCondition condition 
)
static

Create a new PropertyNotification object.

Parameters
[in]targetThe target object to inspect
[in]componentIndexIndex to the component of a complex property such as a Vector
[in]conditionThe condition for this notification.
Returns
A smart-pointer to the newly allocated PropertyNotification.

Definition at line 41 of file property-notification-impl.cpp.

References Dali::Internal::ThreadLocalStorage::Get(), Dali::Internal::Stage::GetCurrent(), Dali::Internal::Stage::GetPropertyNotificationManager(), Dali::Internal::ThreadLocalStorage::GetUpdateManager(), and PropertyNotification().

Referenced by Dali::Internal::Object::AddPropertyNotification().

Here is the call graph for this function:

Here is the caller graph for this function:

Dali::PropertyNotifySignalType & Dali::Internal::PropertyNotification::NotifySignal ( )

Connect to this signal to be notified when the notification has occurred.

.0

Returns
A signal object to Connect() with.

Definition at line 137 of file property-notification-impl.cpp.

References mNotifySignal.

PropertyNotification& Dali::Internal::PropertyNotification::operator= ( const PropertyNotification rhs)
private
void Dali::Internal::PropertyNotification::SetNotifyMode ( NotifyMode  mode)

Sets the Notification mode.

This determines how the property notification should respond to the result of a condition.

.0

Parameters
[in]modeNotification mode (Default is PropertyNotification::NotifyOnTrue)

Definition at line 186 of file property-notification-impl.cpp.

References mNotifyMode, mPropertyNotification, mUpdateManager, and Dali::Internal::SceneGraph::PropertyNotificationSetNotifyModeMessage().

Here is the call graph for this function:

void Dali::Internal::PropertyNotification::SetNotifyResult ( bool  result)

Sets the result from the property condition test for use by applications that connect to the notification signal.

Parameters
[in]resultThe result of the property condition test

Definition at line 164 of file property-notification-impl.cpp.

References mNotifyResult.

Member Data Documentation

int Dali::Internal::PropertyNotification::mComponentIndex
private

Index to a specific component of a complex property such as a Vector.

Definition at line 194 of file property-notification-impl.h.

Referenced by CreateSceneObject(), and PropertyNotification().

Dali::PropertyCondition Dali::Internal::PropertyNotification::mCondition
private

The PropertyCondition handle.

Definition at line 195 of file property-notification-impl.h.

Referenced by CreateSceneObject(), and GetCondition().

NotifyMode Dali::Internal::PropertyNotification::mNotifyMode
private

The current notification mode.

Definition at line 197 of file property-notification-impl.h.

Referenced by CreateSceneObject(), GetNotifyMode(), and SetNotifyMode().

bool Dali::Internal::PropertyNotification::mNotifyResult
private

The result of the last condition check that caused a signal emit.

Definition at line 198 of file property-notification-impl.h.

Referenced by GetNotifyResult(), and SetNotifyResult().

Dali::PropertyNotifySignalType Dali::Internal::PropertyNotification::mNotifySignal
protected

Definition at line 186 of file property-notification-impl.h.

Referenced by EmitSignalNotify(), and NotifySignal().

Object* Dali::Internal::PropertyNotification::mObject
private

Target object, not owned by PropertyNotification.

Definition at line 191 of file property-notification-impl.h.

Referenced by CreateSceneObject(), GetTarget(), and PropertyNotification().

Property::Index Dali::Internal::PropertyNotification::mObjectPropertyIndex
private

Target object's property index of interest.

Definition at line 192 of file property-notification-impl.h.

Referenced by CreateSceneObject(), GetTargetProperty(), and PropertyNotification().

const SceneGraph::PropertyNotification* Dali::Internal::PropertyNotification::mPropertyNotification
protected
PropertyNotificationManager& Dali::Internal::PropertyNotification::mPropertyNotificationManager
private

Reference to the property notification manager.

Definition at line 190 of file property-notification-impl.h.

Referenced by PropertyNotification(), and ~PropertyNotification().

Property::Type Dali::Internal::PropertyNotification::mPropertyType
private

The type of property to evaluate.

Definition at line 193 of file property-notification-impl.h.

Referenced by CreateSceneObject(), and PropertyNotification().

RawArgumentContainer Dali::Internal::PropertyNotification::mRawConditionArgs
private

The Raw Condition args. (float type)

Definition at line 196 of file property-notification-impl.h.

Referenced by CreateSceneObject(), and PropertyNotification().

SceneGraph::UpdateManager& Dali::Internal::PropertyNotification::mUpdateManager
protected

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