110 lines
15 KiB
TeX
110 lines
15 KiB
TeX
\doxysection{DObject.\+h}
|
|
\hypertarget{_d_object_8h_source}{}\label{_d_object_8h_source}\index{src/dobj/public/DObject.h@{src/dobj/public/DObject.h}}
|
|
\mbox{\hyperlink{_d_object_8h}{Go to the documentation of this file.}}
|
|
\begin{DoxyCode}{0}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00001}00001\ \textcolor{comment}{/*\ ***********************************************************************}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00002}00002\ \textcolor{comment}{//}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00003}00003\ \textcolor{comment}{//\ \ \ Copyright\ (C)\ 2025\ -\/-\/\ The\ 4D-\/STAR\ Collaboration}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00004}00004\ \textcolor{comment}{//\ \ \ File\ Author:\ Emily\ Boudreaux}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00005}00005\ \textcolor{comment}{//\ \ \ Last\ Modified:\ March\ 17,\ 2025}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00006}00006\ \textcolor{comment}{//}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00007}00007\ \textcolor{comment}{//\ \ \ 4DSSE\ is\ free\ software;\ you\ can\ use\ it\ and/or\ modify}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00008}00008\ \textcolor{comment}{//\ \ \ it\ under\ the\ terms\ and\ restrictions\ the\ GNU\ General\ Library\ Public}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00009}00009\ \textcolor{comment}{//\ \ \ License\ version\ 3\ (GPLv3)\ as\ published\ by\ the\ Free\ Software\ Foundation.}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00010}00010\ \textcolor{comment}{//}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00011}00011\ \textcolor{comment}{//\ \ \ 4DSSE\ is\ distributed\ in\ the\ hope\ that\ it\ will\ be\ useful,}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00012}00012\ \textcolor{comment}{//\ \ \ but\ WITHOUT\ ANY\ WARRANTY;\ without\ even\ the\ implied\ warranty\ of}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00013}00013\ \textcolor{comment}{//\ \ \ MERCHANTABILITY\ or\ FITNESS\ FOR\ A\ PARTICULAR\ PURPOSE.}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00014}00014\ \textcolor{comment}{//\ \ \ See\ the\ GNU\ Library\ General\ Public\ License\ for\ more\ details.}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00015}00015\ \textcolor{comment}{//}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00016}00016\ \textcolor{comment}{//\ \ \ You\ should\ have\ received\ a\ copy\ of\ the\ GNU\ Library\ General\ Public\ License}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00017}00017\ \textcolor{comment}{//\ \ \ along\ with\ this\ software;\ if\ not,\ write\ to\ the\ Free\ Software}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00018}00018\ \textcolor{comment}{//\ \ \ Foundation,\ Inc.,\ 59\ Temple\ Place,\ Suite\ 330,\ Boston,\ MA\ 02111-\/1307\ USA}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00019}00019\ \textcolor{comment}{//}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00020}00020\ \textcolor{comment}{//\ ***********************************************************************\ */}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00021}00021\ \textcolor{preprocessor}{\#ifndef\ DOBJECT\_H}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00022}00022\ \textcolor{preprocessor}{\#define\ DOBJECT\_H}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00023}00023\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00024}00024\ \textcolor{preprocessor}{\#include\ <variant>}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00025}00025\ \textcolor{preprocessor}{\#include\ <memory>}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00026}00026\ \textcolor{preprocessor}{\#include\ <vector>}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00027}00027\ \textcolor{preprocessor}{\#include\ <string>}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00028}00028\ \textcolor{preprocessor}{\#include\ <mutex>}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00029}00029\ \textcolor{preprocessor}{\#include\ <map>}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00030}00030\ \textcolor{preprocessor}{\#include\ <functional>}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00031}00031\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00040}00040\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00089}\mbox{\hyperlink{class_d_object}{00089}}\ \textcolor{keyword}{class\ }\mbox{\hyperlink{class_d_object_a0ae54853e18265657296bfb5ac3bf9d0}{DObject}}\ \{}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00090}00090\ \textcolor{keyword}{public}:}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00097}\mbox{\hyperlink{class_d_object_a55b7cdac36a3a518ba6e1ecef0e25dcd}{00097}}\ \ \ \ \ \textcolor{keyword}{using\ }\mbox{\hyperlink{class_d_object_a55b7cdac36a3a518ba6e1ecef0e25dcd}{DataType}}\ =\ std::variant<}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00098}00098\ \ \ \ \ \ \ \ \ bool,\ \textcolor{keywordtype}{short}\ int,\ int,\ \textcolor{keywordtype}{long}\ int,\ float,\ double,\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00099}00099\ \ \ \ \ \ \ \ \ \textcolor{keywordtype}{long}\ double,\ std::string,\ std::monostate,\ std::vector<int>,}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00100}00100\ \ \ \ \ \ \ \ \ std::vector<float>,\ std::vector<double>,\ std::vector<std::string>,}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00101}00101\ \ \ \ \ \ \ \ \ std::vector<std::vector<int>>,\ std::vector<std::vector<float>>,}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00102}00102\ \ \ \ \ \ \ \ \ std::vector<std::vector<double>>,}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00103}00103\ \ \ \ \ \ \ \ \ std::vector<std::vector<std::vector<int>>>,}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00104}00104\ \ \ \ \ \ \ \ \ std::vector<std::vector<std::vector<float>>>,}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00105}00105\ \ \ \ \ \ \ \ \ std::vector<std::vector<std::vector<double>>>}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00106}00106\ \ \ \ \ >;}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00107}00107\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00108}00108\ \ \ \ \ \textcolor{comment}{//\ Mapping\ of\ data\ types\ to\ their\ string\ representations}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00109}\mbox{\hyperlink{class_d_object_a358d5f015da09ae5f0cbb46f3fd9e401}{00109}}\ \ \ \ \ std::map<int,\ std::string>\ \mbox{\hyperlink{class_d_object_a358d5f015da09ae5f0cbb46f3fd9e401}{dataTypeMap}}\ =\ \{}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00110}00110\ \ \ \ \ \ \ \ \ \{0,\ \textcolor{stringliteral}{"{}bool"{}}\},\ \{1,\ \textcolor{stringliteral}{"{}short\ int"{}}\},\ \{2,\ \textcolor{stringliteral}{"{}int"{}}\},\ \{3,\ \textcolor{stringliteral}{"{}long\ int"{}}\},\ \{4,\ \textcolor{stringliteral}{"{}float"{}}\},}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00111}00111\ \ \ \ \ \ \ \ \ \{5,\ \textcolor{stringliteral}{"{}double"{}}\},\ \{6,\ \textcolor{stringliteral}{"{}long\ double"{}}\},\ \{7,\ \textcolor{stringliteral}{"{}string"{}}\},\ \{8,\ \textcolor{stringliteral}{"{}std::monostate"{}}\},}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00112}00112\ \ \ \ \ \ \ \ \ \{9,\ \textcolor{stringliteral}{"{}vector<int>"{}}\},\ \{10,\ \textcolor{stringliteral}{"{}vector<float>"{}}\},\ \{11,\ \textcolor{stringliteral}{"{}vector<double>"{}}\},}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00113}00113\ \ \ \ \ \ \ \ \ \{12,\ \textcolor{stringliteral}{"{}vector<string>"{}}\},\ \{13,\ \textcolor{stringliteral}{"{}vector<vector<int>"{}}\},}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00114}00114\ \ \ \ \ \ \ \ \ \{14,\ \textcolor{stringliteral}{"{}vector<vector<float>"{}}\},\ \{15,\ \textcolor{stringliteral}{"{}vector<vector<double>"{}}\},}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00115}00115\ \ \ \ \ \ \ \ \ \{16,\ \textcolor{stringliteral}{"{}vector<vector<vector<int>>"{}}\},\ \{17,\ \textcolor{stringliteral}{"{}vector<vector<vector<float>>"{}}\},}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00116}00116\ \ \ \ \ \ \ \ \ \{18,\ \textcolor{stringliteral}{"{}vector<vector<vector<double>>"{}}\}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00117}00117\ \ \ \ \ \};}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00118}00118\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00119}00119\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00125}\mbox{\hyperlink{class_d_object_af11334d08ef85c68b3aae7554548e5a7}{00125}}\ \ \ \ \ \textcolor{keyword}{using\ }\mbox{\hyperlink{class_d_object_af11334d08ef85c68b3aae7554548e5a7}{Plugin}}\ =\ std::function<void(\mbox{\hyperlink{class_d_object_a0ae54853e18265657296bfb5ac3bf9d0}{DObject}}\&)>;}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00126}00126\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00132}00132\ \ \ \ \ \mbox{\hyperlink{class_d_object_a0ae54853e18265657296bfb5ac3bf9d0}{DObject}}();}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00133}00133\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00139}00139\ \ \ \ \ \mbox{\hyperlink{class_d_object_a0ae54853e18265657296bfb5ac3bf9d0}{DObject}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_d_object_a55b7cdac36a3a518ba6e1ecef0e25dcd}{DataType}}\&\ data);}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00140}00140\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00148}00148\ \ \ \ \ \textcolor{keyword}{const}\ \mbox{\hyperlink{class_d_object_a55b7cdac36a3a518ba6e1ecef0e25dcd}{DataType}}\&\ \mbox{\hyperlink{class_d_object_a4862655c3634d019b0a45b811d6f7235}{getData}}()\ const\ noexcept;}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00149}00149\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00155}00155\ \ \ \ \ template\ <typename\ T>}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00156}\mbox{\hyperlink{class_d_object_aca2db093c1c8c6f7893de07544aed619}{00156}}\ \ \ \ \ T\ \mbox{\hyperlink{class_d_object_aca2db093c1c8c6f7893de07544aed619}{getDataAs}}()\textcolor{keyword}{\ const\ }\{}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00157}00157\ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{if}\ (std::holds\_alternative<T>(\mbox{\hyperlink{class_d_object_ad7ba02f6d87ce64792149096f3310b21}{data\_}}))\ \{}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00158}00158\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{return}\ std::get<T>(\mbox{\hyperlink{class_d_object_ad7ba02f6d87ce64792149096f3310b21}{data\_}});}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00159}00159\ \ \ \ \ \ \ \ \ \}\ \textcolor{keywordflow}{else}\ \{}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00160}00160\ \ \ \ \ \ \ \ \ \ \ \ \ \textcolor{keywordflow}{throw}\ std::bad\_variant\_access();}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00161}00161\ \ \ \ \ \ \ \ \ \}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00162}00162\ \ \ \ \ \}}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00163}00163\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00171}00171\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_d_object_ab1718571434e84e90f1ec463e4786a8a}{setData}}(\textcolor{keyword}{const}\ \mbox{\hyperlink{class_d_object_a55b7cdac36a3a518ba6e1ecef0e25dcd}{DataType}}\&\ data);}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00172}00172\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00180}00180\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_d_object_a6f0023aee463e71d92442dcf61b6ed47}{setDebugging}}(\textcolor{keywordtype}{bool}\ enableDebug);}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00181}00181\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00187}00187\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_d_object_ae47bf220fbe2173cf6933c2380035dbd}{isDebuggingEnabled}}()\ const\ noexcept;}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00188}00188\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00194}00194\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_d_object_a3dce47a519f9da5085c0c5ac1eea4f38}{setErrorCode}}(\textcolor{keywordtype}{int}\ code)\ noexcept;}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00195}00195\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00201}00201\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_d_object_afa8926d916081de72478cb8813c25e98}{getErrorCode}}()\ const\ noexcept;}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00202}00202\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00203}00203\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00212}00212\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_d_object_a15afffdf339150fc872bf63bdd08d581}{registerPlugin}}(const\ std::\textcolor{keywordtype}{string}\&\ \textcolor{keywordtype}{id},\ \mbox{\hyperlink{class_d_object_af11334d08ef85c68b3aae7554548e5a7}{Plugin}}\ plugin);}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00213}00213\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00221}00221\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_d_object_a99b8688849e11501033a25f61efb8356}{unregisterPlugin}}(const\ std::\textcolor{keywordtype}{string}\&\ \textcolor{keywordtype}{id});}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00222}00222\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00230}00230\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_d_object_a99072eb52bb22745f0248f273fbf28fb}{runPlugin}}(const\ std::\textcolor{keywordtype}{string}\&\ \textcolor{keywordtype}{id});}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00231}00231\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00237}00237\ \ \ \ \ \textcolor{keywordtype}{void}\ \mbox{\hyperlink{class_d_object_a1223275dcbbf20334ea11707346acb93}{runAllPlugins}}();}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00238}00238\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00248}00248\ \ \ \ \ friend\ std::ostream\&\ operator<<(std::ostream\&\ os,\ const\ \mbox{\hyperlink{class_d_object}{DObject}}\&\ obj);}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00249}00249\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00250}00250\ private:}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00251}\mbox{\hyperlink{class_d_object_ad7ba02f6d87ce64792149096f3310b21}{00251}}\ \ \ \ \ \mbox{\hyperlink{class_d_object_a55b7cdac36a3a518ba6e1ecef0e25dcd}{DataType}}\ \mbox{\hyperlink{class_d_object_ad7ba02f6d87ce64792149096f3310b21}{data\_}};\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00252}\mbox{\hyperlink{class_d_object_accf5c10d4afc3969607e11b0055312d5}{00252}}\ \ \ \ \ \textcolor{keywordtype}{bool}\ \mbox{\hyperlink{class_d_object_accf5c10d4afc3969607e11b0055312d5}{debugEnabled\_}}\ =\ false;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00253}\mbox{\hyperlink{class_d_object_ad8de5890e8dae5fc7e72fabca2520fc3}{00253}}\ \ \ \ \ \textcolor{keywordtype}{int}\ \mbox{\hyperlink{class_d_object_ad8de5890e8dae5fc7e72fabca2520fc3}{errorCode\_}}\ =\ 0;\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00254}\mbox{\hyperlink{class_d_object_ae9f7e4d2fbabc076961a40185676e208}{00254}}\ \ \ \ \ std::map<std::\textcolor{keywordtype}{string},\ \mbox{\hyperlink{class_d_object_af11334d08ef85c68b3aae7554548e5a7}{Plugin}}>\ \mbox{\hyperlink{class_d_object_ae9f7e4d2fbabc076961a40185676e208}{plugins\_}};\ \ \ \ \ \ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00255}00255\ \};}
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00256}00256\ }
|
|
\DoxyCodeLine{\Hypertarget{_d_object_8h_source_l00257}00257\ \textcolor{preprocessor}{\#endif\ }\textcolor{comment}{//\ DOBJECT\_H}}
|
|
|
|
\end{DoxyCode}
|