LCOV - code coverage report
Current view: top level - shared_model/interfaces/transaction_responses - abstract_tx_response.hpp (source / functions) Hit Total Coverage
Test: cleared_cor.info Lines: 2 3 66.7 %
Date: 2019-03-07 14:46:43 Functions: 41 70 58.6 %

          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_ABSTRACT_TX_RESPONSE_HPP
       7             : #define IROHA_ABSTRACT_TX_RESPONSE_HPP
       8             : 
       9             : #include "interfaces/base/model_primitive.hpp"
      10             : #include "utils/string_builder.hpp"
      11             : 
      12             : namespace shared_model {
      13             :   namespace interface {
      14             :     /**
      15             :      * Abstract transaction response
      16             :      * @tparam Model - concrete model transaction response
      17             :      */
      18             :     template <typename Model>
      19             :     class AbstractTxResponse : public ModelPrimitive<Model> {
      20             :      private:
      21             :       /**
      22             :        * @return string representation of class name
      23             :        */
      24             :       virtual std::string className() const = 0;
      25             : 
      26             :      public:
      27             :       // ------------------------| Primitive override |-------------------------
      28             : 
      29             :       std::string toString() const override {
      30         738 :         return detail::PrettyStringBuilder().init(className()).finalize();
      31           0 :       }
      32             : 
      33             :       bool operator==(const Model &rhs) const override {
      34       19946 :         return true;
      35             :       }
      36             :     };
      37             :   }  // namespace interface
      38             : }  // namespace shared_model
      39             : 
      40             : #endif  // IROHA_ABSTRACT_TX_RESPONSE_HPP

Generated by: LCOV version 1.13