|
Core Library
|
An array smart-pointer for use within a limited scope. More...
#include <ArrayPtr.hpp>
Public Member Functions | |
| ArrayPtr () | |
| Default constructor. | |
| ArrayPtr (T *pPointer) | |
| Construction from a raw pointer. | |
| ~ArrayPtr () | |
| Destructor. | |
| T & | operator[] (size_t nIndex) |
| Index operator. | |
| const T & | operator[] (size_t nIndex) const |
| Index operator. | |
| void | reset (T *pPointer=nullptr) |
| Change pointer ownership. | |
| T * | detach () |
| Take ownership of the pointer. | |
Private Member Functions | |
| T ** | getPtrMember () |
| Access the underlying pointer member. | |
Friends | |
| T ** | attachTo (ArrayPtr< T > &ptr) |
| Allow attachment via an output parameter. | |
An array smart-pointer for use within a limited scope.
| Core::ArrayPtr< T >::ArrayPtr | ( | ) | [inline] |
Default constructor.
| Core::ArrayPtr< T >::ArrayPtr | ( | T * | pPointer | ) | [inline, explicit] |
Construction from a raw pointer.
Takes ownership of a new pointer.
| Core::ArrayPtr< T >::~ArrayPtr | ( | ) | [inline] |
Destructor.
| T & Core::ArrayPtr< T >::operator[] | ( | size_t | nIndex | ) | [inline] |
Index operator.
| const T & Core::ArrayPtr< T >::operator[] | ( | size_t | nIndex | ) | const [inline] |
Index operator.
| void Core::ArrayPtr< T >::reset | ( | T * | pPointer = nullptr | ) | [inline] |
Change pointer ownership.
Frees the current pointer and takes ownership of another pointer, if provided.
| T * Core::ArrayPtr< T >::detach | ( | ) | [inline] |
Take ownership of the pointer.
| T ** Core::ArrayPtr< T >::getPtrMember | ( | ) | [inline, private] |
Access the underlying pointer member.
This is used by the attachTo() friend function to access the underlying SmartPtr<T> member variable.
Allow attachment via an output parameter.
e.g. LoadTypeLib(..., attachTo(p)).
1.7.6.1