hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
data_model_python.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_AMETSUCHI_DATA_MODEL_PYTHON_HPP
7 #define IROHA_AMETSUCHI_DATA_MODEL_PYTHON_HPP
8 
10 
11 #include <memory>
12 #include <string>
13 #include <vector>
14 
15 namespace iroha::ametsuchi {
16 
17  class DataModelPython : public DataModel {
18  public:
19  // throws std::runtime_error
20  DataModelPython(std::vector<std::string> python_paths,
21  std::string const &module_name,
22  std::string const &initialization_argument);
23 
25 
27 
28  void commitTransaction() override;
29 
30  void commitBlock() override;
31 
32  void rollbackTransaction() override;
33 
34  void rollbackBlock() override;
35 
36  std::vector<shared_model::interface::DataModelId> getSupportedDataModelIds()
37  const override;
38 
39  private:
40  struct Impl;
41  std::unique_ptr<Impl> impl_;
42  std::vector<shared_model::interface::DataModelId> supported_dm_ids_;
43  };
44 
45 } // namespace iroha::ametsuchi
46 
47 #endif
Definition: block_query.hpp:17
Definition: data_model_python.cpp:28
Definition: result_fwd.hpp:27
void commitTransaction() override
Definition: data_model_python.cpp:109
void rollbackBlock() override
Definition: data_model_python.cpp:121
Definition: data_model.hpp:17
CommandResult execute(shared_model::proto::CallModel const &cmd) override
Definition: data_model_python.cpp:78
Definition: data_model_python.hpp:17
void rollbackTransaction() override
Definition: data_model_python.cpp:117
void commitBlock() override
Definition: data_model_python.cpp:113
Definition: proto_call_model.hpp:14
~DataModelPython()
Definition: data_model_python.cpp:73
DataModelPython(std::vector< std::string > python_paths, std::string const &module_name, std::string const &initialization_argument)
Definition: data_model_python.cpp:37
std::vector< shared_model::interface::DataModelId > getSupportedDataModelIds() const override
Definition: data_model_python.cpp:126