GpgFrontend-Doxygen/docs/latex/DataObjectOperator_8h_source.tex
2022-05-09 03:59:26 +08:00

52 lines
3.7 KiB
TeX

\hypertarget{DataObjectOperator_8h_source}{}\doxysection{Data\+Object\+Operator.\+h}
\label{DataObjectOperator_8h_source}\index{src/core/function/DataObjectOperator.h@{src/core/function/DataObjectOperator.h}}
\begin{DoxyCode}{0}
\DoxyCodeLine{1 }
\DoxyCodeLine{29 \textcolor{preprocessor}{\#ifndef GPGFRONTEND\_DATAOBJECTOPERATOR\_H}}
\DoxyCodeLine{30 \textcolor{preprocessor}{\#define GPGFRONTEND\_DATAOBJECTOPERATOR\_H}}
\DoxyCodeLine{31 }
\DoxyCodeLine{32 \textcolor{preprocessor}{\#include <json/single\_include/nlohmann/json.hpp>}}
\DoxyCodeLine{33 }
\DoxyCodeLine{34 \textcolor{preprocessor}{\#include "{}core/GpgFrontendCore.h"{}}}
\DoxyCodeLine{35 \textcolor{preprocessor}{\#include "{}core/GpgFunctionObject.h"{}}}
\DoxyCodeLine{36 \textcolor{preprocessor}{\#include "{}core/function/GlobalSettingStation.h"{}}}
\DoxyCodeLine{37 }
\DoxyCodeLine{38 \textcolor{keyword}{namespace }\mbox{\hyperlink{namespaceGpgFrontend}{GpgFrontend}} \{}
\DoxyCodeLine{39 }
\DoxyCodeLine{40 \textcolor{keyword}{class }GPGFRONTEND\_CORE\_EXPORT \mbox{\hyperlink{classGpgFrontend_1_1DataObjectOperator}{DataObjectOperator}}}
\DoxyCodeLine{41 : \textcolor{keyword}{public} \mbox{\hyperlink{classGpgFrontend_1_1SingletonFunctionObject}{SingletonFunctionObject}}<DataObjectOperator> \{}
\DoxyCodeLine{42 \textcolor{keyword}{public}:}
\DoxyCodeLine{48 \textcolor{keyword}{explicit} \mbox{\hyperlink{classGpgFrontend_1_1DataObjectOperator}{DataObjectOperator}}(}
\DoxyCodeLine{49 \textcolor{keywordtype}{int} channel = \mbox{\hyperlink{classGpgFrontend_1_1SingletonFunctionObject_a50e2b3794d6553f4231eaec72d9d0a50}{SingletonFunctionObject::GetDefaultChannel}}());}
\DoxyCodeLine{50 }
\DoxyCodeLine{51 std::string SaveDataObj(\textcolor{keyword}{const} std::string \&\_key, \textcolor{keyword}{const} nlohmann::json \&value);}
\DoxyCodeLine{52 }
\DoxyCodeLine{53 std::optional<nlohmann::json> GetDataObject(\textcolor{keyword}{const} std::string \&\_key);}
\DoxyCodeLine{54 }
\DoxyCodeLine{55 std::optional<nlohmann::json> GetDataObjectByRef(\textcolor{keyword}{const} std::string \&\_ref);}
\DoxyCodeLine{56 }
\DoxyCodeLine{57 \textcolor{keyword}{private}:}
\DoxyCodeLine{62 \textcolor{keywordtype}{void} init\_app\_secure\_key();}
\DoxyCodeLine{63 }
\DoxyCodeLine{64 \mbox{\hyperlink{classGpgFrontend_1_1GlobalSettingStation}{GlobalSettingStation}} \&global\_setting\_station\_ =}
\DoxyCodeLine{65 \mbox{\hyperlink{classGpgFrontend_1_1SingletonFunctionObject_a8a378452876a685af879e04bfa456b6f}{GlobalSettingStation::GetInstance}}(); }
\DoxyCodeLine{66 std::filesystem::path app\_secure\_path\_ =}
\DoxyCodeLine{67 global\_setting\_station\_.GetAppConfigPath() /}
\DoxyCodeLine{68 \textcolor{stringliteral}{"{}secure"{}}; }
\DoxyCodeLine{69 std::filesystem::path app\_secure\_key\_path\_ =}
\DoxyCodeLine{70 app\_secure\_path\_ / \textcolor{stringliteral}{"{}app.key"{}}; }
\DoxyCodeLine{71 std::filesystem::path app\_data\_objs\_path\_ =}
\DoxyCodeLine{72 global\_setting\_station\_.GetAppDataPath() / \textcolor{stringliteral}{"{}data\_objs"{}}; }
\DoxyCodeLine{75 }
\DoxyCodeLine{76 std::random\_device \mbox{\hyperlink{classGpgFrontend_1_1DataObjectOperator_a24c9cdbe9256e332ac93d6dc28c76b90}{rd\_}}; }
\DoxyCodeLine{77 std::mt19937 mt\_ = std::mt19937(rd\_()); }
\DoxyCodeLine{78 QByteArray \mbox{\hyperlink{classGpgFrontend_1_1DataObjectOperator_ae409c3562c3e08931daa17f5790c508b}{hash\_key\_}}; }
\DoxyCodeLine{79 \};}
\DoxyCodeLine{80 }
\DoxyCodeLine{81 \} \textcolor{comment}{// namespace GpgFrontend}}
\DoxyCodeLine{82 }
\DoxyCodeLine{83 \textcolor{preprocessor}{\#endif }\textcolor{comment}{// GPGFRONTEND\_DATAOBJECTOPERATOR\_H}}
\end{DoxyCode}