LCOV - code coverage report
Current view: top level - shared_model/backend/protobuf/common_objects - account.hpp (source / functions) Hit Total Coverage
Test: cleared_cor.info Lines: 5 5 100.0 %
Date: 2019-03-07 14:46:43 Functions: 11 11 100.0 %

          Line data    Source code
       1             : /**
       2             :  * Copyright Soramitsu Co., Ltd. All Rights Reserved.
       3             :  * SPDX-License-Identifier: Apache-2.0
       4             :  */
       5             : 
       6             : #ifndef IROHA_SHARED_MODEL_PROTO_ACCOUNT_HPP
       7             : #define IROHA_SHARED_MODEL_PROTO_ACCOUNT_HPP
       8             : 
       9             : #include "backend/protobuf/common_objects/trivial_proto.hpp"
      10             : #include "backend/protobuf/util.hpp"
      11             : #include "interfaces/common_objects/account.hpp"
      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          64 :           : 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          28 :         return proto_->account_id();
      30             :       }
      31             : 
      32             :       const interface::types::DomainIdType &domainId() const override {
      33          23 :         return proto_->domain_id();
      34             :       }
      35             : 
      36             :       interface::types::QuorumType quorum() const override {
      37          16 :         return proto_->quorum();
      38             :       }
      39             : 
      40             :       const interface::types::JsonType &jsonData() const override {
      41           4 :         return proto_->json_data();
      42             :       }
      43             :     };
      44             :   }  // namespace proto
      45             : }  // namespace shared_model
      46             : 
      47             : #endif  // IROHA_SHARED_MODEL_PROTO_ACCOUNT_HPP

Generated by: LCOV version 1.13