hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
account.hpp
Go to the documentation of this file.
1 
6 #ifndef IROHA_SHARED_MODEL_PROTO_ACCOUNT_HPP
7 #define IROHA_SHARED_MODEL_PROTO_ACCOUNT_HPP
8 
12 #include "qry_responses.pb.h"
13 
14 namespace shared_model {
15  namespace proto {
16  class Account final : public CopyableProto<interface::Account,
17  iroha::protocol::Account,
18  Account> {
19  public:
20  template <typename AccountType>
21  explicit Account(AccountType &&account)
22  : CopyableProto(std::forward<AccountType>(account)) {}
23 
24  Account(const Account &o) : Account(o.proto_) {}
25 
26  Account(Account &&o) noexcept : Account(std::move(o.proto_)) {}
27 
28  const interface::types::AccountIdType &accountId() const override {
29  return proto_->account_id();
30  }
31 
32  const interface::types::DomainIdType &domainId() const override {
33  return proto_->domain_id();
34  }
35 
37  return proto_->quorum();
38  }
39 
40  const interface::types::JsonType &jsonData() const override {
41  return proto_->json_data();
42  }
43  };
44  } // namespace proto
45 } // namespace shared_model
46 
47 #endif // IROHA_SHARED_MODEL_PROTO_ACCOUNT_HPP
detail::ReferenceHolder< iroha::protocol::Account > proto_
Definition: trivial_proto.hpp:65
interface::types::QuorumType quorum() const override
Definition: account.hpp:36
Account(AccountType &&account)
Definition: account.hpp:21
std::string DomainIdType
Iroha domain id type.
Definition: types.hpp:51
Definition: peer.hpp:48
Definition: account.hpp:16
Account(const Account &o)
Definition: account.hpp:24
const interface::types::JsonType & jsonData() const override
Definition: account.hpp:40
const interface::types::AccountIdType & accountId() const override
Definition: account.hpp:28
std::string AccountIdType
Type of account id.
Definition: types.hpp:37
Account(Account &&o) noexcept
Definition: account.hpp:26
Definition: command_executor.hpp:12
const interface::types::DomainIdType & domainId() const override
Definition: account.hpp:32
uint16_t QuorumType
Type of Quorum used in transaction and set quorum.
Definition: types.hpp:59
std::string JsonType
Type of JSON data.
Definition: types.hpp:73
Definition: trivial_proto.hpp:45