15 : m_type(
NodeType::Root), m_name(
"dbc"), m_children(), m_frame(), m_signal() {
19 : m_type(
NodeType::Frame), m_name(frame.name), m_children(), m_frame(new
FrameInfo(frame)), m_signal() {
23 : m_type(
NodeType::Signal), m_name(signal.name), m_children(), m_frame(), m_signal(new
SignalInfo(signal)) {
28 m_children.push_back(std::move(child));
32 return m_children.size();
36 if (index >= m_children.size())
39 return m_children[index].get();
43 if (index >= m_children.size())
46 return m_children[index].get();
62 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 std::string & GetName() const
Get display name.
std::size_t GetChildCount() const
Get child count.
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.