Line data Source code
1 : /**
2 : * Copyright Soramitsu Co., Ltd. All Rights Reserved.
3 : * SPDX-License-Identifier: Apache-2.0
4 : */
5 :
6 : #include "backend/protobuf/query_responses/proto_account_asset_response.hpp"
7 :
8 : namespace shared_model {
9 : namespace proto {
10 :
11 : template <typename QueryResponseType>
12 : AccountAssetResponse::AccountAssetResponse(
13 : QueryResponseType &&queryResponse)
14 25 : : CopyableProto(std::forward<QueryResponseType>(queryResponse)),
15 25 : accountAssetResponse_{proto_->account_assets_response()},
16 : accountAssets_{[this] {
17 14 : return std::vector<proto::AccountAsset>(
18 14 : accountAssetResponse_.account_assets().begin(),
19 14 : accountAssetResponse_.account_assets().end());
20 25 : }} {}
21 :
22 : template AccountAssetResponse::AccountAssetResponse(
23 : AccountAssetResponse::TransportType &);
24 : template AccountAssetResponse::AccountAssetResponse(
25 : const AccountAssetResponse::TransportType &);
26 : template AccountAssetResponse::AccountAssetResponse(
27 : AccountAssetResponse::TransportType &&);
28 :
29 : AccountAssetResponse::AccountAssetResponse(const AccountAssetResponse &o)
30 0 : : AccountAssetResponse(o.proto_) {}
31 :
32 : AccountAssetResponse::AccountAssetResponse(AccountAssetResponse &&o)
33 25 : : AccountAssetResponse(std::move(o.proto_)) {}
34 :
35 : const interface::types::AccountAssetCollectionType
36 : AccountAssetResponse::accountAssets() const {
37 24 : return *accountAssets_;
38 : }
39 :
40 : } // namespace proto
41 : } // namespace shared_model
|