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

Templated intrusive pointer class. More...

#include <intrusive-ptr.h>

Collaboration diagram for Dali::IntrusivePtr< T >:
Collaboration graph
[legend]

Public Types

typedef void(IntrusivePtr::* BooleanType )() const
 Pointer-to-member type. More...
 

Public Member Functions

 IntrusivePtr ()
 Standard constructor to unassigned object. More...
 
 IntrusivePtr (T *p)
 Constructor to attach existing object. More...
 
template<typename U >
 IntrusivePtr (IntrusivePtr< U > const &rhs)
 Copy constructor. More...
 
 IntrusivePtr (IntrusivePtr const &rhs)
 Copy constructor. More...
 
 ~IntrusivePtr ()
 Destructor. More...
 
T * Get () const
 Get pointer to reference counted object. More...
 
T * operator-> () const
 Pointer operator override. More...
 
T & operator* () const
 Dereference operator override. More...
 
IntrusivePtroperator= (IntrusivePtr const &rhs)
 Assignment operator. More...
 
IntrusivePtroperator= (T *rhs)
 Assignment operator. More...
 
void Reset ()
 Reset intrusive pointer. More...
 
void Reset (T *rhs)
 Reset intrusive pointer with reference counted object. More...
 
 operator BooleanType () const
 Converts an object handle to a BooleanType. More...
 
T * Detach ()
 Detach pointer from intrusive ptr counting. More...
 

Private Member Functions

void ThisIsSaferThanReturningVoidStar () const
 Used by the safe bool idiom. More...
 
void Swap (IntrusivePtr &rhs)
 Internal swap function .0. More...
 

Private Attributes

T * mPtr
 pointer to RefObject More...
 

Detailed Description

template<typename T>
class Dali::IntrusivePtr< T >

Templated intrusive pointer class.

Uses the Dali:RefObject type with actual reference counting. The object is responsible for destroying itself. .0

Definition at line 39 of file intrusive-ptr.h.

Member Typedef Documentation

template<typename T>
typedef void(IntrusivePtr::* Dali::IntrusivePtr< T >::BooleanType)() const

Pointer-to-member type.

Objects can be implicitly converted to this for validity checks.

Definition at line 192 of file intrusive-ptr.h.

Constructor & Destructor Documentation

template<typename T>
Dali::IntrusivePtr< T >::IntrusivePtr ( )
inline

Standard constructor to unassigned object.

.0

Definition at line 48 of file intrusive-ptr.h.

Referenced by Dali::IntrusivePtr< ShaderData >::operator=(), and Dali::IntrusivePtr< ShaderData >::Reset().

Here is the caller graph for this function:

template<typename T>
Dali::IntrusivePtr< T >::IntrusivePtr ( T *  p)
inline

Constructor to attach existing object.

.0

Parameters
[in]pPointer to object,

Definition at line 56 of file intrusive-ptr.h.

template<typename T>
template<typename U >
Dali::IntrusivePtr< T >::IntrusivePtr ( IntrusivePtr< U > const &  rhs)
inline

Copy constructor.

.0

Parameters
[in]rhsConst reference to an IntrusivePtr
Template Parameters
UReference counter object type

Definition at line 72 of file intrusive-ptr.h.

template<typename T>
Dali::IntrusivePtr< T >::IntrusivePtr ( IntrusivePtr< T > const &  rhs)
inline

Copy constructor.

.0

Definition at line 84 of file intrusive-ptr.h.

template<typename T>
Dali::IntrusivePtr< T >::~IntrusivePtr ( )
inline

Destructor.

Object will self-destruct if reference count is zero .0

Definition at line 98 of file intrusive-ptr.h.

Member Function Documentation

template<typename T>
T* Dali::IntrusivePtr< T >::Detach ( )
inline

Detach pointer from intrusive ptr counting.

Use with care. .0

Definition at line 211 of file intrusive-ptr.h.

Referenced by Dali::UtcCoverageIntrusivePtr< T >::Check().

Here is the caller graph for this function:

template<typename T>
T* Dali::IntrusivePtr< T >::Get ( ) const
inline

Get pointer to reference counted object.

.0

Returns
Pointer to reference counted object

Definition at line 112 of file intrusive-ptr.h.

Referenced by Dali::Internal::SceneGraph::TextureCache::AddBitmap(), Dali::Internal::ResourceClient::AddBitmapImage(), Dali::Internal::ResourceClient::AddFrameBufferImage(), Dali::Internal::SceneGraph::TextureCache::AddNativeImage(), Dali::Internal::ResourceClient::AddNativeImage(), Dali::Internal::ResourceClient::AllocateTexture(), Dali::UtcCoverageIntrusivePtr< T >::Check(), Dali::Internal::NinePatchImage::Connect(), Dali::Internal::ResourceImage::Connect(), Dali::TizenPlatform::ImageLoader::ConvertStreamToBitmap(), Dali::Toolkit::Internal::RendererFactory::CreateAtlasManager(), Dali::Internal::Stage::CreateDefaultCameraActor(), Dali::Internal::anonymous_namespace{resource-image-impl.cpp}::CreateImage(), anonymous_namespace{utc-Dali-RenderTask.cpp}::CreateRenderTask(), Dali::TizenPlatform::ResourceThreadImage::Decode(), Dali::TizenPlatform::ResourceThreadImage::DecodeImageFromMemory(), Dali::Internal::ResourceClient::DecodeResource(), FillBitmap(), Dali::Actor::FindChildById(), Dali::Actor::FindChildByName(), Dali::Internal::ImageFactory::FindCompatibleResource(), Dali::Internal::ImageFactory::GetActualAttributes(), Dali::Internal::BitmapTexture::GetBitmap(), Dali::Internal::SceneGraph::TextureCache::GetBitmapTexture(), Dali::Actor::GetChildAt(), Dali::TizenPlatform::ImageLoader::GetClosestImageSize(), Dali::Toolkit::Internal::RendererFactory::GetControlRenderer(), Dali::Internal::SceneGraph::TextureCache::GetFramebuffer(), Dali::Internal::Adaptor::IndicatorBuffer::GetNativeImage(), Dali::BaseHandle::GetObjectPtr(), Dali::Toolkit::Internal::TextEditor::GetProperty(), Dali::Toolkit::Internal::TextField::GetProperty(), Dali::Actor::GetRendererAt(), Dali::Internal::Stage::GetRootLayer(), Dali::Internal::Material::GetShader(), Dali::Internal::SceneGraph::TextureCache::GetTexture(), Dali::Internal::ResourceManager::HandleAddBitmapImageRequest(), Dali::Internal::HitTestAlgorithm::anonymous_namespace{hit-test-algorithm-impl.cpp}::HitTestWithinLayer(), Dali::Internal::BitmapLoader::Load(), Dali::Internal::ShaderFactory::Load(), Dali::Internal::Program::Load(), Dali::Internal::Atlas::LoadBitmap(), Dali::TizenPlatform::ResourceThreadImage::LoadImageFromLocalFile(), Dali::TizenPlatform::ResourceBitmapRequester::LoadResource(), Dali::TizenPlatform::ImageLoader::LoadResourceSynchronously(), Dali::Internal::ResourceManager::LoadResponse(), Dali::Internal::Actor::NegotiateSize(), Dali::Sampler::New(), Dali::Internal::NativeImage::New(), Dali::Material::New(), Dali::Internal::ResourceImage::New(), Dali::Geometry::New(), Dali::Internal::EncodedBufferImage::New(), Dali::PropertyBuffer::New(), Dali::Renderer::New(), Dali::Shader::New(), Dali::Scripting::NewShaderEffect(), Dali::Internal::NinePatchImage::NinePatchImage(), Dali::operator!=(), Dali::operator==(), PerformFittingTests(), Dali::Internal::ImageFactory::Reload(), Dali::Internal::ResourceImage::Reload(), Dali::Internal::Actor::Remove(), Dali::Internal::Actor::RemoveRenderer(), Dali::Internal::ResourceClient::RequestResource(), Dali::Internal::ObjectConnector< Dali::Internal::Geometry >::Set(), Dali::Internal::ImageActor::SetFilterMode(), Dali::Toolkit::Text::SetFontStyleProperty(), Dali::Toolkit::Internal::TextField::SetProperty(), Dali::Toolkit::Internal::TextEditor::SetProperty(), Dali::Internal::ResourceImage::SetTicket(), Dali::Internal::Stage::SetViewMode(), Dali::Internal::SceneGraph::TextureCache::UpdateTexture(), UtcDaliFrameBufferImageNew02(), UtcDaliFrameBufferImageNew03(), UtcDaliImageViewSetImageBufferImageToNativeImage(), UtcDaliImageViewSetImageBufferImageWithCustomShaderToNativeImage(), UtcDaliImageViewSetImageNativeImage(), UtcDaliImageViewSetImageNativeImageToBufferImage(), UtcDaliImageViewSetImageNativeImageWithCustomShader(), UtcDaliIntrusivePtrGetN(), UtcDaliIntrusivePtrGetP(), UtcDaliIntrusivePtrIntrusivePtr(), UtcDaliIntrusivePtrIntrusivePtrIntrusivePtrP(), UtcDaliIntrusivePtrOperatorEqualLeftPointerTU(), UtcDaliIntrusivePtrOperatorEqualRightPointerTU(), UtcDaliIntrusivePtrOperatorNotEqualLeftPointerTU(), UtcDaliIntrusivePtrOperatorNotEqualRightPointerTU(), UtcDaliIntrusivePtrResetN(), UtcDaliIntrusivePtrResetP(), UtcDaliIntrusivePtrResetTN(), UtcDaliIntrusivePtrResetTP(), UtcDaliNativeImageContextLoss(), UtcDaliNativeImageCopyConstructor(), UtcDaliNativeImageCreateGlTextureP(), UtcDaliNativeImageDownCast(), UtcDaliNativeImageGetCustomFragmentPreFixP(), UtcDaliNativeImageGetCustomSamplerTypenameP(), UtcDaliNativeImageNew(), UtcDaliRenderTaskFinishInvisibleSourceActor(), UtcDaliRenderTaskSignalFinished(), and Dali::Internal::ResourceImage::~ResourceImage().

template<typename T>
Dali::IntrusivePtr< T >::operator BooleanType ( ) const
inline

Converts an object handle to a BooleanType.

This is useful for checking whether the handle is NULL. .0

Definition at line 200 of file intrusive-ptr.h.

template<typename T>
T& Dali::IntrusivePtr< T >::operator* ( ) const
inline

Dereference operator override.

.0

Returns
Reference to reference counted object

Definition at line 134 of file intrusive-ptr.h.

template<typename T>
T* Dali::IntrusivePtr< T >::operator-> ( ) const
inline

Pointer operator override.

.0

Returns
Pointer to reference counted object

Definition at line 123 of file intrusive-ptr.h.

template<typename T>
IntrusivePtr& Dali::IntrusivePtr< T >::operator= ( IntrusivePtr< T > const &  rhs)
inline

Assignment operator.

.0

Parameters
rhsConst reference to intrusive pointer
Returns
Reference to reference counted object

Definition at line 146 of file intrusive-ptr.h.

template<typename T>
IntrusivePtr& Dali::IntrusivePtr< T >::operator= ( T *  rhs)
inline

Assignment operator.

.0

Parameters
rhsPointer to object to wrap
Returns
A Reference to this object

Definition at line 159 of file intrusive-ptr.h.

template<typename T>
void Dali::IntrusivePtr< T >::Reset ( )
inline

Reset intrusive pointer.

.0

Definition at line 169 of file intrusive-ptr.h.

Referenced by Dali::UtcCoverageIntrusivePtr< T >::Check(), Dali::TizenPlatform::ImageLoader::ConvertStreamToBitmap(), Dali::TizenPlatform::TizenPlatformAbstraction::DecodeBuffer(), Dali::Internal::FrameBufferImage::Disconnect(), Dali::Internal::BufferImage::Disconnect(), Dali::Internal::ImageFactory::FindCompatibleResource(), Dali::Internal::NativeTexture::GlCleanup(), Dali::Internal::FrameBufferTexture::GlCleanup(), Dali::TizenPlatform::ImageLoader::LoadResourceSynchronously(), Dali::Internal::NinePatchImage::NinePatchImage(), Dali::Toolkit::Internal::ScrollView::OnSizeSet(), Dali::Internal::Atlas::ReleaseAtlas(), Dali::Internal::ImageActor::RemoveShaderEffect(), Dali::Toolkit::Internal::ScrollOvershootIndicator::Reset(), Dali::Toolkit::Internal::TextLabel::SetProperty(), Dali::Toolkit::Internal::TextEditor::SetProperty(), Dali::Toolkit::Internal::TextField::SetProperty(), Dali::Internal::ResourceImage::SetTicket(), Dali::Internal::Stage::SetViewMode(), Dali::Internal::Stage::Uninitialize(), UtcDaliIntrusivePtrIntrusivePtrIntrusivePtrP(), UtcDaliIntrusivePtrOperatorBooleanTypeP(), UtcDaliIntrusivePtrResetN(), UtcDaliIntrusivePtrResetP(), UtcDaliIntrusivePtrResetTN(), UtcDaliIntrusivePtrResetTP(), Dali::Internal::Image::~Image(), Dali::Internal::ResourceImage::~ResourceImage(), Dali::Internal::Stage::~Stage(), Dali::Toolkit::Internal::TextEditor::~TextEditor(), Dali::Toolkit::Internal::TextField::~TextField(), and Dali::Toolkit::Internal::TextSelectionToolbar::~TextSelectionToolbar().

Here is the caller graph for this function:

template<typename T>
void Dali::IntrusivePtr< T >::Reset ( T *  rhs)
inline

Reset intrusive pointer with reference counted object.

.0

Parameters
[in]rhsPointer to object

Definition at line 180 of file intrusive-ptr.h.

template<typename T>
void Dali::IntrusivePtr< T >::Swap ( IntrusivePtr< T > &  rhs)
inlineprivate

Internal swap function .0.

Definition at line 230 of file intrusive-ptr.h.

template<typename T>
void Dali::IntrusivePtr< T >::ThisIsSaferThanReturningVoidStar ( ) const
inlineprivate

Used by the safe bool idiom.

.0

Definition at line 224 of file intrusive-ptr.h.

Referenced by Dali::IntrusivePtr< ShaderData >::operator BooleanType().

Here is the caller graph for this function:

Member Data Documentation

template<typename T>
T* Dali::IntrusivePtr< T >::mPtr
private

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