• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

traintastic / traintastic / 23391602376

21 Mar 2026 11:53PM UTC coverage: 26.259% (-0.2%) from 26.481%
23391602376

push

github

reinder
[cbus] added node list

0 of 264 new or added lines in 7 files covered. (0.0%)

15 existing lines in 2 files now uncovered.

8246 of 31402 relevant lines covered (26.26%)

183.04 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/server/src/hardware/interface/cbus/cbusnodelist.cpp
1
/**
2
 * This file is part of Traintastic,
3
 * see <https://github.com/traintastic/traintastic>.
4
 *
5
 * Copyright (C) 2026 Reinder Feenstra
6
 *
7
 * This program is free software; you can redistribute it and/or
8
 * modify it under the terms of the GNU General Public License
9
 * as published by the Free Software Foundation; either version 2
10
 * of the License, or (at your option) any later version.
11
 *
12
 * This program is distributed in the hope that it will be useful,
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
 * GNU General Public License for more details.
16
 *
17
 * You should have received a copy of the GNU General Public License
18
 * along with this program; if not, write to the Free Software
19
 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
20
 */
21

22
#include "cbusnodelist.hpp"
23
#include "cbusnodelisttablemodel.hpp"
24

NEW
25
CBUSNodeList::CBUSNodeList(Object& parent_, std::string_view parentPropertyName)
×
NEW
26
  : SubObject(parent_, parentPropertyName)
×
27
{
NEW
28
}
×
29

NEW
30
TableModelPtr CBUSNodeList::getModel()
×
31
{
NEW
32
  return std::make_shared<CBUSNodeListTableModel>(*this);
×
33
}
34

NEW
35
void CBUSNodeList::add(Node&& node)
×
36
{
NEW
37
  m_nodes.emplace_back(std::move(node));
×
38

NEW
39
  const auto rowCount = static_cast<uint32_t>(m_nodes.size());
×
NEW
40
  for(auto& model : m_models)
×
41
  {
NEW
42
    model->setRowCount(rowCount);
×
43
  }
NEW
44
}
×
45

NEW
46
void CBUSNodeList::clear()
×
47
{
NEW
48
  m_nodes.clear();
×
NEW
49
  for(auto& model : m_models)
×
50
  {
NEW
51
    model->setRowCount(0);
×
52
  }
NEW
53
}
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc