#include <support/Atom.h>
You should always use this class when working with weak SAtom pointers, because it restricts what you can do with the referenced objects to only those things that are safe. For example, you can't call any methods on the object; to call a method, you must first call promote() to get a valid sptr<> from which you can then call the method.
Public Member Functions | |
void | dec_weak (const void *id) const |
Explicitly decrement reference count of this atom. | |
SAtom::weak_atom_ptr * | get_weak_atom_ptr () const |
Retrieve the internal weak pointer object. | |
void | inc_weak (const void *id) const |
Explicitly increment reference count of this atom. | |
template<class NEWTYPE> | |
wptr< TYPE > & | operator= (const wptr< NEWTYPE > &p) |
Assigment from another weak pointer. | |
template<class NEWTYPE> | |
wptr< TYPE > & | operator= (const sptr< NEWTYPE > &p) |
Assignment from a strong pointer. | |
wptr< TYPE > & | operator= (const sptr< TYPE > &p) |
Assignment from a sptr. | |
wptr< TYPE > & | operator= (const wptr< TYPE > &p) |
Assignment from another wptr. | |
wptr< TYPE > & | operator= (TYPE *p) |
Assignment from a raw pointer. | |
const sptr< TYPE > | promote () const |
Attempt to promote this secondary reference to a primary reference. | |
void | set_weak_atom_ptr (SAtom::weak_atom_ptr *weak) |
Manually set the internal weak pointer object. | |
TYPE * | unsafe_ptr_access () const |
Retrieve raw pointer. | |
template<class NEWTYPE> | |
wptr (const sptr< NEWTYPE > &p) | |
Initialization from a strong pointer to another type of SAtom subclass. | |
template<class NEWTYPE> | |
wptr (const wptr< NEWTYPE > &p) | |
Initialization from a weak pointer to another type of SAtom subclass. | |
wptr (const sptr< TYPE > &p) | |
Initialize from a sptr. | |
wptr (const wptr< TYPE > &p) | |
Initialize from another wptr. | |
wptr (TYPE *p) | |
Initialize to given pointer. | |
wptr () | |
Initialize to NULL pointer. | |
~wptr () | |
Release weak reference on object. | |
Friends | |
class | sptr< TYPE > |
|
Initialize to NULL pointer.
|
|
Initialize to given pointer.
|
|
Initialize from another wptr.
|
|
Initialize from a sptr.
|
|
Initialization from a weak pointer to another type of SAtom subclass.
|
|
Initialization from a strong pointer to another type of SAtom subclass.
|
|
Release weak reference on object.
|
|
Explicitly decrement reference count of this atom. Should very rarely be used -- normally you want to let wptr<> take care of the reference count for you.
|
|
Retrieve the internal weak pointer object. Should very rarely be used. |
|
Explicitly increment reference count of this atom. Should very rarely be used -- normally you want to let wptr<> take care of the reference count for you.
|
|
Assigment from another weak pointer.
|
|
Assignment from a strong pointer.
|
|
Assignment from a sptr.
|
|
Assignment from another wptr.
|
|
Assignment from a raw pointer.
|
|
Attempt to promote this secondary reference to a primary reference. The returned sptr<> will be NULL if it failed. |
|
Manually set the internal weak pointer object. Should very rarely be used. |
|
Retrieve raw pointer.
|
|
|