diff options
author | Mark Spruiell <mes@zeroc.com> | 2014-08-22 13:57:27 -0700 |
---|---|---|
committer | Mark Spruiell <mes@zeroc.com> | 2014-08-22 13:57:27 -0700 |
commit | 72f8cc4a94b6ff77be9c8d08f28ed6b23d59568e (patch) | |
tree | 3c3a82331886bb85928b2edff98f36c147ca88f1 /cpp/src/Freeze/MapI.h | |
parent | remove convertssl.py from RPMs (diff) | |
download | ice-72f8cc4a94b6ff77be9c8d08f28ed6b23d59568e.tar.bz2 ice-72f8cc4a94b6ff77be9c8d08f28ed6b23d59568e.tar.xz ice-72f8cc4a94b6ff77be9c8d08f28ed6b23d59568e.zip |
ICE-5225 - Freeze changes
Diffstat (limited to 'cpp/src/Freeze/MapI.h')
-rw-r--r-- | cpp/src/Freeze/MapI.h | 58 |
1 files changed, 36 insertions, 22 deletions
diff --git a/cpp/src/Freeze/MapI.h b/cpp/src/Freeze/MapI.h index b648fb820e1..2883bd19bb9 100644 --- a/cpp/src/Freeze/MapI.h +++ b/cpp/src/Freeze/MapI.h @@ -13,7 +13,7 @@ #include <Freeze/Map.h> #include <Freeze/ConnectionI.h> #ifdef ICE_CPP11 -# include <memory> +# include <memory> #endif namespace Freeze @@ -22,38 +22,43 @@ namespace Freeze class MapDb; class MapHelperI; - class IteratorHelperI : public IteratorHelper -{ +{ public: IteratorHelperI(const MapHelperI& m, bool readOnly, const MapIndexBasePtr& index, bool onlyDups); IteratorHelperI(const IteratorHelperI&); - virtual + virtual ~IteratorHelperI() ICE_NOEXCEPT_FALSE; - - bool + + bool find(const Key& k) const; - bool + bool + find(const Dbt& k) const; + + bool lowerBound(const Key& k) const; - bool + bool upperBound(const Key& k) const; virtual IteratorHelper* clone() const; - + virtual const Key* get() const; virtual void get(const Key*&, const Value*&) const; - - virtual void + + virtual void set(const Value&); + virtual void + set(const Dbt&); + virtual void erase(); @@ -66,7 +71,7 @@ public: close(); class Tx -#ifndef ICE_CPP11 +#ifndef ICE_CPP11 : public IceUtil::SimpleShared #endif { @@ -110,14 +115,13 @@ private: mutable Key _key; mutable Value _value; -}; - +}; class MapHelperI : public MapHelper { public: - - MapHelperI(const ConnectionIPtr&, const std::string&, const std::string&, const std::string&, + + MapHelperI(const ConnectionIPtr&, const std::string&, const std::string&, const std::string&, const KeyCompareBasePtr&, const std::vector<MapIndexBasePtr>&, bool); virtual ~MapHelperI(); @@ -126,6 +130,9 @@ public: find(const Key&, bool) const; virtual IteratorHelper* + find(const Dbt&, bool) const; + + virtual IteratorHelper* lowerBound(const Key&, bool) const; virtual IteratorHelper* @@ -134,12 +141,21 @@ public: virtual void put(const Key&, const Value&); + virtual void + put(const Dbt&, const Dbt&); + virtual size_t erase(const Key&); virtual size_t + erase(const Dbt&); + + virtual size_t count(const Key&) const; - + + virtual size_t + count(const Dbt&) const; + virtual void clear(); @@ -157,7 +173,7 @@ public: virtual void closeDb(); - + virtual ConnectionPtr getConnection() const; @@ -169,9 +185,8 @@ public: return _connection; } - typedef std::map<std::string, MapIndexBasePtr> IndexMap; - + private: virtual void @@ -186,10 +201,9 @@ private: const std::string _dbName; IndexMap _indices; - Ice::Int _trace; + Ice::Int _trace; }; - inline const IteratorHelperI::TxPtr& IteratorHelperI::tx() const { |