LCOV - code coverage report
Current view: top level - wlogjson - stdout_writer_options_json.hpp (source / functions) Hit Total Coverage
Test: wlog-coverage.info Lines: 4 4 100.0 %
Date: 2019-09-12 Functions: 4 4 100.0 %

          Line data    Source code
       1             : //
       2             : // Author: Vladimir Migashko <migashko@gmail.com>, (C) 2017
       3             : //
       4             : // Copyright: See COPYING file that comes with this distribution
       5             : //
       6             : #pragma once
       7             : 
       8             : #include <wlog/writer/stdout_writer_options.hpp>
       9             : #include <wjson/json.hpp>
      10             : #include <wjson/name.hpp>
      11             : 
      12             : namespace wlog{
      13             : 
      14             : struct stdout_writer_options_json
      15             : {
      16           6 :   JSON_NAME(name)
      17           6 :   JSON_NAME(sync)
      18             : 
      19             :   struct sync
      20             :   {
      21           3 :     bool operator()(const stdout_writer_options& opt) const { return opt.sync!=0; }
      22           3 :     void operator()(stdout_writer_options& opt, bool value) const { opt.sync = int(value); }
      23             :   };
      24             : 
      25             :   typedef wjson::object<
      26             :     stdout_writer_options,
      27             :     wjson::member_list<
      28             :       wjson::member<n_name, stdout_writer_options, std::string, &stdout_writer_options::name>,
      29             :       wjson::member_p<n_sync, stdout_writer_options, bool, sync >
      30             :     >,
      31             :     wjson::strict_mode
      32             :   > type;
      33             :   typedef type::serializer serializer;
      34             :   typedef type::target target;
      35             :   typedef type::member_list member_list;
      36             : };
      37             : 
      38             : }

Generated by: LCOV version 1.10