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

The UniformMap class is used to map uniform names to property values. More...

#include <uniform-map.h>

Collaboration diagram for Dali::Internal::SceneGraph::UniformMap:
Collaboration graph
[legend]

Classes

class  Observer
 

Public Member Functions

 UniformMap ()
 Constructor. More...
 
 ~UniformMap ()
 Destructor. More...
 
void AddObserver (Observer &observer)
 Add an observer that watches for changes in the mappings. More...
 
void RemoveObserver (Observer &observer)
 Remove an observer. More...
 
void Add (UniformPropertyMapping *map)
 Add a map to the mappings table. More...
 
void Remove (const std::string &uniformName)
 Remove a map from the mappings table. More...
 
const PropertyInputImplFind (const std::string &uniformName)
 Find a property given the uniform name. More...
 
unsigned int Count () const
 Get the count of uniforms in the map. More...
 
const UniformPropertyMappingoperator[] (unsigned int index) const
 

Private Types

typedef OwnerContainer
< UniformPropertyMapping * > 
UniformMapContainer
 
typedef
UniformMapContainer::Iterator 
UniformMapIter
 
typedef Dali::Vector< Observer * > Observers
 
typedef Observers::Iterator ObserversIter
 

Private Member Functions

void MappingChanged ()
 Helper to call the observers when the mappings have changed. More...
 

Private Attributes

UniformMapContainer mUniformMaps
 
Observers mObservers
 

Detailed Description

The UniformMap class is used to map uniform names to property values.

It is available in all of the classes responsible for rendering: Actor, Renderer, Geometry, Material, Shader.

It can be observed for changes to the mapping table.

Definition at line 71 of file uniform-map.h.

Member Typedef Documentation

Definition at line 138 of file uniform-map.h.

Definition at line 139 of file uniform-map.h.

Definition at line 136 of file uniform-map.h.

Definition at line 137 of file uniform-map.h.

Constructor & Destructor Documentation

Dali::Internal::SceneGraph::UniformMap::UniformMap ( )

Constructor.

Definition at line 26 of file uniform-map.cpp.

Dali::Internal::SceneGraph::UniformMap::~UniformMap ( )

Destructor.

Definition at line 30 of file uniform-map.cpp.

Member Function Documentation

void Dali::Internal::SceneGraph::UniformMap::Add ( UniformPropertyMapping map)
void Dali::Internal::SceneGraph::UniformMap::AddObserver ( Observer observer)

Add an observer that watches for changes in the mappings.

Definition at line 35 of file uniform-map.cpp.

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

Referenced by Dali::Internal::SceneGraph::PropertyOwner::AddUniformMapObserver().

Here is the call graph for this function:

Here is the caller graph for this function:

unsigned int Dali::Internal::SceneGraph::UniformMap::Count ( ) const

Get the count of uniforms in the map.

Returns
The number of uniform mappings

Definition at line 153 of file uniform-map.cpp.

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

Referenced by anonymous_namespace{scene-graph-renderer.cpp}::AddMappings(), and Dali::Internal::SceneGraph::Node::PrepareRender().

Here is the call graph for this function:

Here is the caller graph for this function:

const PropertyInputImpl * Dali::Internal::SceneGraph::UniformMap::Find ( const std::string &  uniformName)

Find a property given the uniform name.

Returns
The address of the property if it's in the map, or NULL otherwise.

Definition at line 133 of file uniform-map.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::CalculateHash(), Dali::Vector< T, IsTrivialType >::End(), mUniformMaps, Dali::Internal::SceneGraph::UniformPropertyMapping::propertyPtr, Dali::Internal::SceneGraph::UniformPropertyMapping::uniformName, and Dali::Internal::SceneGraph::UniformPropertyMapping::uniformNameHash.

Here is the call graph for this function:

void Dali::Internal::SceneGraph::UniformMap::MappingChanged ( )
private

Helper to call the observers when the mappings have changed.

Definition at line 64 of file uniform-map.cpp.

References Dali::Vector< T, IsTrivialType >::Begin(), Dali::Vector< T, IsTrivialType >::End(), mObservers, and Dali::Internal::SceneGraph::UniformMap::Observer::UniformMappingsChanged().

Referenced by Add(), and Remove().

Here is the call graph for this function:

Here is the caller graph for this function:

const UniformPropertyMapping & Dali::Internal::SceneGraph::UniformMap::operator[] ( unsigned int  index) const
Precondition
index must be in the range 0 :: Count()-1
Parameters
[in]indexThe index of the element to fetch
Returns
reference to the element in the map

Definition at line 158 of file uniform-map.cpp.

References mUniformMaps.

void Dali::Internal::SceneGraph::UniformMap::Remove ( const std::string &  uniformName)
void Dali::Internal::SceneGraph::UniformMap::RemoveObserver ( Observer observer)

Remove an observer.

Definition at line 52 of file uniform-map.cpp.

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

Referenced by Dali::Internal::SceneGraph::PropertyOwner::RemoveUniformMapObserver().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Observers Dali::Internal::SceneGraph::UniformMap::mObservers
private

Definition at line 143 of file uniform-map.h.

Referenced by AddObserver(), MappingChanged(), and RemoveObserver().

UniformMapContainer Dali::Internal::SceneGraph::UniformMap::mUniformMaps
private

Definition at line 141 of file uniform-map.h.

Referenced by Add(), Count(), Find(), operator[](), and Remove().


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