OGRE-Next  4.0.0unstable
Object-Oriented Graphics Rendering Engine
Ogre::RawSimdUniquePtr< T, M_CATEGORY > Class Template Reference

Similar to std::unique_ptr, but: More...

#include <OgreRawPtr.h>

Public Member Functions

 RawSimdUniquePtr ()
 
 RawSimdUniquePtr (const RawSimdUniquePtr &copy)
 
 RawSimdUniquePtr (size_t numElements)
 
 ~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)
 

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.

Constructor & Destructor Documentation

◆ RawSimdUniquePtr() [1/3]

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

◆ RawSimdUniquePtr() [2/3]

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

◆ RawSimdUniquePtr() [3/3]

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

◆ ~RawSimdUniquePtr()

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

References OGRE_FREE_SIMD.

Member Function Documentation

◆ get() [1/2]

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

◆ get() [2/2]

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

◆ operator=()

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

◆ size()

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

◆ swap()

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

References std::swap().


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