VISH  0.2
Public Types | Protected Member Functions | Friends
MemCore::WeakPtr Class Reference

A pointer class which behaves like native C++ pointers, but knows about the lifetime of the referenced objects. More...

#include </home/werner/origo/vish/memcore/RefPtr.hpp>

List of all members.

Public Types

Protected Member Functions

Friends

Construction and Assignment

Dereferencing operations


Detailed Description

A pointer class which behaves like native C++ pointers, but knows about the lifetime of the referenced objects.

Weak pointers become magically null if the referred object is destroyed from elsewhere.

Note:
Referenced objects must be derived from the ReferenceBase class template.

Via the RefPtrTypeTrait class a weak pointer may optionally be configured to return a reference to another class than the pointer object itself. This is useful to hide some complexity for the end-user.

Examples:

Gear.cpp.


Constructor & Destructor Documentation

template<class AnyObject >
MemCore::WeakPtr::WeakPtr ( const WeakPtr< AnyObject, ObjectBase > &  Other) [inline]

Weak pointer from pointer to another class.

The other class pointer must point to the same base class, such that dynamic_cast<>'s are possible.

MemCore::WeakPtr::~WeakPtr ( ) [inline]

Default destructor, removes weak references to the object, the last one cleans up the referrer proxy object.

Calls wunref();


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