LCOV - code coverage report
Current view: top level - package/demo/api - multiget_hashed.hpp (source / functions) Hit Total Coverage
Test: wfc_demo-coverage.info Lines: 0 14 0.0 %
Date: 2019-08-13 Functions: 0 8 0.0 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include <string>
       4             : #include <set>
       5             : #include <map>
       6             : #include <memory>
       7             : #include <functional>
       8             : 
       9             : namespace demo{
      10             : 
      11             : namespace request
      12             : {
      13           0 :   struct multiget_hashed
      14             :   {
      15             :     std::set<std::string> keys;
      16             :     typedef std::unique_ptr<multiget_hashed> ptr;
      17             :     
      18           0 :     static multiget_hashed create_schema() 
      19             :     {
      20           0 :       multiget_hashed sch;
      21           0 :       sch.keys.insert("key1");
      22           0 :       sch.keys.insert("key2");
      23           0 :       sch.keys.insert("key3");
      24           0 :       return sch;
      25             :     }
      26             : 
      27             :   };
      28             : }
      29             : 
      30             : namespace response
      31             : {
      32           0 :   struct multiget_hashed
      33             :   {
      34             :     typedef std::map<std::string, std::shared_ptr<size_t> > map_type;
      35             :     map_type values;
      36             :     typedef std::unique_ptr<multiget_hashed> ptr;
      37             :     typedef std::function< void(ptr)> handler;
      38             :     
      39           0 :     static multiget_hashed create_schema() 
      40             :     {
      41           0 :       multiget_hashed sch;
      42             :       std::hash<std::string> h;
      43           0 :       sch.values["key1"]=std::make_shared<size_t>(h("value1"));
      44           0 :       sch.values["key2"]=std::make_shared<size_t>(h("value2"));
      45           0 :       sch.values["key3"]=std::make_shared<size_t>(h("value3"));
      46           0 :       return sch;
      47             :     }
      48             : 
      49             :   };
      50             : }
      51             : 
      52             : }

Generated by: LCOV version 1.10