#include <nub/ref.h>
Public Member Functions | |
ref (nub::uid i) | |
ref (T *ptr, ref_vis vis=DEFAULT) | |
template<class U > | |
ref (const ref< U > &other) | |
template<class U > | |
ref (const soft_ref< U > &other) | |
void | reset (T *p) |
Shorthand for assignment. | |
T * | operator-> () const throw () |
T & | operator* () const throw () |
T * | get () const throw () |
bool | operator== (const ref &other) const throw () |
bool | operator!= (const ref &other) const throw () |
nub::uid | id () const throw () |
bool | operator< (const ref &other) const throw () |
Comparison operator for sorting. |
nub::ref<T> is a ref-counted smart pointer for holding ref_counted objects. A nub::ref<T> is guaranteed to always point to a valid ref_counted object, and uses ref_counted's strong ref counts to achieve this. In order to provide this guarantee, it is possible that construction of a nub::ref<T> may throw an exception. For example, a nub::ref<T> cannot be constructed for a volatlie ref_counted object for which only weak references are available.
Definition at line 134 of file ref.h.
void nub::ref< T >::reset | ( | T * | p | ) | [inline] |
Shorthand for assignment.
Given ref<T> rr and T* p, then rr.reset(p) is shorthand for rr=ref<T>(p). But of course, rr.reset(p) is much less typing if T happens to be spelt SomeLongType<WithTemplateParams>.
Definition at line 166 of file ref.h.
Referenced by AttentionGuidanceMapConfigurator::paramChanged(), TaskRelevanceMapConfigurator::paramChanged(), EyeTrackerConfigurator::paramChanged(), EnvSegmenterConfigurator::paramChanged(), VisualCortexConfigurator::paramChanged(), SaccadeControllerHeadConfigurator::paramChanged(), RetinaConfigurator::paramChanged(), SimulationViewerConfigurator::paramChanged(), AttentionGateConfigurator::paramChanged(), PrefrontalCortexConfigurator::paramChanged(), VisualBufferConfigurator::paramChanged(), WinnerTakeAllConfigurator::paramChanged(), GistEstimatorConfigurator::paramChanged(), SaliencyMapConfigurator::paramChanged(), HandControllerConfigurator::paramChanged(), SaccadeControllerEyeConfigurator::paramChanged(), EyeHeadControllerConfigurator::paramChanged(), InferoTemporalConfigurator::paramChanged(), SimEventQueueConfigurator::paramChanged(), and ContourChannel::paramChanged().