Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
[mc] Mark some Process attributes as private
[simgrid.git] / src / mc / AddressSpace.hpp
index 05665fb..1da65e8 100644 (file)
@@ -35,6 +35,10 @@ public:
   {
     return address_;
   }
+  bool operator!() const
+  {
+    return !address_;
+  }
   operator remote_ptr<void>() const
   {
     return remote_ptr<void>(address_);
@@ -59,6 +63,42 @@ public:
   }
 };
 
+template<class X, class Y>
+bool operator<(remote_ptr<X> const& x, remote_ptr<Y> const& y)
+{
+  return x.address() < y.address();
+}
+
+template<class X, class Y>
+bool operator>(remote_ptr<X> const& x, remote_ptr<Y> const& y)
+{
+  return x.address() > y.address();
+}
+
+template<class X, class Y>
+bool operator>=(remote_ptr<X> const& x, remote_ptr<Y> const& y)
+{
+  return x.address() >= y.address();
+}
+
+template<class X, class Y>
+bool operator<=(remote_ptr<X> const& x, remote_ptr<Y> const& y)
+{
+  return x.address() <= y.address();
+}
+
+template<class X, class Y>
+bool operator==(remote_ptr<X> const& x, remote_ptr<Y> const& y)
+{
+  return x.address() == y.address();
+}
+
+template<class X, class Y>
+bool operator!=(remote_ptr<X> const& x, remote_ptr<Y> const& y)
+{
+  return x.address() != y.address();
+}
+
 template<class T> inline
 remote_ptr<T> remote(T *p)
 {