OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::RawSimdUniquePtr< T, M_CATEGORY > Class Template Reference

Similar to std::unique_ptr, but: Uses a custom allocator (OGRE_MALLOC_SIMD) Pointers must be really unique (RESTRICT_ALIAS modifier is used!) To access the pointer, use get(); instead of using this container directly The purpose of this container is to enclose a raw pointer while avoiding breaking the rule of 3 when copying. More...

#include <OgreRawPtr.h>

Public Member Functions

 RawSimdUniquePtr ()
 
 RawSimdUniquePtr (size_t numElements)
 
 RawSimdUniquePtr (const RawSimdUniquePtr &copy)
 
 ~RawSimdUniquePtr ()
 
T *RESTRICT_ALIAS_RETURN get ()
 
const T *RESTRICT_ALIAS_RETURN get () const
 
void operator= (const RawSimdUniquePtr &copy)
 
size_t size () const
 
void swap (RawSimdUniquePtr &copy)
 

Private Attributes

size_t mNumElements
 
T *RESTRICT_ALIAS mPtr
 

Detailed Description

template<typename T, MemoryCategory M_CATEGORY>
class Ogre::RawSimdUniquePtr< T, M_CATEGORY >

Similar to std::unique_ptr, but: Uses a custom allocator (OGRE_MALLOC_SIMD) Pointers must be really unique (RESTRICT_ALIAS modifier is used!) To access the pointer, use get(); instead of using this container directly The purpose of this container is to enclose a raw pointer while avoiding breaking the rule of 3 when copying.

When defining the macro "OGRE_RAW_PTR_PROFILE", this container will raise an exception if the copy constructor or the assignment operator are used.

Definition at line 51 of file OgreRawPtr.h.

Constructor & Destructor Documentation

template<typename T, MemoryCategory M_CATEGORY>
Ogre::RawSimdUniquePtr< T, M_CATEGORY >::RawSimdUniquePtr ( )
inline

Definition at line 57 of file OgreRawPtr.h.

template<typename T, MemoryCategory M_CATEGORY>
Ogre::RawSimdUniquePtr< T, M_CATEGORY >::RawSimdUniquePtr ( size_t  numElements)
inline

Definition at line 59 of file OgreRawPtr.h.

template<typename T, MemoryCategory M_CATEGORY>
Ogre::RawSimdUniquePtr< T, M_CATEGORY >::RawSimdUniquePtr ( const RawSimdUniquePtr< T, M_CATEGORY > &  copy)
inline

Definition at line 66 of file OgreRawPtr.h.

template<typename T, MemoryCategory M_CATEGORY>
Ogre::RawSimdUniquePtr< T, M_CATEGORY >::~RawSimdUniquePtr ( )
inline

Definition at line 83 of file OgreRawPtr.h.

Member Function Documentation

template<typename T, MemoryCategory M_CATEGORY>
T* RESTRICT_ALIAS_RETURN Ogre::RawSimdUniquePtr< T, M_CATEGORY >::get ( void  )
inline

Definition at line 117 of file OgreRawPtr.h.

template<typename T, MemoryCategory M_CATEGORY>
const T* RESTRICT_ALIAS_RETURN Ogre::RawSimdUniquePtr< T, M_CATEGORY >::get ( void  ) const
inline

Definition at line 118 of file OgreRawPtr.h.

template<typename T, MemoryCategory M_CATEGORY>
void Ogre::RawSimdUniquePtr< T, M_CATEGORY >::operator= ( const RawSimdUniquePtr< T, M_CATEGORY > &  copy)
inline

Definition at line 95 of file OgreRawPtr.h.

template<typename T, MemoryCategory M_CATEGORY>
size_t Ogre::RawSimdUniquePtr< T, M_CATEGORY >::size ( void  ) const
inline

Definition at line 119 of file OgreRawPtr.h.

template<typename T, MemoryCategory M_CATEGORY>
void Ogre::RawSimdUniquePtr< T, M_CATEGORY >::swap ( RawSimdUniquePtr< T, M_CATEGORY > &  copy)
inline

Definition at line 89 of file OgreRawPtr.h.

Member Data Documentation


The documentation for this class was generated from the following file: