LCOV - code coverage report
Current view: top level - shared_model/utils - visitor_apply_for_all.hpp (source / functions) Hit Total Coverage
Test: cleared_cor.info Lines: 1 1 100.0 %
Date: 2019-03-07 14:46:43 Functions: 15 59 25.4 %

          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_VISITOR_APPLY_FOR_ALL_HPP
       7             : #define IROHA_VISITOR_APPLY_FOR_ALL_HPP
       8             : 
       9             : #include <boost/variant/static_visitor.hpp>
      10             : #include <string>
      11             : 
      12             : namespace shared_model {
      13             :   namespace detail {
      14             : 
      15             :     /**
      16             :      * Class provides generic toString visitor for objects
      17             :      */
      18             :     class ToStringVisitor : public boost::static_visitor<std::string> {
      19             :      public:
      20             :       template <typename InputType>
      21             :       auto operator()(const InputType &operand) const {
      22         865 :         return operand.toString();
      23             :       }
      24             :     };
      25             : 
      26             :   }  // namespace detail
      27             : }  // namespace shared_model
      28             : #endif  // IROHA_VISITOR_APPLY_FOR_ALL_HPP

Generated by: LCOV version 1.13