xoreos  0.0.5
Public Member Functions | List of all members
Common::DisposableArray< T, Deallocator > Class Template Reference

A disposable array pointer, allowing array-y access and array deletion. More...

#include <disposableptr.h>

Inheritance diagram for Common::DisposableArray< T, Deallocator >:
Inheritance graph
[legend]
Collaboration diagram for Common::DisposableArray< T, Deallocator >:
Collaboration graph
[legend]

Public Member Functions

 DisposableArray (typename DisposablePtrBase< T, Deallocator >::PointerType o, bool d)
 
DisposablePtrBase< T, Deallocator >::ReferenceType operator[] (size_t i) const
 
- Public Member Functions inherited from Common::DisposablePtrBase< T, Deallocator >
 DisposablePtrBase (PointerType o, bool d)
 
XOREOS_EXPLICIT_OPERATOR_CONV operator bool () const
 Implicit conversion operator to bool for convenience, to make checks like "if (disposablePtr) ..." possible. More...
 
 ~DisposablePtrBase ()
 
void reset (PointerType o=0)
 Resets the pointer with the new value. More...
 
PointerType get () const
 Returns the plain pointer value. More...
 
void setDisposable (bool d)
 Change the disposable flag. More...
 
void dispose ()
 Unconditionally dispose of the pointer, destroying the old object. More...
 

Additional Inherited Members

- Public Types inherited from Common::DisposablePtrBase< T, Deallocator >
typedef T ValueType
 
typedef T * PointerType
 
typedef T & ReferenceType
 

Detailed Description

template<typename T, class Deallocator = DeallocatorArray>
class Common::DisposableArray< T, Deallocator >

A disposable array pointer, allowing array-y access and array deletion.

Definition at line 134 of file disposableptr.h.

Constructor & Destructor Documentation

◆ DisposableArray()

template<typename T, class Deallocator = DeallocatorArray>
Common::DisposableArray< T, Deallocator >::DisposableArray ( typename DisposablePtrBase< T, Deallocator >::PointerType  o,
bool  d 
)
inlineexplicit

Definition at line 136 of file disposableptr.h.

Member Function Documentation

◆ operator[]()

template<typename T, class Deallocator = DeallocatorArray>
DisposablePtrBase<T, Deallocator>::ReferenceType Common::DisposableArray< T, Deallocator >::operator[] ( size_t  i) const
inline

Definition at line 140 of file disposableptr.h.


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