template<typename ALLOCATOR, typename HANDLER = StrongRefHandler>
class maxon::AllocatorRef< ALLOCATOR, HANDLER >
An AllocatorRef extends a BaseRef by forwarding all allocator calls (Alloc, Free, ...) to the referenced object. This can be used if a single allocator shall be shared by multiple objects such as arrays or maps, for example AllocatorRef<BlockArrayAllocator<123>> which is a BlockArrayAllocator held by a strong reference.
AllocatorRef inherits from BaseRef, so all of BaseRef's functions are available in addition to the allocator functions.
- Template Parameters
-
| ALLOCATOR | Type of the referenced allocator. |
| HANDLER | Reference handler class for BaseRef, StrongRefHandler by default. This implements the specific behaviour whenever the reference is changed to point to another allocator, see BaseRef. |
- See also
- BaseRef
|
| MAXON_ATTRIBUTE_FORCE_INLINE void * | Alloc (Int s, MAXON_SOURCE_LOCATION_DECLARATION) const |
| |
| MAXON_ATTRIBUTE_FORCE_INLINE void * | AllocClear (Int s, MAXON_SOURCE_LOCATION_DECLARATION) const |
| |
| MAXON_ATTRIBUTE_FORCE_INLINE void * | Realloc (void *p, Int s, MAXON_SOURCE_LOCATION_DECLARATION) const |
| |
| MAXON_ATTRIBUTE_FORCE_INLINE Int | ComputeArraySize (Int currentSize, Int increment, Int minChunkSize) const |
| |
| MAXON_ATTRIBUTE_FORCE_INLINE Bool | IsCompatibleWithDefaultAllocator (void *p) const |
| |
| template<typename T > |
| MAXON_ATTRIBUTE_FORCE_INLINE void | Free (T *&p) const |
| |
| | BaseRef () |
| |
| MAXON_IMPLICIT | BaseRef (std::nullptr_t)=delete |
| |
| MAXON_IMPLICIT | BaseRef (ALLOCATOR *o) |
| |
| | BaseRef (ForwardResultPtr< PTR > o) |
| |
| | BaseRef (ResultPtr< ALLOCATOR > o, Int) |
| |
| | BaseRef (const BaseRef &src) |
| |
| MAXON_IMPLICIT | BaseRef (const REF &src) |
| |
| MAXON_IMPLICIT | BaseRef (REF &src) |
| |
| | BaseRef (BaseRef &&src) |
| |
| MAXON_IMPLICIT | BaseRef (REF &&src) |
| |
| ALLOCATOR * | GetPointer () |
| |
| ConstReferencedType * | GetPointer () const |
| |
| ALLOCATOR * | operator-> () |
| |
| ConstReferencedType * | operator-> () const |
| |
| std::conditional< std::is_void< ALLOCATOR >::value, DeleteReturnType01, ALLOCATOR >::type & | operator* () |
| |
| std::conditional< std::is_void< ConstReferencedType >::value, DeleteReturnType01, ALLOCATOR >::type & | operator* () const |
| |
| | operator ALLOCATOR * () |
| |
| | operator ConstReferencedType * () const |
| |
| | operator Bool () const |
| |
| | operator Bool () |
| |
| const std::conditional< std::is_void< ALLOCATOR >::value, DeleteReturnType01, ALLOCATOR >::type & | operator[] (Int) const=delete |
| |
| ResultRef< typename std::remove_const< ALLOCATOR >::type > | MakeWritable (Bool resetOnError=true) |
| |
| ResultRef< typename std::remove_const< ALLOCATOR >::type > | MakeWritableDontCopy () |
| |
| Bool | HasMultipleReferences () const |
| |
| std::conditional< std::is_void< ALLOCATOR >::value, DeleteReturnType01, ALLOCATOR >::type & | GetOrDefault () const |
| |
| BaseRef & | operator= (ALLOCATOR *src) |
| |
| BaseRef & | operator= (std::nullptr_t src) |
| |
| BaseRef & | operator= (const BaseRef &src) |
| |
| BaseRef & | operator= (const REF &src) |
| |
| BaseRef & | operator= (REF &src) |
| |
| BaseRef & | operator= (BaseRef &&src) |
| |
| BaseRef & | operator= (REF &&src) |
| |
| | ~BaseRef () |
| |
| Bool | operator== (const BaseRef &b) const |
| |
| Bool | operator== (const ALLOCATOR *b) const |
| |
| Bool | operator== (typename std::remove_const< ALLOCATOR >::type *b) const |
| |
| Bool | operator== (std::nullptr_t) const |
| |
| Bool | operator!= (const BaseRef &b) const |
| |
| Bool | operator!= (const ALLOCATOR *b) const |
| |
| Bool | operator!= (typename std::remove_const< ALLOCATOR >::type *b) const |
| |
| Bool | operator!= (std::nullptr_t) const |
| |
| Bool | operator< (const BaseRef &b) const |
| |
| | MAXON_OPERATOR_INEQUALITY (BaseRef) |
| |
| HashInt | GetHashCode () const |
| |
| UniqueHash | GetUniqueHashCode () const |
| |
| std::conditional< Bool(HANDLER::KIND &VALUEKIND::COW_MASK), typename std::remove_const< ALLOCATOR >::type, ALLOCATOR >::type * | Disconnect () |
| |
| void | PrivateSetTarget (ALLOCATOR *newPtr) |
| |
| void | PrivateSetPointer (ALLOCATOR *ptr) |
| |