\hypertarget{dbc__tree__builder_8cpp_source}{}\doxysection{dbc\+\_\+tree\+\_\+builder.\+cpp} \mbox{\hyperlink{dbc__tree__builder_8cpp}{Go to the documentation of this file.}} \begin{DoxyCode}{0} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00001}00001 \textcolor{comment}{/**}} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00002}00002 \textcolor{comment}{ * @file dbc\_tree\_builder.cpp}} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00003}00003 \textcolor{comment}{ * @brief}} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00004}00004 \textcolor{comment}{ *}} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00005}00005 \textcolor{comment}{ * Created: 2026-\/03-\/13}} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00006}00006 \textcolor{comment}{ * Author: Deeaitch (Dim. Himro)}} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00007}00007 \textcolor{comment}{ *}} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00008}00008 \textcolor{comment}{ * Licensed under the MIT License.}} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00009}00009 \textcolor{comment}{ * See LICENSE file in the project root for full license text.}} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00010}00010 \textcolor{comment}{ */}} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00011}00011 } \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00012}00012 \textcolor{preprocessor}{\#include "{}\mbox{\hyperlink{dbc__tree__builder_8h}{dbc\_tree\_builder.h}}"{}}} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00013}00013 } \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00014}\mbox{\hyperlink{classDbcTreeBuilder_a7e57d067d831b14b383947fd125edd4b}{00014}} std::unique\_ptr \mbox{\hyperlink{classDbcTreeBuilder_a7e57d067d831b14b383947fd125edd4b}{DbcTreeBuilder::Build}} (\textcolor{keyword}{const} \mbox{\hyperlink{structDbcDatabase}{DbcDatabase}} \&database)\textcolor{keyword}{ const }\{} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00015}00015 std::unique\_ptr root (\textcolor{keyword}{new} \mbox{\hyperlink{classTreeNode}{TreeNode}}());} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00016}00016 } \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00017}00017 \textcolor{keywordflow}{for} (std::size\_t frameIndex = 0U; frameIndex < database.\mbox{\hyperlink{structDbcDatabase_a2cade5d0234ee816132127542f8c612b}{frames}}.size(); ++frameIndex) \{} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00018}00018 \textcolor{keyword}{const} \mbox{\hyperlink{structFrameInfo}{FrameInfo}} \&frame = database.\mbox{\hyperlink{structDbcDatabase_a2cade5d0234ee816132127542f8c612b}{frames}}[frameIndex];} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00019}00019 std::unique\_ptr frameNode (\textcolor{keyword}{new} \mbox{\hyperlink{classTreeNode}{TreeNode}} (frame));} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00020}00020 } \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00021}00021 \textcolor{keywordflow}{for} (std::size\_t signalIndex = 0U; signalIndex < frame.\mbox{\hyperlink{structFrameInfo_a942937027f1af06536f98cc23b2bf6ce}{signals}}.size(); ++signalIndex) \{} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00022}00022 \textcolor{keyword}{const} \mbox{\hyperlink{structSignalInfo}{SignalInfo}} \&signal = frame.\mbox{\hyperlink{structFrameInfo_a942937027f1af06536f98cc23b2bf6ce}{signals}}[signalIndex];} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00023}00023 std::unique\_ptr signalNode (\textcolor{keyword}{new} \mbox{\hyperlink{classTreeNode}{TreeNode}} (signal));} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00024}00024 frameNode-\/>AddChild (std::move (signalNode));} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00025}00025 \}} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00026}00026 } \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00027}00027 root-\/>AddChild (std::move (frameNode));} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00028}00028 \}} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00029}00029 } \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00030}00030 \textcolor{keywordflow}{return} root;} \DoxyCodeLine{\Hypertarget{dbc__tree__builder_8cpp_source_l00031}00031 \}} \end{DoxyCode}