13 #ifndef ML_DISTANT_OBJECT_H
14 #define ML_DISTANT_OBJECT_H
50 bool isNull()
const {
return _object==
nullptr; }
53 return _object == other._object;
57 return _object != other._object;
62 return _object==
nullptr;
68 return lhs._object == rhs;
73 return lhs == rhs._object;
78 return lhs._object != rhs;
84 return lhs != rhs._object;
98 template <
typename Distant>
The DistantObjectAccessor can be used to get the value stored in a DistantObject.
static Distant::Type * get(const Distant &distant)
Returns access to the typed object pointer T* stored in DistantObject<T>.
A DistantObject stores the pointer to an object of type T and forbids direct access to the stored poi...
friend bool operator==(const T *lhs, const DistantObject< T > &rhs)
friend bool operator!=(const T *lhs, const DistantObject< T > &rhs)
bool isNull() const
Returns whether the object is NULL.
DistantObject & operator=(T *obj)
Assignment from T*.
bool operator==(const DistantObject< T > &other) const
DistantObject(T *obj)
Constructs a new distant object.
bool operator!=(const DistantObject< T > &other) const
DistantObject()
Creates empty distant object.
friend bool operator==(const DistantObject< T > &lhs, const T *rhs)
friend bool operator!=(const DistantObject< T > &lhs, const T *rhs)
T Type
The type of the stored object.