Salome HOME
Merge branch 'V8_5_BR'
[modules/kernel.git] / src / SALOMESDS / SALOMESDS_PickelizedPyObjRdExtInitServer.hxx
index 5845c7aca1a99400116cc88170e743cd768deba8..d9e4213e269c6ac4b3674c364678838b8e2f1610 100644 (file)
 #include <Python.h>
 
 #include "SALOMESDS_PickelizedPyObjServer.hxx"
+#include "SALOMESDS_Sha1Keeper.hxx"
 
 namespace SALOMESDS
 {
+  class PickelizedPyObjRdExtServer;
+  
   /*!
    * State during the producer/consumer phase. Activated by TransactionMultiKeyAddSession transaction returned by dss.addMultiKeyValueSession.
    */
@@ -39,6 +42,7 @@ namespace SALOMESDS
     PickelizedPyObjRdExtInitServer(DataScopeServerBase *father, const std::string& varName, const SALOME::ByteVec& value);
     PickelizedPyObjRdExtInitServer(DataScopeServerBase *father, const std::string& varName, PyObject *obj);
     ~PickelizedPyObjRdExtInitServer();
+    virtual PickelizedPyObjRdExtServer *buildStdInstanceFrom(const std::string& varName);
   public:
     std::string getAccessStr() const;
     SALOME::ByteVec *fetchSerializedContent();
@@ -54,6 +58,13 @@ namespace SALOMESDS
   public:
     static const char ACCESS_REPR[];
   };
+
+  class PickelizedPyObjRdExtInitFreeStyleServer : public PickelizedPyObjRdExtInitServer, public Sha1Keeper
+  {
+  public:
+    PickelizedPyObjRdExtInitFreeStyleServer(DataScopeServerBase *father, const std::string& varName, PyObject *obj, std::vector<unsigned char>&& sha1):PickelizedPyObjRdExtInitServer(father,varName,obj),Sha1Keeper(std::move(sha1)) { }
+    PickelizedPyObjRdExtServer *buildStdInstanceFrom(const std::string& varName) override;
+  };
 }
 
 #endif