LCOV - code coverage report
Current view: top level - jdx - PeakAssignments.cpp (source / functions) Hit Total Coverage
Test: coverage_filtered.info Lines: 10 10 100.0 %
Date: 2025-06-15 16:18:27 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /* Copyright (C) 2025 Robert Schiwon
       2             :  *
       3             :  * This file is part of libjdx.
       4             :  *
       5             :  * libjdx is free software: you can redistribute it and/or modify it under the
       6             :  * terms of the GNU Lesser General Public License as published by the Free
       7             :  * Software Foundation, either version 3 of the License, or (at your option) any
       8             :  * later version.
       9             :  *
      10             :  * libjdx is distributed in the hope that it will be useful, but WITHOUT ANY
      11             :  * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
      12             :  * A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
      13             :  * details.
      14             :  *
      15             :  * You should have received a copy of the GNU Lesser General Public License
      16             :  * along with libjdx. If not, see <https://www.gnu.org/licenses/>.
      17             :  */
      18             : #include "jdx/PeakAssignments.hpp"
      19             : #include "util/LdrUtils.hpp"
      20             : #include "util/PeakAssignmentsParser.hpp"
      21             : 
      22          30 : libjdx::jdx::PeakAssignments::PeakAssignments(const std::string& label,
      23             :     std::string variableList, io::TextReader& reader,
      24          30 :     std::optional<std::string>& nextLine)
      25          31 :     : TabularData(label, std::move(variableList), reader)
      26             : {
      27          32 :     validateInput(getLabel(), getVariableList(), s_peakAssignentsLabel,
      28          62 :         std::vector<std::string>{
      29             :             std::vector<std::string>{std::begin(s_peakAssignentsVariableLists),
      30             :                 std::end(s_peakAssignentsVariableLists)}});
      31          29 :     util::skipToNextLdr(reader, nextLine, true);
      32          29 : }
      33             : 
      34             : std::vector<libjdx::jdx::PeakAssignment>
      35          19 : libjdx::jdx::PeakAssignments::getData() const
      36             : {
      37          30 :     util::PeakAssignmentsParser parser{getReader(), getVariableList()};
      38             :     return TabularData::getData<util::PeakAssignmentsParser, PeakAssignment>(
      39          38 :         parser);
      40             : }

Generated by: LCOV version 1.14