|
MeVisLab Toolbox Reference
|
A DistantObject stores the pointer to an object of type T and forbids direct access to the stored pointer. More...
#include <mlDistantObject.h>
Public Types | |
| typedef T | Type |
| The type of the stored object. | |
Public Member Functions | |
| DistantObject (T *obj) | |
| Constructs a new distant object. | |
| DistantObject () | |
| Creates empty distant object. | |
| DistantObject & | operator= (T *obj) |
| Assignment from T*. | |
| bool | isNull () const |
| Returns whether the object is NULL. | |
| bool | operator== (const DistantObject< T > &other) const |
| bool | operator!= (const DistantObject< T > &other) const |
| bool | operator! () const |
Friends | |
| class | DistantObjectAccessor |
| bool | operator== (const DistantObject< T > &lhs, const T *rhs) |
| bool | operator== (const T *lhs, const DistantObject< T > &rhs) |
| bool | operator!= (const DistantObject< T > &lhs, const T *rhs) |
| bool | operator!= (const T *lhs, const DistantObject< T > &rhs) |
A DistantObject stores the pointer to an object of type T and forbids direct access to the stored pointer.
This avoids that someone calls methods on the object from a thread that is not allowed to directly access the object.
A DistantObjectAccessor can be used to get access to the stored pointer, but this should be used in special places only, e.g., when a thread wants to send a message that requires the pointer of the object that is stored in a DistantObject.
Definition at line 30 of file mlDistantObject.h.
| typedef T ml::DistantObject< T >::Type |
The type of the stored object.
Definition at line 34 of file mlDistantObject.h.
|
inlineexplicit |
Constructs a new distant object.
Make it explicit to avoid auto-conversion.
Definition at line 38 of file mlDistantObject.h.
|
inline |
Creates empty distant object.
Definition at line 41 of file mlDistantObject.h.
|
inline |
Returns whether the object is NULL.
Definition at line 50 of file mlDistantObject.h.
|
inline |
Definition at line 60 of file mlDistantObject.h.
|
inline |
Definition at line 56 of file mlDistantObject.h.
|
inline |
Assignment from T*.
Definition at line 44 of file mlDistantObject.h.
|
inline |
Definition at line 52 of file mlDistantObject.h.
|
friend |
Definition at line 88 of file mlDistantObject.h.
|
friend |
Definition at line 75 of file mlDistantObject.h.
|
friend |
Definition at line 81 of file mlDistantObject.h.
|
friend |
Definition at line 65 of file mlDistantObject.h.
|
friend |
Definition at line 70 of file mlDistantObject.h.