diff options
Diffstat (limited to 'cppe/src/IceE/Reference.h')
-rw-r--r-- | cppe/src/IceE/Reference.h | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/cppe/src/IceE/Reference.h b/cppe/src/IceE/Reference.h index 9380a25836a..11854d17fb8 100644 --- a/cppe/src/IceE/Reference.h +++ b/cppe/src/IceE/Reference.h @@ -24,7 +24,7 @@ #endif #include <IceE/ConnectionF.h> #include <IceE/Shared.h> -#include <IceE/Mutex.h> +#include <IceE/RecMutex.h> #include <IceE/Identity.h> namespace IceInternal @@ -106,6 +106,10 @@ protected: const std::string&, Mode, bool); Reference(const Reference&); + IceUtil::RecMutex _hashMutex; // For lazy initialization of hash value. + mutable Ice::Int _hashValue; + mutable bool _hashInitialized; + private: const InstancePtr _instance; @@ -116,10 +120,6 @@ private: Ice::Identity _identity; Ice::Context _context; std::string _facet; - - IceUtil::Mutex _hashMutex; // For lazy initialization of hash value. - mutable Ice::Int _hashValue; - mutable bool _hashInitialized; }; class FixedReference : public Reference @@ -173,6 +173,8 @@ public: virtual Ice::ConnectionPtr getConnection() const = 0; + int hash() const; // Conceptually const. + virtual bool operator==(const Reference&) const = 0; virtual bool operator!=(const Reference&) const = 0; virtual bool operator<(const Reference&) const = 0; @@ -272,6 +274,8 @@ public: virtual std::string toString() const; virtual Ice::ConnectionPtr getConnection() const; + int hash() const; // Conceptually const. + virtual bool operator==(const Reference&) const; virtual bool operator!=(const Reference&) const; virtual bool operator<(const Reference&) const; @@ -286,11 +290,11 @@ private: std::string _adapterId; LocatorInfoPtr _locatorInfo; -#ifdef ICEE_HAS_ROUTER
- typedef RoutableReference Parent;
-#else
- typedef Reference Parent;
-#endif
+#ifdef ICEE_HAS_ROUTER + typedef RoutableReference Parent; +#else + typedef Reference Parent; +#endif }; #endif // ICEE_HAS_LOCATOR |