LCOV - code coverage report
Current view: top level - src/bindings/cpp/examples - cpp_example_io.cpp (source / functions) Hit Total Coverage
Test: coverage-filtered.info Lines: 0 15 0.0 %
Date: 2022-05-21 16:19:22 Functions: 0 1 0.0 %

          Line data    Source code
       1             : /**
       2             :  * @file
       3             :  *
       4             :  * @brief
       5             :  *
       6             :  * @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
       7             :  */
       8             : 
       9             : #include <kdb.hpp>
      10             : 
      11             : #include <kdbio.hpp>
      12             : #include <keyio.hpp>
      13             : #include <keysetio.hpp>
      14             : 
      15           0 : int main ()
      16             : {
      17           0 :         kdb::Key k ("user:/sw/MyApp", KEY_END);
      18           0 :         std::cout << "created a key: " << k << std::endl;
      19             : 
      20           0 :         kdb::KeySet ks;
      21             : 
      22           0 :         try
      23             :         {
      24           0 :                 kdb::KDB kdb (k);
      25           0 :                 kdb.get (ks, k);
      26             : 
      27           0 :                 std::cout << "print out (full) keyset:" << std::endl;
      28           0 :                 std::cout << ks;
      29             : 
      30           0 :                 kdb.set (ks, k);
      31           0 :                 kdb.close (k);
      32           0 :                 printWarnings (std::cout, k, true, true);
      33             :         }
      34           0 :         catch (kdb::KDBException const & e)
      35             :         {
      36           0 :                 std::cout << e.what ();
      37             :         }
      38           0 : }

Generated by: LCOV version 1.13