Zen
A cross-platform functional programming language

scopedptr< T > Class Template Reference

Auto pointer type. More...

#include <zbl.hpp>

List of all members.

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.

Detailed Description

template<typename T>
class z::scopedptr< T >

Auto pointer type.


Constructor & Destructor Documentation

scopedptr ( T *  t) [inline, explicit]

Constructor.

Parameters:
tInitial value

Member Function Documentation

T* data ( ) const [inline]

Return pointer to pointed value.

Returns:
Pointer to pointed value
bool isNull ( ) const [inline]

Check if valid pointer is assigned.

Returns:
True if valid pointer is assigned
T& operator* ( ) const [inline]

Return reference to pointed value.

Returns:
Reference to pointed value
T* operator-> ( ) const [inline]

Return pointer to pointed value.

Returns:
Pointer to pointed value
void reset ( T *  t) [inline]

Assign pointer and return pointer to old value.

Parameters:
tThe new pointer to accept
Returns:
Pointer to old value
T* take ( ) [inline]

Return pointer to pointed value, and set value to 0.

Returns:
Pointer to pointed value

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines