LCOV - code coverage report
Current view: top level - src/plugins/cpptemplate - cpptemplate_delegate.hpp (source / functions) Hit Total Coverage
Test: coverage-filtered.info Lines: 1 1 100.0 %
Date: 2019-09-12 12:28:41 Functions: 0 0 -

          Line data    Source code
       1             : /**
       2             :  * @file
       3             :  *
       4             :  * @brief Delegate definitions for the `cpptemplate` plugin
       5             :  *
       6             :  * @copyright BSD License (see LICENSE.md or https://www.libelektra.org)
       7             :  *
       8             :  */
       9             : 
      10             : #ifndef ELEKTRA_CPP_TEMPLATE_DELEGATE_HPP
      11             : #define ELEKTRA_CPP_TEMPLATE_DELEGATE_HPP
      12             : 
      13             : #include <kdberrors.h>
      14             : #include <kdbplugin.hpp>
      15             : 
      16             : namespace elektra
      17             : {
      18             : 
      19          44 : class CppTemplateDelegate
      20             : {
      21             :         using KeySet = kdb::KeySet;
      22             :         using Key = kdb::Key;
      23             : 
      24             :         /** This key set stores the plugin configuration. */
      25             :         KeySet configuration; // For your own plugin you can remove this value and also add any other member you like here.
      26             : 
      27             : public:
      28             :         explicit CppTemplateDelegate (KeySet config);
      29             : 
      30             :         /**
      31             :          * @brief This method returns the configuration of the plugin, prefixing key names with the name of `parent`.
      32             :          *
      33             :          *  This is only an example to show you how to use the delegate. You can add any method you want here and then call it in
      34             :          *  `cpptemplate.cpp` via `delegator::get (handle)->functionName(parameter1, parameter2, …)`.
      35             :          *
      36             :          * @param parent This key specifies the name this function adds to the stored configuration values.
      37             :          *
      38             :          * @return A key set storing the configuration values of the plugin
      39             :          */
      40             :         KeySet getConfig (Key const & prefix);
      41             : };
      42             : 
      43             : } // end namespace elektra
      44             : 
      45             : #endif

Generated by: LCOV version 1.13