13#ifndef ML_DISTANT_OBJECT_H
14#define ML_DISTANT_OBJECT_H
49 bool isNull()
const {
return _object==
nullptr; }
52 return _object ==
other._object;
56 return _object !=
other._object;
61 return _object==
nullptr;
97 template <
typename Distant>
The DistantObjectAccessor can be used to get the value stored in a DistantObject, it should only be u...
static Distant::Type * get(const Distant &distant)
Get 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)
DistantObject & operator=(T *obj)
Assignment from T*.
friend bool operator!=(const T *lhs, const DistantObject< T > &rhs)
bool isNull() const
Returns if the object is NULL.
bool operator==(const DistantObject< T > &other) const
DistantObject(T *obj)
Construct a new distant object (make it explicit to avoid auto-conversion).
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.
Target mlrange_cast(Source arg)
Generic version of checked ML casts.