LCOV - code coverage report
Current view: top level - src/esys/repo/progress - repofailedevent.cpp (source / functions) Hit Total Coverage
Test: esysrepo_coverage.info Lines: 9 20 45.0 %
Date: 2026-08-01 10:43:40 Functions: 4 9 44.4 %

          Line data    Source code
       1             : /*!
       2             :  * \file esys/repo/progress/repofailedevent.cpp
       3             :  * \brief
       4             :  *
       5             :  * \cond
       6             :  * __legal_b__
       7             :  *
       8             :  * Copyright (c) 2026 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/progress/repofailedevent.h"
      20             : 
      21             : namespace esys::repo::progress
      22             : {
      23             : 
      24           0 : RepoFailedEvent::RepoFailedEvent() = default;
      25             : 
      26           5 : RepoFailedEvent::RepoFailedEvent(std::size_t repo_index, const std::string &error)
      27           5 :     : m_repo_index(repo_index)
      28           5 :     , m_error(error)
      29             : {
      30           5 : }
      31             : 
      32          14 : RepoFailedEvent::~RepoFailedEvent() = default;
      33             : 
      34           0 : void RepoFailedEvent::set_repo_index(std::size_t repo_index)
      35             : {
      36           0 :     m_repo_index = repo_index;
      37           0 : }
      38             : 
      39           3 : std::size_t RepoFailedEvent::get_repo_index() const
      40             : {
      41           3 :     return m_repo_index;
      42             : }
      43             : 
      44           0 : void RepoFailedEvent::set_error(const std::string &error)
      45             : {
      46           0 :     m_error = error;
      47           0 : }
      48             : 
      49           4 : const std::string &RepoFailedEvent::get_error() const
      50             : {
      51           4 :     return m_error;
      52             : }
      53             : 
      54           0 : bool RepoFailedEvent::operator==(const RepoFailedEvent &other) const
      55             : {
      56           0 :     return (m_repo_index == other.m_repo_index) && (m_error == other.m_error);
      57             : }
      58             : 
      59           0 : bool RepoFailedEvent::operator!=(const RepoFailedEvent &other) const
      60             : {
      61           0 :     return !operator==(other);
      62             : }
      63             : 
      64             : } // namespace esys::repo::progress

Generated by: LCOV version 1.14