\hypertarget{Types_8cc}{}\section{Open\+Flipper/common/\+Types.cc File Reference}
\label{Types_8cc}\index{Open\+Flipper/common/\+Types.\+cc@{Open\+Flipper/common/\+Types.\+cc}}
{\ttfamily \#include \char`\"{}Types\+Internal.\+hh\char`\"{}}\newline
{\ttfamily \#include $<$Open\+Flipper/common/\+Global\+Options.\+hh$>$}\newline
{\ttfamily \#include $<$Open\+Flipper/\+Base\+Plugin/\+Logging\+Interface.\+hh$>$}\newline
{\ttfamily \#include $<$Q\+Core\+Application$>$}\newline
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{Types_8cc_ab24df143e7e3f228eb249f5878dc1881}\label{Types_8cc_ab24df143e7e3f228eb249f5878dc1881}} 
std\+::ostream \& {\bfseries operator$<$$<$} (std\+::ostream \&stream, \hyperlink{classDataType}{Data\+Type} type)
\item 
\mbox{\Hypertarget{Types_8cc_ae068ad4ae8e02ef3e6ec688217124b36}\label{Types_8cc_ae068ad4ae8e02ef3e6ec688217124b36}} 
void {\bfseries initialize\+Types} ()
\item 
\hyperlink{classDataType}{Data\+Type} \hyperlink{Types_8cc_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{classDataType}{Data\+Type} \hyperlink{Types_8cc_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{Types_8cc_a3e7e15b9e3323948f062f192d5bc8f1f}{type\+Name} (\hyperlink{classDataType}{Data\+Type} \+\_\+id)
\begin{DoxyCompactList}\small\item\em Get the name of a type with given id. \end{DoxyCompactList}\item 
bool \hyperlink{Types_8cc_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{Types_8cc_ad269c09195861c9d295d8214a062b155}{type\+Count} ()
\begin{DoxyCompactList}\small\item\em Return the number of registered types. \end{DoxyCompactList}\item 
std\+::vector$<$ \hyperlink{classTypeInfo}{Type\+Info} $>$\+::const\+\_\+iterator \hyperlink{Types_8cc_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{classTypeInfo}{Type\+Info} $>$\+::const\+\_\+iterator \hyperlink{Types_8cc_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{Types_8cc_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{Types_8cc_aa3048140aecc7c14c44684656b4d7772}{type\+Icon\+Name} (\hyperlink{classDataType}{Data\+Type} \+\_\+id)
\begin{DoxyCompactList}\small\item\em get the icon of a given data\+Type \end{DoxyCompactList}\item 
Q\+Icon \& \hyperlink{Types_8cc_a60f680a9a94ac833fab1aab1820af99b}{type\+Icon} (\hyperlink{classDataType}{Data\+Type} \+\_\+id)
\begin{DoxyCompactList}\small\item\em get the icon of a given data\+Type \end{DoxyCompactList}\item 
void \hyperlink{Types_8cc_a2eaed7f07a023bde3085f471d19f5c28}{set\+Type\+Icon} (\hyperlink{classDataType}{Data\+Type} \+\_\+id, Q\+String \+\_\+icon)
\begin{DoxyCompactList}\small\item\em Set the icon for a given data\+Type. \end{DoxyCompactList}\item 
void \hyperlink{Types_8cc_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{Types_8cc_a330a613aba97102ac00468c085402646}{data\+Type\+Name} (\hyperlink{classDataType}{Data\+Type} \+\_\+id)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{classDataType}{Data\+Type} Human readable name ( this name might change. Use the type\+Name insted! ) \end{DoxyCompactList}\item 
Q\+String \hyperlink{Types_8cc_ab800f2c79e5055345595af7797c7fcf3}{data\+Type\+Name} (Q\+String \+\_\+type\+Name)
\begin{DoxyCompactList}\small\item\em Get \hyperlink{classDataType}{Data\+Type} Human readable name ( this name might change. Use the type\+Name insted! ) \end{DoxyCompactList}\item 
void \hyperlink{Types_8cc_a94887aa4daff69c79f02c93b76cf8118}{set\+Data\+Type\+Name} (\hyperlink{classDataType}{Data\+Type} \+\_\+id, Q\+String \+\_\+name)
\begin{DoxyCompactList}\small\item\em Set the icon for a given data\+Type. \end{DoxyCompactList}\item 
void \hyperlink{Types_8cc_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{Types_8cc_a531863cc61af9b1f10e07cb4c9d8b540}{register\+Types} ()
\end{DoxyCompactItemize}


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

\subsection{Function Documentation}
\mbox{\Hypertarget{Types_8cc_a1a2de0c23e1eb00146d58a75b1a877e0}\label{Types_8cc_a1a2de0c23e1eb00146d58a75b1a877e0}} 
\index{Types.\+cc@{Types.\+cc}!add\+Data\+Type@{add\+Data\+Type}}
\index{add\+Data\+Type@{add\+Data\+Type}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{add\+Data\+Type()}{addDataType()}}
{\footnotesize\ttfamily \hyperlink{classDataType}{Data\+Type} add\+Data\+Type (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+name,  }\item[{Q\+String}]{\+\_\+readable\+Name }\end{DoxyParamCaption})}



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{classDataType}{Data\+Type} \\
\hline
{\em \+\_\+readable\+Name} & Human readable Name for this type ( Use tr to make it translatable ) \\
\hline
\end{DoxyParams}


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

\mbox{\Hypertarget{Types_8cc_a330a613aba97102ac00468c085402646}\label{Types_8cc_a330a613aba97102ac00468c085402646}} 
\index{Types.\+cc@{Types.\+cc}!data\+Type\+Name@{data\+Type\+Name}}
\index{data\+Type\+Name@{data\+Type\+Name}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{data\+Type\+Name()}{dataTypeName()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily Q\+String data\+Type\+Name (\begin{DoxyParamCaption}\item[{\hyperlink{classDataType}{Data\+Type}}]{\+\_\+id }\end{DoxyParamCaption})}



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

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

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

\mbox{\Hypertarget{Types_8cc_ab800f2c79e5055345595af7797c7fcf3}\label{Types_8cc_ab800f2c79e5055345595af7797c7fcf3}} 
\index{Types.\+cc@{Types.\+cc}!data\+Type\+Name@{data\+Type\+Name}}
\index{data\+Type\+Name@{data\+Type\+Name}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{data\+Type\+Name()}{dataTypeName()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Q\+String data\+Type\+Name (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+type\+Name }\end{DoxyParamCaption})}



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

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

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

\mbox{\Hypertarget{Types_8cc_a531863cc61af9b1f10e07cb4c9d8b540}\label{Types_8cc_a531863cc61af9b1f10e07cb4c9d8b540}} 
\index{Types.\+cc@{Types.\+cc}!register\+Types@{register\+Types}}
\index{register\+Types@{register\+Types}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{register\+Types()}{registerTypes()}}
{\footnotesize\ttfamily void register\+Types (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}

Registers datatypes on runtime for signal/slots 

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

\mbox{\Hypertarget{Types_8cc_a94887aa4daff69c79f02c93b76cf8118}\label{Types_8cc_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{\texorpdfstring{set\+Data\+Type\+Name()}{setDataTypeName()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void set\+Data\+Type\+Name (\begin{DoxyParamCaption}\item[{\hyperlink{classDataType}{Data\+Type}}]{\+\_\+id,  }\item[{Q\+String}]{\+\_\+name }\end{DoxyParamCaption})}



Set the icon for a given data\+Type. 

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

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

\mbox{\Hypertarget{Types_8cc_aaa24579f96c87cddf958ddee9e7b5dac}\label{Types_8cc_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{\texorpdfstring{set\+Data\+Type\+Name()}{setDataTypeName()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void set\+Data\+Type\+Name (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+type\+Name,  }\item[{Q\+String}]{\+\_\+name }\end{DoxyParamCaption})}



Set the icon for a given data\+Type. 

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

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

\mbox{\Hypertarget{Types_8cc_a2eaed7f07a023bde3085f471d19f5c28}\label{Types_8cc_a2eaed7f07a023bde3085f471d19f5c28}} 
\index{Types.\+cc@{Types.\+cc}!set\+Type\+Icon@{set\+Type\+Icon}}
\index{set\+Type\+Icon@{set\+Type\+Icon}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{set\+Type\+Icon()}{setTypeIcon()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily void set\+Type\+Icon (\begin{DoxyParamCaption}\item[{\hyperlink{classDataType}{Data\+Type}}]{\+\_\+id,  }\item[{Q\+String}]{\+\_\+icon }\end{DoxyParamCaption})}



Set the icon for a given data\+Type. 

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

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

\mbox{\Hypertarget{Types_8cc_a67c3e0c037a37de8f131fe0c85170656}\label{Types_8cc_a67c3e0c037a37de8f131fe0c85170656}} 
\index{Types.\+cc@{Types.\+cc}!set\+Type\+Icon@{set\+Type\+Icon}}
\index{set\+Type\+Icon@{set\+Type\+Icon}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{set\+Type\+Icon()}{setTypeIcon()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily void set\+Type\+Icon (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+name,  }\item[{Q\+String}]{\+\_\+icon }\end{DoxyParamCaption})}



Set the icon for a given data\+Type. 

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

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

\mbox{\Hypertarget{Types_8cc_ad269c09195861c9d295d8214a062b155}\label{Types_8cc_ad269c09195861c9d295d8214a062b155}} 
\index{Types.\+cc@{Types.\+cc}!type\+Count@{type\+Count}}
\index{type\+Count@{type\+Count}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{type\+Count()}{typeCount()}}
{\footnotesize\ttfamily size\+\_\+t type\+Count (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



Return the number of registered types. 

Get the number of registered types. 

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

\mbox{\Hypertarget{Types_8cc_a1f439cc1c000a8277160549d9418f96c}\label{Types_8cc_a1f439cc1c000a8277160549d9418f96c}} 
\index{Types.\+cc@{Types.\+cc}!type\+Exists@{type\+Exists}}
\index{type\+Exists@{type\+Exists}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{type\+Exists()}{typeExists()}}
{\footnotesize\ttfamily bool type\+Exists (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+name }\end{DoxyParamCaption})}



Check if a type with the given name exists. 



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

\mbox{\Hypertarget{Types_8cc_a60f680a9a94ac833fab1aab1820af99b}\label{Types_8cc_a60f680a9a94ac833fab1aab1820af99b}} 
\index{Types.\+cc@{Types.\+cc}!type\+Icon@{type\+Icon}}
\index{type\+Icon@{type\+Icon}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{type\+Icon()}{typeIcon()}}
{\footnotesize\ttfamily Q\+Icon\& type\+Icon (\begin{DoxyParamCaption}\item[{\hyperlink{classDataType}{Data\+Type}}]{\+\_\+id }\end{DoxyParamCaption})}



get the icon of a given data\+Type 

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

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

\mbox{\Hypertarget{Types_8cc_aae1c196e17e0ce7fca0b3e7d03ce452e}\label{Types_8cc_aae1c196e17e0ce7fca0b3e7d03ce452e}} 
\index{Types.\+cc@{Types.\+cc}!type\+Icon\+Name@{type\+Icon\+Name}}
\index{type\+Icon\+Name@{type\+Icon\+Name}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{type\+Icon\+Name()}{typeIconName()}\hspace{0.1cm}{\footnotesize\ttfamily [1/2]}}
{\footnotesize\ttfamily Q\+String type\+Icon\+Name (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+name }\end{DoxyParamCaption})}



Get the icon of a given data\+Type. 

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

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

\mbox{\Hypertarget{Types_8cc_aa3048140aecc7c14c44684656b4d7772}\label{Types_8cc_aa3048140aecc7c14c44684656b4d7772}} 
\index{Types.\+cc@{Types.\+cc}!type\+Icon\+Name@{type\+Icon\+Name}}
\index{type\+Icon\+Name@{type\+Icon\+Name}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{type\+Icon\+Name()}{typeIconName()}\hspace{0.1cm}{\footnotesize\ttfamily [2/2]}}
{\footnotesize\ttfamily Q\+String type\+Icon\+Name (\begin{DoxyParamCaption}\item[{\hyperlink{classDataType}{Data\+Type}}]{\+\_\+id }\end{DoxyParamCaption})}



get the icon of a given data\+Type 

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

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

\mbox{\Hypertarget{Types_8cc_a1109336c14463d8aac9527d02a86d4ef}\label{Types_8cc_a1109336c14463d8aac9527d02a86d4ef}} 
\index{Types.\+cc@{Types.\+cc}!type\+Id@{type\+Id}}
\index{type\+Id@{type\+Id}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{type\+Id()}{typeId()}}
{\footnotesize\ttfamily \hyperlink{classDataType}{Data\+Type} type\+Id (\begin{DoxyParamCaption}\item[{Q\+String}]{\+\_\+name }\end{DoxyParamCaption})}



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 139 of file Types.\+cc.

\mbox{\Hypertarget{Types_8cc_a3e7e15b9e3323948f062f192d5bc8f1f}\label{Types_8cc_a3e7e15b9e3323948f062f192d5bc8f1f}} 
\index{Types.\+cc@{Types.\+cc}!type\+Name@{type\+Name}}
\index{type\+Name@{type\+Name}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{type\+Name()}{typeName()}}
{\footnotesize\ttfamily Q\+String type\+Name (\begin{DoxyParamCaption}\item[{\hyperlink{classDataType}{Data\+Type}}]{\+\_\+id }\end{DoxyParamCaption})}



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 154 of file Types.\+cc.

\mbox{\Hypertarget{Types_8cc_affe56a69357224816a0168ad289c72e1}\label{Types_8cc_affe56a69357224816a0168ad289c72e1}} 
\index{Types.\+cc@{Types.\+cc}!types\+Begin@{types\+Begin}}
\index{types\+Begin@{types\+Begin}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{types\+Begin()}{typesBegin()}}
{\footnotesize\ttfamily std\+::vector$<$ \hyperlink{classTypeInfo}{Type\+Info} $>$\+::const\+\_\+iterator types\+Begin (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



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 180 of file Types.\+cc.

\mbox{\Hypertarget{Types_8cc_a4f0b2efb496d7c5e76fa38124f127eaf}\label{Types_8cc_a4f0b2efb496d7c5e76fa38124f127eaf}} 
\index{Types.\+cc@{Types.\+cc}!types\+End@{types\+End}}
\index{types\+End@{types\+End}!Types.\+cc@{Types.\+cc}}
\subsubsection{\texorpdfstring{types\+End()}{typesEnd()}}
{\footnotesize\ttfamily std\+::vector$<$ \hyperlink{classTypeInfo}{Type\+Info} $>$\+::const\+\_\+iterator types\+End (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption})}



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 185 of file Types.\+cc.

