\hypertarget{a02510}{\section{Open\+Flipper/common/\+Types.cc File Reference}
\label{a02510}\index{Open\+Flipper/common/\+Types.\+cc@{Open\+Flipper/common/\+Types.\+cc}}
}
{\ttfamily \#include \char`\"{}Types\+Internal.\+hh\char`\"{}}\\*
{\ttfamily \#include $<$Open\+Flipper/common/\+Global\+Options.\+hh$>$}\\*
{\ttfamily \#include $<$Open\+Flipper/\+Base\+Plugin/\+Logging\+Interface.\+hh$>$}\\*
{\ttfamily \#include $<$Q\+Core\+Application$>$}\\*
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a02510_ab24df143e7e3f228eb249f5878dc1881}{std\+::ostream \& {\bfseries operator$<$$<$} (std\+::ostream \&stream, \hyperlink{a00477}{Data\+Type} type)}\label{a02510_ab24df143e7e3f228eb249f5878dc1881}

\item 
\hypertarget{a02510_ae068ad4ae8e02ef3e6ec688217124b36}{void {\bfseries initialize\+Types} ()}\label{a02510_ae068ad4ae8e02ef3e6ec688217124b36}

\item 
\hyperlink{a00477}{Data\+Type} \hyperlink{a02510_a1a2de0c23e1eb00146d58a75b1a877e0}{add\+Data\+Type} (Q\+String \+\_\+name, Q\+String \+\_\+readable\+Name)
\begin{DoxyCompactList}\small\item\em Adds a datatype and returns the id for the new type. \end{DoxyCompactList}\item 
\hyperlink{a00477}{Data\+Type} \hyperlink{a02510_a1109336c14463d8aac9527d02a86d4ef}{type\+Id} (Q\+String \+\_\+name)
\begin{DoxyCompactList}\small\item\em Get the id of a type with given name. \end{DoxyCompactList}\item 
Q\+String \hyperlink{a02510_a3e7e15b9e3323948f062f192d5bc8f1f}{type\+Name} (\hyperlink{a00477}{Data\+Type} \+\_\+id)
\begin{DoxyCompactList}\small\item\em Get the name of a type with given id. \end{DoxyCompactList}\item 
bool \hyperlink{a02510_a1f439cc1c000a8277160549d9418f96c}{type\+Exists} (Q\+String \+\_\+name)
\begin{DoxyCompactList}\small\item\em Check if a type with the given name exists. \end{DoxyCompactList}\item 
size\+\_\+t \hyperlink{a02510_ad269c09195861c9d295d8214a062b155}{type\+Count} ()
\begin{DoxyCompactList}\small\item\em Return the number of registered types. \end{DoxyCompactList}\item 
std\+::vector$<$ \hyperlink{a01354}{Type\+Info} $>$\\*
\+::const\+\_\+iterator \hyperlink{a02510_affe56a69357224816a0168ad289c72e1}{types\+Begin} ()
\begin{DoxyCompactList}\small\item\em Get iterator pointing to the first element in the tyoes list. \end{DoxyCompactList}\item 
std\+::vector$<$ \hyperlink{a01354}{Type\+Info} $>$\\*
\+::const\+\_\+iterator \hyperlink{a02510_a4f0b2efb496d7c5e76fa38124f127eaf}{types\+End} ()
\begin{DoxyCompactList}\small\item\em Get iterator pointing to the last element in the tyoes list. \end{DoxyCompactList}\item 
Q\+String \hyperlink{a02510_aae1c196e17e0ce7fca0b3e7d03ce452e}{type\+Icon\+Name} (Q\+String \+\_\+name)
\begin{DoxyCompactList}\small\item\em Get the icon of a given data\+Type. \end{DoxyCompactList}\item 
Q\+String \hyperlink{a02510_aa3048140aecc7c14c44684656b4d7772}{type\+Icon\+Name} (\hyperlink{a00477}{Data\+Type} \+\_\+id)
\begin{DoxyCompactList}\small\item\em get the icon of a given data\+Type \end{DoxyCompactList}\item 
Q\+Icon \& \hyperlink{a02510_a60f680a9a94ac833fab1aab1820af99b}{type\+Icon} (\hyperlink{a00477}{Data\+Type} \+\_\+id)
\begin{DoxyCompactList}\small\item\em get the icon of a given data\+Type \end{DoxyCompactList}\item 
void \hyperlink{a02510_a2eaed7f07a023bde3085f471d19f5c28}{set\+Type\+Icon} (\hyperlink{a00477}{Data\+Type} \+\_\+id, Q\+String \+\_\+icon)
\begin{DoxyCompactList}\small\item\em Set the icon for a given data\+Type. \end{DoxyCompactList}\item 
void \hyperlink{a02510_a67c3e0c037a37de8f131fe0c85170656}{set\+Type\+Icon} (Q\+String \+\_\+name, Q\+String \+\_\+icon)
\begin{DoxyCompactList}\small\item\em Set the icon for a given data\+Type. \end{DoxyCompactList}\item 
Q\+String \hyperlink{a02510_a330a613aba97102ac00468c085402646}{data\+Type\+Name} (\hyperlink{a00477}{Data\+Type} \+\_\+id)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{a00477}{Data\+Type} Human readable name ( this name might change. Use the type\+Name insted! ) \end{DoxyCompactList}\item 
Q\+String \hyperlink{a02510_ab800f2c79e5055345595af7797c7fcf3}{data\+Type\+Name} (Q\+String \+\_\+type\+Name)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{a00477}{Data\+Type} Human readable name ( this name might change. Use the type\+Name insted! ) \end{DoxyCompactList}\item 
void \hyperlink{a02510_a94887aa4daff69c79f02c93b76cf8118}{set\+Data\+Type\+Name} (\hyperlink{a00477}{Data\+Type} \+\_\+id, Q\+String \+\_\+name)
\begin{DoxyCompactList}\small\item\em Set the icon for a given data\+Type. \end{DoxyCompactList}\item 
void \hyperlink{a02510_aaa24579f96c87cddf958ddee9e7b5dac}{set\+Data\+Type\+Name} (Q\+String \+\_\+type\+Name, Q\+String \+\_\+name)
\begin{DoxyCompactList}\small\item\em Set the icon for a given data\+Type. \end{DoxyCompactList}\item 
void \hyperlink{a02510_a531863cc61af9b1f10e07cb4c9d8b540}{register\+Types} ()
\end{DoxyCompactItemize}


\subsection{Detailed Description}
This File contains the basic functions to handle datatypes 

Definition in file \hyperlink{a02510_source}{Types.\+cc}.



\subsection{Function Documentation}
\hypertarget{a02510_a1a2de0c23e1eb00146d58a75b1a877e0}{\index{Types.\+cc@{Types.\+cc}!add\+Data\+Type@{add\+Data\+Type}}
\index{add\+Data\+Type@{add\+Data\+Type}!Types.\+cc@{Types.\+cc}}
\subsubsection[{add\+Data\+Type}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Data\+Type} add\+Data\+Type (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+name, }
\item[{Q\+String}]{\+\_\+readable\+Name}
\end{DoxyParamCaption}
)}}\label{a02510_a1a2de0c23e1eb00146d58a75b1a877e0}


Adds a datatype and returns the id for the new type. 

Adds a datatype and returns the id for the new type


\begin{DoxyParams}{Parameters}
{\em \+\_\+name} & Internal name for the new \hyperlink{a00477}{Data\+Type} \\
\hline
{\em \+\_\+readable\+Name} & Human readable Name for this type ( Use tr to make it translatable ) \\
\hline
\end{DoxyParams}


Definition at line 128 of file Types.\+cc.

\hypertarget{a02510_a330a613aba97102ac00468c085402646}{\index{Types.\+cc@{Types.\+cc}!data\+Type\+Name@{data\+Type\+Name}}
\index{data\+Type\+Name@{data\+Type\+Name}!Types.\+cc@{Types.\+cc}}
\subsubsection[{data\+Type\+Name}]{\setlength{\rightskip}{0pt plus 5cm}Q\+String data\+Type\+Name (
\begin{DoxyParamCaption}
\item[{{\bf Data\+Type}}]{\+\_\+id}
\end{DoxyParamCaption}
)}}\label{a02510_a330a613aba97102ac00468c085402646}


Get \hyperlink{a00477}{Data\+Type} Human readable name ( this name might change. Use the type\+Name insted! ) 

Get \hyperlink{a00477}{Data\+Type} Human readable name ( this name might change. Use the type\+Name instead! ) 

Definition at line 263 of file Types.\+cc.

\hypertarget{a02510_ab800f2c79e5055345595af7797c7fcf3}{\index{Types.\+cc@{Types.\+cc}!data\+Type\+Name@{data\+Type\+Name}}
\index{data\+Type\+Name@{data\+Type\+Name}!Types.\+cc@{Types.\+cc}}
\subsubsection[{data\+Type\+Name}]{\setlength{\rightskip}{0pt plus 5cm}Q\+String data\+Type\+Name (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+type\+Name}
\end{DoxyParamCaption}
)}}\label{a02510_ab800f2c79e5055345595af7797c7fcf3}


Get \hyperlink{a00477}{Data\+Type} Human readable name ( this name might change. Use the type\+Name insted! ) 

Get \hyperlink{a00477}{Data\+Type} Human readable name ( this name might change. Use the type\+Name instead! ) 

Definition at line 276 of file Types.\+cc.

\hypertarget{a02510_a531863cc61af9b1f10e07cb4c9d8b540}{\index{Types.\+cc@{Types.\+cc}!register\+Types@{register\+Types}}
\index{register\+Types@{register\+Types}!Types.\+cc@{Types.\+cc}}
\subsubsection[{register\+Types}]{\setlength{\rightskip}{0pt plus 5cm}void register\+Types (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{a02510_a531863cc61af9b1f10e07cb4c9d8b540}
Registers datatypes on runtime for signal/slots 

Definition at line 433 of file Types.\+cc.

\hypertarget{a02510_a94887aa4daff69c79f02c93b76cf8118}{\index{Types.\+cc@{Types.\+cc}!set\+Data\+Type\+Name@{set\+Data\+Type\+Name}}
\index{set\+Data\+Type\+Name@{set\+Data\+Type\+Name}!Types.\+cc@{Types.\+cc}}
\subsubsection[{set\+Data\+Type\+Name}]{\setlength{\rightskip}{0pt plus 5cm}void set\+Data\+Type\+Name (
\begin{DoxyParamCaption}
\item[{{\bf Data\+Type}}]{\+\_\+id, }
\item[{Q\+String}]{\+\_\+name}
\end{DoxyParamCaption}
)}}\label{a02510_a94887aa4daff69c79f02c93b76cf8118}


Set the icon for a given data\+Type. 

Set \hyperlink{a00477}{Data\+Type} Human readable name. 

Definition at line 291 of file Types.\+cc.

\hypertarget{a02510_aaa24579f96c87cddf958ddee9e7b5dac}{\index{Types.\+cc@{Types.\+cc}!set\+Data\+Type\+Name@{set\+Data\+Type\+Name}}
\index{set\+Data\+Type\+Name@{set\+Data\+Type\+Name}!Types.\+cc@{Types.\+cc}}
\subsubsection[{set\+Data\+Type\+Name}]{\setlength{\rightskip}{0pt plus 5cm}void set\+Data\+Type\+Name (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+type\+Name, }
\item[{Q\+String}]{\+\_\+name}
\end{DoxyParamCaption}
)}}\label{a02510_aaa24579f96c87cddf958ddee9e7b5dac}


Set the icon for a given data\+Type. 

Set \hyperlink{a00477}{Data\+Type} Human readable name. 

Definition at line 302 of file Types.\+cc.

\hypertarget{a02510_a2eaed7f07a023bde3085f471d19f5c28}{\index{Types.\+cc@{Types.\+cc}!set\+Type\+Icon@{set\+Type\+Icon}}
\index{set\+Type\+Icon@{set\+Type\+Icon}!Types.\+cc@{Types.\+cc}}
\subsubsection[{set\+Type\+Icon}]{\setlength{\rightskip}{0pt plus 5cm}void set\+Type\+Icon (
\begin{DoxyParamCaption}
\item[{{\bf Data\+Type}}]{\+\_\+id, }
\item[{Q\+String}]{\+\_\+icon}
\end{DoxyParamCaption}
)}}\label{a02510_a2eaed7f07a023bde3085f471d19f5c28}


Set the icon for a given data\+Type. 

Set an Icon for a given \hyperlink{a00477}{Data\+Type}. 

Definition at line 234 of file Types.\+cc.

\hypertarget{a02510_a67c3e0c037a37de8f131fe0c85170656}{\index{Types.\+cc@{Types.\+cc}!set\+Type\+Icon@{set\+Type\+Icon}}
\index{set\+Type\+Icon@{set\+Type\+Icon}!Types.\+cc@{Types.\+cc}}
\subsubsection[{set\+Type\+Icon}]{\setlength{\rightskip}{0pt plus 5cm}void set\+Type\+Icon (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+name, }
\item[{Q\+String}]{\+\_\+icon}
\end{DoxyParamCaption}
)}}\label{a02510_a67c3e0c037a37de8f131fe0c85170656}


Set the icon for a given data\+Type. 

Set an Icon for a given \hyperlink{a00477}{Data\+Type}. 

Definition at line 248 of file Types.\+cc.

\hypertarget{a02510_ad269c09195861c9d295d8214a062b155}{\index{Types.\+cc@{Types.\+cc}!type\+Count@{type\+Count}}
\index{type\+Count@{type\+Count}!Types.\+cc@{Types.\+cc}}
\subsubsection[{type\+Count}]{\setlength{\rightskip}{0pt plus 5cm}size\+\_\+t type\+Count (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{a02510_ad269c09195861c9d295d8214a062b155}


Return the number of registered types. 

Get the number of registered types. 

Definition at line 186 of file Types.\+cc.

\hypertarget{a02510_a1f439cc1c000a8277160549d9418f96c}{\index{Types.\+cc@{Types.\+cc}!type\+Exists@{type\+Exists}}
\index{type\+Exists@{type\+Exists}!Types.\+cc@{Types.\+cc}}
\subsubsection[{type\+Exists}]{\setlength{\rightskip}{0pt plus 5cm}bool type\+Exists (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+name}
\end{DoxyParamCaption}
)}}\label{a02510_a1f439cc1c000a8277160549d9418f96c}


Check if a type with the given name exists. 



Definition at line 180 of file Types.\+cc.

\hypertarget{a02510_a60f680a9a94ac833fab1aab1820af99b}{\index{Types.\+cc@{Types.\+cc}!type\+Icon@{type\+Icon}}
\index{type\+Icon@{type\+Icon}!Types.\+cc@{Types.\+cc}}
\subsubsection[{type\+Icon}]{\setlength{\rightskip}{0pt plus 5cm}Q\+Icon\& type\+Icon (
\begin{DoxyParamCaption}
\item[{{\bf Data\+Type}}]{\+\_\+id}
\end{DoxyParamCaption}
)}}\label{a02510_a60f680a9a94ac833fab1aab1820af99b}


get the icon of a given data\+Type 

Get an Q\+Icon associated with the given \hyperlink{a00477}{Data\+Type}. 

Definition at line 223 of file Types.\+cc.

\hypertarget{a02510_aae1c196e17e0ce7fca0b3e7d03ce452e}{\index{Types.\+cc@{Types.\+cc}!type\+Icon\+Name@{type\+Icon\+Name}}
\index{type\+Icon\+Name@{type\+Icon\+Name}!Types.\+cc@{Types.\+cc}}
\subsubsection[{type\+Icon\+Name}]{\setlength{\rightskip}{0pt plus 5cm}Q\+String type\+Icon\+Name (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+name}
\end{DoxyParamCaption}
)}}\label{a02510_aae1c196e17e0ce7fca0b3e7d03ce452e}


Get the icon of a given data\+Type. 

Get a string with the filename of the icon for the \hyperlink{a00477}{Data\+Type} name. 

Definition at line 201 of file Types.\+cc.

\hypertarget{a02510_aa3048140aecc7c14c44684656b4d7772}{\index{Types.\+cc@{Types.\+cc}!type\+Icon\+Name@{type\+Icon\+Name}}
\index{type\+Icon\+Name@{type\+Icon\+Name}!Types.\+cc@{Types.\+cc}}
\subsubsection[{type\+Icon\+Name}]{\setlength{\rightskip}{0pt plus 5cm}Q\+String type\+Icon\+Name (
\begin{DoxyParamCaption}
\item[{{\bf Data\+Type}}]{\+\_\+id}
\end{DoxyParamCaption}
)}}\label{a02510_aa3048140aecc7c14c44684656b4d7772}


get the icon of a given data\+Type 

Get a string with the filename of the icon for the \hyperlink{a00477}{Data\+Type}. 

Definition at line 212 of file Types.\+cc.

\hypertarget{a02510_a1109336c14463d8aac9527d02a86d4ef}{\index{Types.\+cc@{Types.\+cc}!type\+Id@{type\+Id}}
\index{type\+Id@{type\+Id}!Types.\+cc@{Types.\+cc}}
\subsubsection[{type\+Id}]{\setlength{\rightskip}{0pt plus 5cm}{\bf Data\+Type} type\+Id (
\begin{DoxyParamCaption}
\item[{Q\+String}]{\+\_\+name}
\end{DoxyParamCaption}
)}}\label{a02510_a1109336c14463d8aac9527d02a86d4ef}


Get the id of a type with given name. 

Given a data\+Type Identifier string this function will return the id of the datatype. 

Definition at line 150 of file Types.\+cc.

\hypertarget{a02510_a3e7e15b9e3323948f062f192d5bc8f1f}{\index{Types.\+cc@{Types.\+cc}!type\+Name@{type\+Name}}
\index{type\+Name@{type\+Name}!Types.\+cc@{Types.\+cc}}
\subsubsection[{type\+Name}]{\setlength{\rightskip}{0pt plus 5cm}Q\+String type\+Name (
\begin{DoxyParamCaption}
\item[{{\bf Data\+Type}}]{\+\_\+id}
\end{DoxyParamCaption}
)}}\label{a02510_a3e7e15b9e3323948f062f192d5bc8f1f}


Get the name of a type with given id. 

The ids are organized in a bitfield. So use either the macro for getting the type id or use the id directly (they have to be power of 2! ... Bitfield) 

Definition at line 165 of file Types.\+cc.

\hypertarget{a02510_affe56a69357224816a0168ad289c72e1}{\index{Types.\+cc@{Types.\+cc}!types\+Begin@{types\+Begin}}
\index{types\+Begin@{types\+Begin}!Types.\+cc@{Types.\+cc}}
\subsubsection[{types\+Begin}]{\setlength{\rightskip}{0pt plus 5cm}std\+::vector$<$ {\bf Type\+Info} $>$\+::const\+\_\+iterator types\+Begin (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{a02510_affe56a69357224816a0168ad289c72e1}


Get iterator pointing to the first element in the tyoes list. 

Get iterator pointing to the first element in the types list. 

Definition at line 191 of file Types.\+cc.

\hypertarget{a02510_a4f0b2efb496d7c5e76fa38124f127eaf}{\index{Types.\+cc@{Types.\+cc}!types\+End@{types\+End}}
\index{types\+End@{types\+End}!Types.\+cc@{Types.\+cc}}
\subsubsection[{types\+End}]{\setlength{\rightskip}{0pt plus 5cm}std\+::vector$<$ {\bf Type\+Info} $>$\+::const\+\_\+iterator types\+End (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}}\label{a02510_a4f0b2efb496d7c5e76fa38124f127eaf}


Get iterator pointing to the last element in the tyoes list. 

Get iterator pointing to the last element in the types list. 

Definition at line 196 of file Types.\+cc.

