LCOV - code coverage report
Current view: top level - src/tools/kdb - set.hpp (source / functions) Hit Total Coverage
Test: coverage-filtered.info Lines: 8 8 100.0 %
Date: 2019-09-12 12:28:41 Functions: 4 4 100.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             : #ifndef SET_HPP
      10             : #define SET_HPP
      11             : 
      12             : #include "coloredkdbio.hpp"
      13             : #include <command.hpp>
      14             : #include <kdb.hpp>
      15             : 
      16             : class SetCommand : public Command
      17             : {
      18             :         kdb::KDB kdb;
      19             : 
      20             : public:
      21             :         SetCommand ();
      22             :         ~SetCommand ();
      23             : 
      24         352 :         virtual std::string getShortOptions () override
      25             :         {
      26        1056 :                 return "qN";
      27             :         }
      28             : 
      29         352 :         virtual std::string getSynopsis () override
      30             :         {
      31        1056 :                 return "<name> [<value>]";
      32             :         }
      33             : 
      34         430 :         virtual std::string getShortHelpText () override
      35             :         {
      36        1290 :                 return "Set the value of an individual key.";
      37             :         }
      38             : 
      39         352 :         virtual std::string getLongHelpText () override
      40             :         {
      41             :                 return "If no value is given, it will be set to a null-value\n"
      42             :                        "To get an empty value you need to quote like \"\" (depending on shell)\n"
      43             :                        "To set a negative value you need to use '--' to stop option processing.\n"
      44        1056 :                        "(e.g. 'kdb set -- /tests/neg -3')\n";
      45             :         }
      46             : 
      47             :         virtual int execute (Cmdline const & cmdline) override;
      48             : };
      49             : 
      50             : #endif

Generated by: LCOV version 1.13