15 : m_type(
NodeType::Root), m_name(
"dbc") {
19 : m_type(
NodeType::Frame), m_name(frame.name), m_frame(std::make_unique<
FrameInfo>(frame)) {
23 : m_type(
NodeType::Signal), m_name(signal.name), m_signal(std::make_unique<
SignalInfo>(signal)) {
28 m_children.push_back(std::move(child));
29 m_children.back()->m_parent =
this;
30 m_children.back()->m_row = m_children.size() - 1U;
35 return m_children.size();
39 if (index >= m_children.size())
42 return m_children[index].get();
46 if (index >= m_children.size())
49 return m_children[index].get();
65 return m_signal.get();
Tree node for later use in model/view or other hierarchy consumers.
const SignalInfo * GetSignal() const
Get signal payload if node is signal.
const TreeNode * GetChild(std::size_t index) const
Get child by index.
void AddChild(std::unique_ptr< TreeNode > child)
Add child node.
TreeNode()
Create root node.
const TreeNode * GetParent() const
const std::string & GetName() const
Get display name.
std::size_t GetChildCount() const
Get child count.
std::size_t GetRow() const
NodeType GetType() const
Get node type.
const FrameInfo * GetFrame() const
Get frame payload if node is frame.
Describes one CAN frame from a DBC file.
Describes one signal inside a DBC frame.
Created: 2026-03-13 Author: Deeaitch (Dim. Himro)
NodeType
Type of a tree node.