|
Support Class Library
A set of tools providing classes and utility
|
Class that handles raw storage (and manual memory management) for a variable type. More...
#include "RawStorage.h"
Public Member Functions | |
| RawStorage () | |
| ~RawStorage () | |
| RawStorage (RawStorage &&other) | |
| RawStorage & | operator= (RawStorage &&other) |
| template<class... Args> | |
| T & | constructor (Args &&... args) |
| Construct the variable in the storage. More... | |
| void | destructor () |
| Call the destructor on the allocated object. More... | |
| template<class... Args> | |
| T & | construct (Args &&... args) |
| Alias for RawStorage::constructor. More... | |
| void | destroy () |
| Alias for RawStorage::destructor. More... | |
| RawStorage & | reset () |
| Alias for RawStorage::destroy. More... | |
| T & | get () |
| Access the underlying data. More... | |
| T & | operator* () |
| Access the underlying data. More... | |
| T * | operator-> () |
| Get a pointer to the underlying data. More... | |
| const T & | get () const |
| Get the value from a constant RawStorage (e.g. More... | |
| const T & | operator* () const |
| Get the value from a constant RawStorage (e.g. More... | |
| const T *const | operator-> () const |
| Get a pointer to the value from a constant RawStorage (e.g. More... | |
| bool | hasValue () const |
| Determine whether or not the storage holds a value. More... | |
| operator bool () const | |
| Implicit conversion to bool. More... | |
Protected Types | |
| using | storage_type = scl::tools::meta ::aligned_storage_t< sizeof(T), alignof(T)> |
Protected Member Functions | |
| storage_type * | rawPtr () |
| T * | ptr () |
Protected Attributes | |
| bool | init |
| Determines whether or not the object has been constructed. More... | |
| storage_type | storage |
| The actual memory that can hold the variable. More... | |
Class that handles raw storage (and manual memory management) for a variable type.
| T | being the variable to allocate storage for |
Definition at line 14 of file RawStorage.h.
|
protected |
Definition at line 16 of file RawStorage.h.
|
inline |
Definition at line 39 of file RawStorage.h.
|
inline |
Definition at line 42 of file RawStorage.h.
|
inline |
Definition at line 46 of file RawStorage.h.
|
inline |
Alias for RawStorage::constructor.
Definition at line 89 of file RawStorage.h.
|
inline |
Construct the variable in the storage.
| Args | being the types of arguments passed to the constructor |
| args | being the arguments passed to the constructor |
Definition at line 67 of file RawStorage.h.
|
inline |
Alias for RawStorage::destructor.
Definition at line 96 of file RawStorage.h.
|
inline |
Call the destructor on the allocated object.
Definition at line 78 of file RawStorage.h.
|
inline |
Access the underlying data.
| scl::exceptions::UninitializedMemoryAccess |
Definition at line 114 of file RawStorage.h.
|
inline |
Get the value from a constant RawStorage (e.g.
w/ a constant class that uses the storage)
Definition at line 143 of file RawStorage.h.
|
inline |
Determine whether or not the storage holds a value.
Definition at line 170 of file RawStorage.h.
|
inline |
Implicit conversion to bool.
Definition at line 178 of file RawStorage.h.
|
inline |
Access the underlying data.
| scl::exceptions::UninitializedMemoryAccess |
Definition at line 126 of file RawStorage.h.
|
inline |
Get the value from a constant RawStorage (e.g.
w/ a constant class that uses the storage)
Definition at line 154 of file RawStorage.h.
|
inline |
Get a pointer to the underlying data.
| scl::exceptions::UninitializedMemoryAccess |
Definition at line 135 of file RawStorage.h.
|
inline |
Get a pointer to the value from a constant RawStorage (e.g.
w/ a constant class that uses the storage)
Definition at line 162 of file RawStorage.h.
|
inline |
Definition at line 50 of file RawStorage.h.
|
inlineprotected |
Definition at line 34 of file RawStorage.h.
|
inlineprotected |
Definition at line 30 of file RawStorage.h.
|
inline |
Alias for RawStorage::destroy.
Definition at line 104 of file RawStorage.h.
|
protected |
Determines whether or not the object has been constructed.
Definition at line 22 of file RawStorage.h.
|
protected |
The actual memory that can hold the variable.
Definition at line 28 of file RawStorage.h.
1.8.13