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

An update-thread object which own properties. More...

#include <property-owner.h>

Inheritance diagram for Dali::Internal::SceneGraph::PropertyOwner:
Inheritance graph
[legend]
Collaboration diagram for Dali::Internal::SceneGraph::PropertyOwner:
Collaboration graph
[legend]

Classes

class  Observer
 

Public Member Functions

virtual ~PropertyOwner ()
 Virtual destructor; this is intended as a base class. More...
 
void AddObserver (Observer &observer)
 Add an observer. More...
 
void RemoveObserver (Observer &observer)
 Remove an observer. More...
 
bool IsObserved ()
 This method can be used to determine if there is an animation or constraint that is using this property owner. More...
 
void Destroy ()
 Called just before destruction to disconnect all observers and remove constraints. More...
 
void ConnectToSceneGraph ()
 Notify all observers that the object has been connected This occurs when the object is connected to the scene-graph during UpdateManager::Update(). More...
 
void DisconnectFromSceneGraph (BufferIndex updateBufferIndex)
 Notify all observers that the object has been disconnected and remove constraints. More...
 
void InstallCustomProperty (PropertyBase *property)
 Install a custom property. More...
 
OwnedPropertyContainerGetCustomProperties ()
 Retrieve the custom properties owned by the object. More...
 
const OwnedPropertyContainerGetCustomProperties () const
 Retrieve the custom properties owned by the object. More...
 
void ResetToBaseValues (BufferIndex updateBufferIndex)
 Reset animatable properties to the corresponding base values. More...
 
void ApplyConstraint (ConstraintBase *constraint)
 Apply a constraint. More...
 
void RemoveConstraint (ConstraintBase *constraint)
 Begin removal of constraints. More...
 
ConstraintOwnerContainerGetConstraints ()
 Retrieve the constraints that are currently applied. More...
 
virtual void AddUniformMapping (UniformPropertyMapping *map)
 Add a map to the mappings table. More...
 
virtual void RemoveUniformMapping (const std::string &uniformName)
 Remove a map from the mappings table. More...
 
const UniformMapGetUniformMap () const
 Get the mappings table. More...
 
void AddUniformMapObserver (UniformMap::Observer &observer)
  More...
 
void RemoveUniformMapObserver (UniformMap::Observer &observer)
  More...
 

Static Public Member Functions

static PropertyOwnerNew ()
 Create a property owner. More...
 

Protected Member Functions

 PropertyOwner ()
 Protected constructor. More...
 

Protected Attributes

OwnedPropertyContainer mCustomProperties
 Properties provided with InstallCustomProperty() More...
 
UniformMap mUniformMaps
 Container of owned uniform maps. More...
 

Private Types

typedef Dali::Vector
< PropertyOwner::Observer * > 
ObserverContainer
 
typedef ObserverContainer::Iterator ObserverIter
 
typedef
ObserverContainer::ConstIterator 
ConstObserverIter
 

Private Member Functions

 PropertyOwner (const PropertyOwner &)
 
PropertyOwneroperator= (const PropertyOwner &rhs)
 
virtual void ResetDefaultProperties (BufferIndex updateBufferIndex)
 Called after ResetToBaseValues; derived classes should reset any default properties. More...
 

Private Attributes

ObserverContainer mObservers
 Container of observer raw-pointers (not owned) More...
 
ConstraintOwnerContainer mConstraints
 Container of owned constraints. More...
 

Detailed Description

An update-thread object which own properties.

This allows observers to track the lifetime of the object & its properties.

Definition at line 51 of file property-owner.h.

Member Typedef Documentation

Definition at line 240 of file property-owner.h.

Definition at line 238 of file property-owner.h.

Definition at line 239 of file property-owner.h.

Constructor & Destructor Documentation

Dali::Internal::SceneGraph::PropertyOwner::~PropertyOwner ( )
virtual

Virtual destructor; this is intended as a base class.

Definition at line 42 of file property-owner.cpp.

References Destroy().

Here is the call graph for this function:

Dali::Internal::SceneGraph::PropertyOwner::PropertyOwner ( )
protected

Protected constructor.

Definition at line 160 of file property-owner.cpp.

Referenced by New().

Here is the caller graph for this function:

Dali::Internal::SceneGraph::PropertyOwner::PropertyOwner ( const PropertyOwner )
private

Member Function Documentation

void Dali::Internal::SceneGraph::PropertyOwner::AddObserver ( Observer observer)

Add an observer.

The observer is responsible for calling RemoveObserver(*this) during its own destruction. Connecting an actor-side object as an observer is not allowed, due to thread-safety issues.

Parameters
[in]observerThe observer.

Definition at line 47 of file property-owner.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), DALI_ASSERT_DEBUG, Dali::Vector< T, IsTrivialType >::End(), mObservers, and Dali::Vector< T, IsTrivialType >::PushBack().

Referenced by Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::ConnectToSceneGraph().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::PropertyOwner::AddUniformMapObserver ( UniformMap::Observer observer)
void Dali::Internal::SceneGraph::PropertyOwner::AddUniformMapping ( UniformPropertyMapping map)
virtual

Add a map to the mappings table.

Reimplemented in Dali::Internal::SceneGraph::Node.

Definition at line 164 of file property-owner.cpp.

References Dali::Internal::SceneGraph::UniformMap::Add(), and mUniformMaps.

Referenced by Dali::Internal::SceneGraph::AddUniformMapMessage(), and Dali::Internal::SceneGraph::Node::AddUniformMapping().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::PropertyOwner::ApplyConstraint ( ConstraintBase constraint)

Apply a constraint.

Parameters
[in]constraintThe constraint to apply.

Definition at line 138 of file property-owner.cpp.

References mConstraints, Dali::Internal::SceneGraph::ConstraintBase::OnConnect(), and Dali::Vector< T, IsTrivialType >::PushBack().

Referenced by Dali::Internal::SceneGraph::ApplyConstraintMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::PropertyOwner::ConnectToSceneGraph ( )

Notify all observers that the object has been connected This occurs when the object is connected to the scene-graph during UpdateManager::Update().

Definition at line 90 of file property-owner.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Vector< T, IsTrivialType >::End(), and mObservers.

Referenced by Dali::Internal::SceneGraph::Node::ConnectChild().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::PropertyOwner::Destroy ( )

Called just before destruction to disconnect all observers and remove constraints.

This occurs when the object is in the process of being destroyed.

Definition at line 75 of file property-owner.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::OwnerContainer< T >::Clear(), Dali::Vector< T, IsTrivialType >::Clear(), Dali::Vector< T, IsTrivialType >::End(), mConstraints, and mObservers.

Referenced by Dali::Internal::SceneGraph::Node::OnDestroy(), and ~PropertyOwner().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::PropertyOwner::DisconnectFromSceneGraph ( BufferIndex  updateBufferIndex)

Notify all observers that the object has been disconnected and remove constraints.

This occurs when the object is disconnected from the scene-graph during UpdateManager::Update().

Parameters
[in]currentBufferIndexThe current update buffer.

Definition at line 100 of file property-owner.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::OwnerContainer< T >::Clear(), Dali::Vector< T, IsTrivialType >::End(), mConstraints, and mObservers.

Referenced by Dali::Internal::SceneGraph::Node::RecursiveDisconnectFromSceneGraph().

Here is the call graph for this function:

Here is the caller graph for this function:

ConstraintOwnerContainer & Dali::Internal::SceneGraph::PropertyOwner::GetConstraints ( )

Retrieve the constraints that are currently applied.

Returns
A container of constraints.

Definition at line 133 of file property-owner.cpp.

References mConstraints.

Referenced by Dali::Internal::SceneGraph::ConstrainPropertyOwner().

Here is the caller graph for this function:

OwnedPropertyContainer& Dali::Internal::SceneGraph::PropertyOwner::GetCustomProperties ( )
inline

Retrieve the custom properties owned by the object.

Returns
A container of properties.

Definition at line 143 of file property-owner.h.

References mCustomProperties.

const OwnedPropertyContainer& Dali::Internal::SceneGraph::PropertyOwner::GetCustomProperties ( ) const
inline

Retrieve the custom properties owned by the object.

Returns
A container of properties.

Definition at line 152 of file property-owner.h.

References mCustomProperties.

const UniformMap & Dali::Internal::SceneGraph::PropertyOwner::GetUniformMap ( ) const

Get the mappings table.

Definition at line 174 of file property-owner.cpp.

References mUniformMaps.

Referenced by Dali::Internal::SceneGraph::Renderer::PrepareRender().

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::PropertyOwner::InstallCustomProperty ( PropertyBase property)

Install a custom property.

Postcondition
The PropertyOwner takes ownership of the property.
Parameters
[in]propertyA pointer to a newly allocated property.

Definition at line 113 of file property-owner.cpp.

References DALI_ASSERT_DEBUG, mCustomProperties, and Dali::Vector< T, IsTrivialType >::PushBack().

Referenced by Dali::Internal::SceneGraph::InstallCustomPropertyMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

bool Dali::Internal::SceneGraph::PropertyOwner::IsObserved ( )

This method can be used to determine if there is an animation or constraint that is using this property owner.

Returns
true if there are observers.

Definition at line 70 of file property-owner.cpp.

References Dali::VectorBase::Count(), and mObservers.

Referenced by Dali::Internal::SceneGraph::UpdateNodesAndAttachments().

Here is the call graph for this function:

Here is the caller graph for this function:

PropertyOwner * Dali::Internal::SceneGraph::PropertyOwner::New ( )
static

Create a property owner.

Returns
A newly allocated object.

Definition at line 37 of file property-owner.cpp.

References PropertyOwner().

Here is the call graph for this function:

PropertyOwner& Dali::Internal::SceneGraph::PropertyOwner::operator= ( const PropertyOwner rhs)
private
void Dali::Internal::SceneGraph::PropertyOwner::RemoveConstraint ( ConstraintBase constraint)

Begin removal of constraints.

Parameters
[in]constraintThe constraint to remove.

Definition at line 145 of file property-owner.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Vector< T, IsTrivialType >::End(), Dali::OwnerContainer< T >::Erase(), and mConstraints.

Referenced by Dali::Internal::SceneGraph::RemoveConstraintMessage().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::PropertyOwner::RemoveObserver ( Observer observer)

Remove an observer.

Parameters
[in]observerThe observer.

Definition at line 55 of file property-owner.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Vector< T, IsTrivialType >::End(), Dali::Vector< T, IsTrivialType >::Erase(), and mObservers.

Referenced by Dali::Internal::SceneGraph::Animator< PropertyType, PropertyAccessorType >::~Animator().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::PropertyOwner::RemoveUniformMapObserver ( UniformMap::Observer observer)

Definition at line 184 of file property-owner.cpp.

References mUniformMaps, and Dali::Internal::SceneGraph::UniformMap::RemoveObserver().

Here is the call graph for this function:

void Dali::Internal::SceneGraph::PropertyOwner::RemoveUniformMapping ( const std::string &  uniformName)
virtual

Remove a map from the mappings table.

Reimplemented in Dali::Internal::SceneGraph::Node.

Definition at line 169 of file property-owner.cpp.

References mUniformMaps, and Dali::Internal::SceneGraph::UniformMap::Remove().

Referenced by Dali::Internal::SceneGraph::RemoveUniformMapMessage(), and Dali::Internal::SceneGraph::Node::RemoveUniformMapping().

Here is the call graph for this function:

Here is the caller graph for this function:

virtual void Dali::Internal::SceneGraph::PropertyOwner::ResetDefaultProperties ( BufferIndex  updateBufferIndex)
inlineprivatevirtual

Called after ResetToBaseValues; derived classes should reset any default properties.

Parameters
[in]currentBufferIndexThe buffer to reset.

Reimplemented in Dali::Internal::SceneGraph::Node, Dali::Internal::SceneGraph::RenderTask, Dali::Internal::SceneGraph::PanGesture, Dali::Internal::SceneGraph::Renderer, and Dali::Internal::SceneGraph::Shader.

Definition at line 229 of file property-owner.h.

Referenced by ResetToBaseValues().

Here is the caller graph for this function:

void Dali::Internal::SceneGraph::PropertyOwner::ResetToBaseValues ( BufferIndex  updateBufferIndex)

Reset animatable properties to the corresponding base values.

Parameters
[in]currentBufferIndexThe buffer to reset.
Postcondition
The ResetDefaultProperties method is called, during which derived classes can reset default properties.

Definition at line 120 of file property-owner.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Vector< T, IsTrivialType >::End(), mCustomProperties, and ResetDefaultProperties().

Referenced by Dali::Internal::SceneGraph::UpdateManager::ProcessGestures(), and Dali::Internal::SceneGraph::UpdateManager::ResetProperties().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

ConstraintOwnerContainer Dali::Internal::SceneGraph::PropertyOwner::mConstraints
private

Container of owned constraints.

Definition at line 244 of file property-owner.h.

Referenced by ApplyConstraint(), Destroy(), DisconnectFromSceneGraph(), GetConstraints(), and RemoveConstraint().

OwnedPropertyContainer Dali::Internal::SceneGraph::PropertyOwner::mCustomProperties
protected

Properties provided with InstallCustomProperty()

Definition at line 233 of file property-owner.h.

Referenced by GetCustomProperties(), InstallCustomProperty(), and ResetToBaseValues().

ObserverContainer Dali::Internal::SceneGraph::PropertyOwner::mObservers
private

Container of observer raw-pointers (not owned)

Definition at line 242 of file property-owner.h.

Referenced by AddObserver(), ConnectToSceneGraph(), Destroy(), DisconnectFromSceneGraph(), IsObserved(), and RemoveObserver().

UniformMap Dali::Internal::SceneGraph::PropertyOwner::mUniformMaps
protected

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