![]() |
Zen
A cross-platform functional programming language
|
Auto pointer type. More...
#include <zbl.hpp>
Public Member Functions | |
| scopedptr () | |
| Default constructor. | |
| scopedptr (T *t) | |
| Constructor. | |
| T & | operator* () const |
| Return reference to pointed value. | |
| T * | operator-> () const |
| Return pointer to pointed value. | |
| T * | data () const |
| Return pointer to pointed value. | |
| bool | isNull () const |
| Check if valid pointer is assigned. | |
| T * | take () |
| Return pointer to pointed value, and set value to 0. | |
| void | reset (T *t) |
| Assign pointer and return pointer to old value. | |
Private Attributes | |
| QScopedPointer< T > | _ptr |
| The pointer. | |
Auto pointer type.
| scopedptr | ( | T * | t | ) | [inline, explicit] |
Constructor.
| t | Initial value |
| T* data | ( | ) | const [inline] |
Return pointer to pointed value.
| bool isNull | ( | ) | const [inline] |
Check if valid pointer is assigned.
| T& operator* | ( | ) | const [inline] |
Return reference to pointed value.
| T* operator-> | ( | ) | const [inline] |
Return pointer to pointed value.
| void reset | ( | T * | t | ) | [inline] |
Assign pointer and return pointer to old value.
| t | The new pointer to accept |
| T* take | ( | ) | [inline] |
Return pointer to pointed value, and set value to 0.