OGRE-Next: Ogre::RawSimdUniquePtr< T, M_CATEGORY > Class Template Reference

| OGRE-Next 3.0.0 Object-Oriented Graphics Rendering Engine

Loading...
Searching...
No Matches
Public Member Functions | List of all members
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

Referenced by RawSimdUniquePtr(), operator=(), and swap().

## ◆ RawSimdUniquePtr() [2/3]

template<typename T, MemoryCategory M_CATEGORY>

Ogre::RawSimdUniquePtr< T, M_CATEGORY >::RawSimdUniquePtr | ( | size_t | numElements | ) |
| inline

References OGRE_MALLOC_SIMD, and RESTRICT_ALIAS.

## ◆ RawSimdUniquePtr() [3/3]

template<typename T, MemoryCategory M_CATEGORY>

Ogre::RawSimdUniquePtr< T, M_CATEGORY >::RawSimdUniquePtr | ( | const RawSimdUniquePtr< T, M_CATEGORY > & | copy | ) |
| inline

References RawSimdUniquePtr().

## ◆ ~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

References RESTRICT_ALIAS_RETURN.

## ◆ get() [2/2]

template<typename T, MemoryCategory M_CATEGORY>

const T *RESTRICT_ALIAS_RETURN Ogre::RawSimdUniquePtr< T, M_CATEGORY >::get | ( |  | ) | const
| inline

References RESTRICT_ALIAS_RETURN.

## ◆ operator=()

template<typename T, MemoryCategory M_CATEGORY>

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

References RawSimdUniquePtr(), Ogre::Exception::ERR_INVALID_STATE, OGRE_EXCEPT, OGRE_FREE_SIMD, OGRE_MALLOC_SIMD, and RESTRICT_ALIAS.

## ◆ 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 RawSimdUniquePtr(), and std::swap().

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

- OgreRawPtr.h