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

paulmthompson / WhiskerToolbox / 17846711083

19 Sep 2025 02:28AM UTC coverage: 72.02% (+0.08%) from 71.942%
17846711083

push

github

paulmthompson
event in interval computer works with entity ids

259 of 280 new or added lines in 6 files covered. (92.5%)

268 existing lines in 17 files now uncovered.

40247 of 55883 relevant lines covered (72.02%)

1227.29 hits per line

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

90.63
/src/DataManager/utils/TableView/columns/Column.cpp
1
#include "Column.h"
2

3
#include "utils/TableView/interfaces/IColumnComputer.h"
4
#include "utils/TableView/core/TableView.h"
5

6
template<SupportedColumnType T>
7
Column<T>::Column(std::string name, std::unique_ptr<IColumnComputer<T>> computer)
423✔
8
    : m_name(std::move(name)),
423✔
9
      m_computer(std::move(computer)) {};
846✔
10

11
template<SupportedColumnType T>
12
auto Column<T>::getValues(TableView * table) -> std::vector<T> const & {
298✔
13
    if (!isMaterialized()) {
298✔
14
        materialize(table);
184✔
15
    }
16
    return std::get<std::vector<T>>(m_cache);
298✔
17
}
18

19
template<SupportedColumnType T>
20
void Column<T>::materialize(TableView * table) {
262✔
21
    if (isMaterialized()) {
262✔
22
        return;
×
23
    }
24

25
    ExecutionPlan const & plan = table->getExecutionPlanFor(getSourceDependency());
262✔
26

27
    // Compute the column values using the computer
28
    auto computed = m_computer->compute(plan);
262✔
29

30
    // Store the computed values in the cache
31
    m_cache = std::move(computed);
262✔
32
}
262✔
33

34
template<SupportedColumnType T>
35
std::string Column<T>::getSourceDependency() const {
2,192✔
36
    return m_computer->getSourceDependency();
2,192✔
37
}
38

39

40
template<SupportedColumnType T>
41
std::vector<std::string> Column<T>::getDependencies() const {
509✔
42
    return m_computer->getDependencies();
509✔
43
}
44

45
template<SupportedColumnType T>
46
bool Column<T>::isMaterialized() const {
716✔
47
    return std::holds_alternative<std::vector<T>>(m_cache);
716✔
48
}
49

50
template<SupportedColumnType T>
51
bool Column<T>::hasEntityIds() const {
26✔
52
    return m_computer->hasEntityIds();
26✔
53
}
54

55
template<SupportedColumnType T>
UNCOV
56
EntityIdStructure Column<T>::getEntityIdStructure() const {
×
UNCOV
57
    return m_computer->getEntityIdStructure();
×
58
}
59

60
template<SupportedColumnType T>
61
std::vector<EntityId> Column<T>::getCellEntityIds(TableView * table, size_t row_index) const {
40✔
62
    ExecutionPlan const & plan = table->getExecutionPlanFor(getSourceDependency());
40✔
63
    return m_computer->computeCellEntityIds(plan, row_index);
40✔
64
}
65

66
template<SupportedColumnType T>
67
ColumnEntityIds Column<T>::getColumnEntityIds(TableView * table) const {
18✔
68
    if (!hasEntityIds()) {
18✔
69
        return {};
2✔
70
    }
71
    
72
    ExecutionPlan const & plan = table->getExecutionPlanFor(getSourceDependency());
16✔
73
    return m_computer->computeColumnEntityIds(plan);
16✔
74
}
75

76
// Explicit instantiation for commonly used types
77
template class Column<double>;
78
template class Column<float>;
79
template class Column<std::vector<float>>;
80
template class Column<bool>;
81
template class Column<int>;
82
template class Column<int64_t>;
83
template class Column<std::vector<double>>;
84
template class Column<std::vector<int>>;
85
template class Column<std::vector<TimeFrameIndex>>;
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