hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
data_model.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_AMETSUCHI_DATA_MODEL_HPP
7 #define IROHA_AMETSUCHI_DATA_MODEL_HPP
8 
9 #include <vector>
10 
14 
15 namespace iroha::ametsuchi {
16 
17  class DataModel {
18  public:
19  virtual ~DataModel() = default;
20 
21  virtual CommandResult execute(
22  shared_model::proto::CallModel const &cmd) = 0;
23 
24  virtual void commitTransaction() = 0;
25 
26  virtual void commitBlock() = 0;
27 
28  virtual void rollbackTransaction() = 0;
29 
30  virtual void rollbackBlock() = 0;
31 
32  virtual std::vector<shared_model::interface::DataModelId>
33  getSupportedDataModelIds() const = 0;
34  };
35 
36 } // namespace iroha::ametsuchi
37 
38 #endif
Definition: block_query.hpp:17
virtual void commitTransaction()=0
virtual ~DataModel()=default
Definition: result_fwd.hpp:27
virtual void rollbackBlock()=0
virtual std::vector< shared_model::interface::DataModelId > getSupportedDataModelIds() const =0
virtual void commitBlock()=0
Definition: data_model.hpp:17
Definition: proto_call_model.hpp:14
virtual void rollbackTransaction()=0
virtual CommandResult execute(shared_model::proto::CallModel const &cmd)=0