LCOV - code coverage report
Current view: top level - include/cpp_template - derived.hpp (source / functions) Hit Total Coverage
Test: coverage_report.info.cleaned Lines: 2 2 100.0 %
Date: 2019-04-29 18:07:40 Functions: 2 3 66.7 %

          Line data    Source code
       1             : #pragma once
       2             : 
       3             : #include "base.hpp"
       4             : 
       5             : #include <cstdint>
       6             : #include <string>
       7             : 
       8             : /**
       9             :  * Defines some known class types.
      10             :  */
      11             : enum class class_type
      12             : {
      13             :         /**
      14             :          * Has no implementation.
      15             :          */
      16             :         INTERFACE,
      17             : 
      18             :         /**
      19             :          * Has some implementation.
      20             :          */
      21             :         ABSTRACT,
      22             : 
      23             :         /**
      24             :          * Has only implementation.
      25             :          */
      26             :         NORMAL
      27             : };
      28             : 
      29             : /**
      30             :  * struct containing a min and a max.
      31             :  */
      32             : struct range
      33             : {
      34             :         /**
      35             :          * The minimum value.
      36             :          */
      37             :         std::uint8_t min;
      38             : 
      39             :         /**
      40             :          * The maximum value.
      41             :          */
      42             :         std::uint8_t max;
      43             : };
      44             : 
      45             : /**
      46             :  * Convert class_type to a string representation.
      47             :  * \param t The type to translate.
      48             :  * \return The string variant.
      49             :  */
      50             : std::string class_types_to_string(class_type t);
      51             : 
      52             : /**
      53             :  * Class that derives from an abstract base
      54             :  */
      55             : class derived : public base
      56             : {
      57             : public:
      58             :         /**
      59             :          * Default constructor.
      60             :          */
      61           1 :         derived() = default;
      62             : 
      63           1 :         ~derived() override = default;
      64             : 
      65             :         /**
      66             :          * Default copy constructor
      67             :          * \param d
      68             :          */
      69             :         derived(const derived &d) = default;
      70             : 
      71             :         /**
      72             :          * Default move constructor.
      73             :          * \param d
      74             :          */
      75             :         derived(derived &&d) = default;
      76             : 
      77             :         /**
      78             :          * Default copy assignment operator.
      79             :          * \param d
      80             :          * \return
      81             :          */
      82             :         derived &operator=(const derived &d) = default;
      83             : 
      84             :         /**
      85             :          * Default move assignment operator.
      86             :          * \param d
      87             :          * \return
      88             :          */
      89             :         derived &operator=(derived &&d) = delete;
      90             : 
      91             :         /**
      92             :          * Implemented function
      93             :          */
      94             :         void init() override;
      95             : };

Generated by: LCOV version 1.13