LCOV - code coverage report
Current view: top level - data-model - variable.h (source / functions) Hit Total Coverage
Test: Code coverage report for DAQs. Lines: 3 4 75.0 %
Date: 2021-05-07 16:58:01 Functions: 4 5 80.0 %

          Line data    Source code
       1             : /*! @brief This file have the interface for Variable class.
       2             :     @file variable.h
       3             :     @author Alvaro Denis <denisacostaq@gmail.com>
       4             :     @date 7/13/2019
       5             : 
       6             :     @copyright
       7             :     @attention <h1><center><strong>COPYRIGHT &copy; 2019 </strong>
       8             :     [<strong>denisacostaq</strong>][denisacostaq-URL].
       9             :     All rights reserved.</center></h1>
      10             :     @attention This file is part of [<strong>DAQs</strong>][DAQs-URL].
      11             : 
      12             :     Redistribution and use in source and binary forms, with or without
      13             :     modification, are permitted provided that the following conditions
      14             :     are met:
      15             :     - 1. Redistributions of source code must retain the above copyright
      16             :       notice, this list of conditions and the following disclaimer.
      17             :     - 2. Redistributions in binary form must reproduce the above copyright
      18             :       notice, this list of conditions and the following disclaimer in the
      19             :       documentation and/or other materials provided with the distribution.
      20             :     - 3. Neither the name of the University nor the names of its contributors
      21             :       may be used to endorse or promote products derived from this software
      22             :       without specific prior written permission.
      23             : 
      24             :     THIS PRODUCT IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
      25             :     AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
      26             :     IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
      27             :     ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER BE LIABLE FOR ANY
      28             :     DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
      29             :     (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
      30             :     LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
      31             :     ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
      32             :     (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
      33             :     THIS PRODUCT, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
      34             : 
      35             :     [denisacostaq-URL]: https://about.me/denisacostaq "Alvaro Denis Acosta"
      36             :     [DAQs-URL]: https://github.com/denisacostaq/DAQs "DAQs"
      37             :  */
      38             : #ifndef DATAMODEL_VARIABLE_H
      39             : #define DATAMODEL_VARIABLE_H
      40             : 
      41             : #include <iostream>
      42             : #include <string>
      43             : 
      44        2272 : class Variable {
      45             :  public:
      46         368 :   Variable() = default;
      47             :   Variable(const std::string &name, const std::string &color);
      48        1818 :   Variable(const Variable &var) = default;
      49           0 :   Variable(Variable &&var) noexcept = default;
      50             :   Variable &operator=(Variable &&var) = default;
      51             :   Variable &operator=(const Variable &var) = default;
      52             : 
      53             :   void set_name(const std::string &name) noexcept;
      54             :   void set_color(const std::string &color) noexcept;
      55             :   const std::string &name() const noexcept;
      56             :   const std::string &color() const noexcept;
      57             : 
      58             :  private:
      59             :   std::string name_;
      60             :   std::string color_;
      61             : };
      62             : 
      63             : #endif  // DATAMODEL_VARIABLE_H

Generated by: LCOV version 1.12