diff options
author | Michi Henning <michi@zeroc.com> | 2006-02-21 04:08:40 +0000 |
---|---|---|
committer | Michi Henning <michi@zeroc.com> | 2006-02-21 04:08:40 +0000 |
commit | 17637b2c90916a65a844ab39a0efe7aadc590fdc (patch) | |
tree | ef5474109fd55f1778f395abc120fa3260148405 /cpp/src/Ice/Reference.h | |
parent | Bug 867. (diff) | |
download | ice-17637b2c90916a65a844ab39a0efe7aadc590fdc.tar.bz2 ice-17637b2c90916a65a844ab39a0efe7aadc590fdc.tar.xz ice-17637b2c90916a65a844ab39a0efe7aadc590fdc.zip |
Bug 857.
Diffstat (limited to 'cpp/src/Ice/Reference.h')
-rw-r--r-- | cpp/src/Ice/Reference.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/cpp/src/Ice/Reference.h b/cpp/src/Ice/Reference.h index 7d7d55a2856..7f67f2aa41c 100644 --- a/cpp/src/Ice/Reference.h +++ b/cpp/src/Ice/Reference.h @@ -11,7 +11,7 @@ #define ICE_REFERENCE_H #include <IceUtil/Shared.h> -#include <IceUtil/Mutex.h> +#include <IceUtil/RecMutex.h> #include <Ice/ReferenceF.h> #include <Ice/ReferenceFactoryF.h> #include <Ice/EndpointIF.h> @@ -83,7 +83,7 @@ public: virtual ReferencePtr changeEndpoints(const std::vector<EndpointIPtr>&) const = 0; virtual ReferencePtr changeLocatorCacheTimeout(int) const = 0; - int hash() const; // Conceptually const. + virtual int hash() const; // Conceptually const. // // Marshal the reference. @@ -112,6 +112,10 @@ protected: const std::string&, Mode); Reference(const Reference&); + IceUtil::RecMutex _hashMutex; // For lazy initialization of hash value. + mutable Ice::Int _hashValue; + mutable bool _hashInitialized; + private: const InstancePtr _instance; @@ -123,10 +127,6 @@ private: std::string _facet; bool _cacheConnection; Ice::EndpointSelectionType _endpointSelection; - - IceUtil::Mutex _hashMutex; // For lazy initialization of hash value. - mutable Ice::Int _hashValue; - mutable bool _hashInitialized; }; class FixedReference : public Reference @@ -193,6 +193,8 @@ public: virtual Ice::ConnectionIPtr getConnection(bool&) const = 0; + virtual int hash() const; + virtual bool operator==(const Reference&) const = 0; virtual bool operator!=(const Reference&) const = 0; virtual bool operator<(const Reference&) const = 0; @@ -278,6 +280,8 @@ public: virtual std::string toString() const; virtual Ice::ConnectionIPtr getConnection(bool&) const; + virtual int hash() const; // Conceptually const. + virtual bool operator==(const Reference&) const; virtual bool operator!=(const Reference&) const; virtual bool operator<(const Reference&) const; |