From 2ba4d4e0ca7aeade69ee00ab17d5fa1b69372ffc Mon Sep 17 00:00:00 2001 From: Benoit Foucher Date: Wed, 18 Apr 2012 14:33:16 +0200 Subject: Added support for encoding versioning --- cpp/src/Freeze/ObjectStore.h | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) (limited to 'cpp/src/Freeze/ObjectStore.h') diff --git a/cpp/src/Freeze/ObjectStore.h b/cpp/src/Freeze/ObjectStore.h index 52af261a12c..a9b55d93855 100644 --- a/cpp/src/Freeze/ObjectStore.h +++ b/cpp/src/Freeze/ObjectStore.h @@ -43,10 +43,10 @@ public: bool dbHasObject(const Ice::Identity&, const TransactionIPtr&) const; void save(Key& key, Value& value, Ice::Byte status, DbTxn* tx); - static void marshal(const Ice::Identity&, Key&, const Ice::CommunicatorPtr&); - static void unmarshal(Ice::Identity&, const Key&, const Ice::CommunicatorPtr&); - static void marshal(const ObjectRecord&, Value&, const Ice::CommunicatorPtr&); - static void unmarshal(ObjectRecord&, const Value&, const Ice::CommunicatorPtr&); + static void marshal(const Ice::Identity&, Key&, const Ice::CommunicatorPtr&, const Ice::EncodingVersion&); + static void unmarshal(Ice::Identity&, const Key&, const Ice::CommunicatorPtr&, const Ice::EncodingVersion&); + static void marshal(const ObjectRecord&, Value&, const Ice::CommunicatorPtr&, const Ice::EncodingVersion&); + static void unmarshal(ObjectRecord&, const Value&, const Ice::CommunicatorPtr&, const Ice::EncodingVersion&); bool load(const Ice::Identity&, const TransactionIPtr&, ObjectRecord&); void update(const Ice::Identity&, const ObjectRecord&, const TransactionIPtr&); @@ -63,6 +63,7 @@ public: const std::string& dbName() const; const Ice::CommunicatorPtr& communicator() const; + const Ice::EncodingVersion& encoding() const; const std::string& facet() const; protected: @@ -77,6 +78,7 @@ private: EvictorIBase* _evictor; std::vector _indices; Ice::CommunicatorPtr _communicator; + Ice::EncodingVersion _encoding; Ice::ObjectPtr _sampleServant; }; @@ -144,6 +146,12 @@ ObjectStoreBase::communicator() const return _communicator; } +inline const Ice::EncodingVersion& +ObjectStoreBase::encoding() const +{ + return _encoding; +} + inline EvictorIBase* ObjectStoreBase::evictor() const { -- cgit v1.2.3