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
17  : public TrivialProto<interface::Account, iroha::protocol::Account> {
18  public:
19  template <typename AccountType>
20  explicit Account(AccountType &&account)
21  : TrivialProto(std::forward<AccountType>(account)) {}
22 
23  Account(const Account &o) : Account(o.proto_) {}
24 
25  Account(Account &&o) noexcept : Account(std::move(o.proto_)) {}
26 
27  const interface::types::AccountIdType &accountId() const override {
28  return proto_->account_id();
29  }
30 
31  const interface::types::DomainIdType &domainId() const override {
32  return proto_->domain_id();
33  }
34 
36  return proto_->quorum();
37  }
38 
39  const interface::types::JsonType &jsonData() const override {
40  return proto_->json_data();
41  }
42  };
43  } // namespace proto
44 } // namespace shared_model
45 
46 #endif // IROHA_SHARED_MODEL_PROTO_ACCOUNT_HPP
interface::types::QuorumType quorum() const override
Definition: account.hpp:35
Account(AccountType &&account)
Definition: account.hpp:20
std::string DomainIdType
Iroha domain id type.
Definition: types.hpp:53
Definition: peer.hpp:48
Definition: account.hpp:16
Account(const Account &o)
Definition: account.hpp:23
const interface::types::JsonType & jsonData() const override
Definition: account.hpp:39
const interface::types::AccountIdType & accountId() const override
Definition: account.hpp:27
std::string AccountIdType
Type of account id.
Definition: types.hpp:39
Account(Account &&o) noexcept
Definition: account.hpp:25
Definition: trivial_proto.hpp:19
Definition: command_executor.hpp:12
const interface::types::DomainIdType & domainId() const override
Definition: account.hpp:31
detail::ReferenceHolder< iroha::protocol::Account > proto_
Definition: trivial_proto.hpp:36
uint16_t QuorumType
Type of Quorum used in transaction and set quorum.
Definition: types.hpp:62
std::string JsonType
Type of JSON data.
Definition: types.hpp:74