LCOV - code coverage report
Current view: top level - src/esys/repo/gitstats - dataperiodauthor.cpp (source / functions) Hit Total Coverage
Test: esysrepo_coverage.info Lines: 27 42 64.3 %
Date: 2026-08-01 10:43:40 Functions: 11 18 61.1 %

          Line data    Source code
       1             : /*!
       2             :  * \file esys/repo/gitstats/dataperiodauthor.cpp
       3             :  * \brief
       4             :  *
       5             :  * \cond
       6             :  * __legal_b__
       7             :  *
       8             :  * Copyright (c) 2022-2023 Michel Gillet
       9             :  * Distributed under the MIT License.
      10             :  * (See accompanying file LICENSE.txt or
      11             :  * copy at https://opensource.org/licenses/MIT)
      12             :  *
      13             :  * __legal_e__
      14             :  * \endcond
      15             :  *
      16             :  */
      17             : 
      18             : #include "esys/repo/esysrepo_prec.h"
      19             : #include "esys/repo/gitstats/dataperiodauthor.h"
      20             : 
      21             : namespace esys::repo::gitstats
      22             : {
      23             : 
      24           0 : DataPeriodAuthor::DataPeriodAuthor() = default;
      25             : 
      26           3 : DataPeriodAuthor::DataPeriodAuthor(std::shared_ptr<git::Person> author)
      27           3 :     : m_author(author)
      28             : {
      29           3 : }
      30             : 
      31           3 : DataPeriodAuthor::~DataPeriodAuthor() = default;
      32             : 
      33           0 : void DataPeriodAuthor::set_author(std::shared_ptr<git::Person> author)
      34             : {
      35           0 :     m_author = author;
      36           0 : }
      37             : 
      38           0 : std::shared_ptr<git::Person> DataPeriodAuthor::get_author()
      39             : {
      40           0 :     return m_author;
      41             : }
      42             : 
      43           0 : const std::shared_ptr<git::Person> DataPeriodAuthor::get_author() const
      44             : {
      45           0 :     return m_author;
      46             : }
      47             : 
      48           0 : void DataPeriodAuthor::set_commit_count(unsigned int commit_count)
      49             : {
      50           0 :     m_commit_count = commit_count;
      51           0 : }
      52             : 
      53           0 : unsigned int DataPeriodAuthor::get_commit_count() const
      54             : {
      55           0 :     return m_commit_count;
      56             : }
      57             : 
      58           3 : unsigned int &DataPeriodAuthor::get_commit_count()
      59             : {
      60           3 :     return m_commit_count;
      61             : }
      62             : 
      63           4 : void DataPeriodAuthor::inc_commit_count()
      64             : {
      65           4 :     ++m_commit_count;
      66           4 : }
      67             : 
      68           4 : void DataPeriodAuthor::inc_line_added(unsigned int count)
      69             : {
      70           4 :     m_line_added += count;
      71           4 : }
      72             : 
      73           3 : unsigned int DataPeriodAuthor::get_line_added() const
      74             : {
      75           3 :     return m_line_added;
      76             : }
      77             : 
      78           4 : void DataPeriodAuthor::inc_line_removed(unsigned int count)
      79             : {
      80           4 :     m_line_removed += count;
      81           4 : }
      82             : 
      83           3 : unsigned int DataPeriodAuthor::get_line_removed() const
      84             : {
      85           3 :     return m_line_removed;
      86             : }
      87             : 
      88           4 : void DataPeriodAuthor::inc_renames(unsigned int count)
      89             : {
      90           4 :     m_renames += count;
      91           4 : }
      92             : 
      93           0 : unsigned int DataPeriodAuthor::get_renames() const
      94             : {
      95           0 :     return m_renames;
      96             : }
      97             : 
      98           4 : void DataPeriodAuthor::inc_files_changed(unsigned int count)
      99             : {
     100           4 :     m_files_changed += count;
     101           4 : }
     102             : 
     103           3 : unsigned int DataPeriodAuthor::get_files_changed() const
     104             : {
     105           3 :     return m_files_changed;
     106             : }
     107             : 
     108             : } // namespace esys::repo::gitstats

Generated by: LCOV version 1.14