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

Container to encapsulate information required for relayout. More...

#include <memory-pool-relayout-container.h>

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

Classes

struct  RelayoutInfo
 Struct to store the relayout information. More...
 

Public Member Functions

 MemoryPoolRelayoutContainer (MemoryPoolObjectAllocator< RelayoutInfo > &objectAllocator)
 Default constructor. More...
 
virtual ~MemoryPoolRelayoutContainer ()
 Virtual destructor. More...
 
virtual void Add (const Dali::Actor &actor, const Vector2 &size)
 Add relayout information to the container if it does'nt already exist. More...
 
void PopBack ()
 Remove information from the container. More...
 
void Get (size_t index, Dali::Actor &actorOut, Vector2 &sizeOut) const
 Retrieve relayout information for the given index. More...
 
size_t Size () const
 The count of information in the container. More...
 
void Reserve (size_t capacity)
 Set the capacity of the container. More...
 
void Clear ()
 Reset the container, freeing all memory. More...
 
bool Contains (const Dali::Actor &actor)
 Returns if the container contains the actor or not. More...
 
- Public Member Functions inherited from Dali::RelayoutContainer
 RelayoutContainer ()
 Default constructor. More...
 
virtual ~RelayoutContainer ()
 Virtual destructor .0. More...
 

Private Types

typedef Vector< RelayoutInfo * > RelayoutInfoContainer
 

Private Attributes

RelayoutInfoContainer mRelayoutInfos
 The list of relayout infos. More...
 
MemoryPoolObjectAllocator
< RelayoutInfo > & 
mAllocator
 The memory pool from which the infos are allocated. More...
 

Detailed Description

Container to encapsulate information required for relayout.

Uses a memory pool to manage data allocations.

Definition at line 40 of file memory-pool-relayout-container.h.

Member Typedef Documentation

Definition at line 112 of file memory-pool-relayout-container.h.

Constructor & Destructor Documentation

Dali::Internal::MemoryPoolRelayoutContainer::MemoryPoolRelayoutContainer ( MemoryPoolObjectAllocator< RelayoutInfo > &  objectAllocator)

Default constructor.

Parameters
objectAllocatorA memory pool that can allocate memory for RelayoutInfos

Definition at line 27 of file memory-pool-relayout-container.cpp.

Dali::Internal::MemoryPoolRelayoutContainer::~MemoryPoolRelayoutContainer ( )
virtual

Virtual destructor.

Definition at line 32 of file memory-pool-relayout-container.cpp.

Member Function Documentation

void Dali::Internal::MemoryPoolRelayoutContainer::Add ( const Dali::Actor actor,
const Vector2 size 
)
virtual

Add relayout information to the container if it does'nt already exist.

Parameters
actorThe actor to relayout
sizeThe size to relayout

Implements Dali::RelayoutContainer.

Definition at line 51 of file memory-pool-relayout-container.cpp.

References Dali::Internal::MemoryPoolRelayoutContainer::RelayoutInfo::actor, Contains(), mAllocator, mRelayoutInfos, Dali::Vector< T, IsTrivialType >::PushBack(), and Dali::Internal::MemoryPoolRelayoutContainer::RelayoutInfo::size.

Here is the call graph for this function:

void Dali::Internal::MemoryPoolRelayoutContainer::Clear ( )

Reset the container, freeing all memory.

Definition at line 94 of file memory-pool-relayout-container.cpp.

References Dali::Vector< T, IsTrivialType >::Clear(), mAllocator, mRelayoutInfos, and Size().

Here is the call graph for this function:

bool Dali::Internal::MemoryPoolRelayoutContainer::Contains ( const Dali::Actor actor)

Returns if the container contains the actor or not.

Parameters
actorThe actor to search for
Returns
Return if the actor was found or not

Definition at line 36 of file memory-pool-relayout-container.cpp.

References Dali::Internal::MemoryPoolRelayoutContainer::RelayoutInfo::actor, Dali::Vector< T, IsTrivialType >::Begin(), Dali::Vector< T, IsTrivialType >::End(), and mRelayoutInfos.

Referenced by Add().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::MemoryPoolRelayoutContainer::Get ( size_t  index,
Dali::Actor actorOut,
Vector2 sizeOut 
) const

Retrieve relayout information for the given index.

Parameters
indexThe index of the information to retrieve

Definition at line 75 of file memory-pool-relayout-container.cpp.

References Dali::Internal::MemoryPoolRelayoutContainer::RelayoutInfo::actor, DALI_ASSERT_DEBUG, mRelayoutInfos, Dali::Internal::MemoryPoolRelayoutContainer::RelayoutInfo::size, and Size().

Referenced by Dali::Internal::RelayoutController::Relayout().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::MemoryPoolRelayoutContainer::PopBack ( )

Remove information from the container.

Definition at line 63 of file memory-pool-relayout-container.cpp.

References Dali::Vector< T, IsTrivialType >::End(), Dali::Vector< T, IsTrivialType >::Erase(), mAllocator, mRelayoutInfos, and Dali::VectorBase::Size().

Referenced by Dali::Internal::RelayoutController::Relayout().

Here is the call graph for this function:

Here is the caller graph for this function:

void Dali::Internal::MemoryPoolRelayoutContainer::Reserve ( size_t  capacity)

Set the capacity of the container.

Parameters
capacityThe new capacity for the container

Definition at line 89 of file memory-pool-relayout-container.cpp.

References mRelayoutInfos, and Dali::Vector< T, IsTrivialType >::Reserve().

Referenced by Dali::Internal::RelayoutController::RelayoutController().

Here is the call graph for this function:

Here is the caller graph for this function:

size_t Dali::Internal::MemoryPoolRelayoutContainer::Size ( ) const

The count of information in the container.

Definition at line 84 of file memory-pool-relayout-container.cpp.

References mRelayoutInfos, and Dali::VectorBase::Size().

Referenced by Clear(), Get(), and Dali::Internal::RelayoutController::Relayout().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

MemoryPoolObjectAllocator< RelayoutInfo >& Dali::Internal::MemoryPoolRelayoutContainer::mAllocator
private

The memory pool from which the infos are allocated.

Definition at line 116 of file memory-pool-relayout-container.h.

Referenced by Add(), Clear(), and PopBack().

RelayoutInfoContainer Dali::Internal::MemoryPoolRelayoutContainer::mRelayoutInfos
private

The list of relayout infos.

Definition at line 114 of file memory-pool-relayout-container.h.

Referenced by Add(), Clear(), Contains(), Get(), PopBack(), Reserve(), and Size().


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