\hypertarget{classACG_1_1Progress}{}\section{A\+CG\+:\+:Progress Class Reference}
\label{classACG_1_1Progress}\index{A\+C\+G\+::\+Progress@{A\+C\+G\+::\+Progress}}


{\ttfamily \#include $<$Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+Utils/\+Progress.\+hh$>$}

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{classACG_1_1Progress_1_1ChildRecord}{Child\+Record}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1Progress_ae50edf7a6bdf07ad47713caf9aab6084}\label{classACG_1_1Progress_ae50edf7a6bdf07ad47713caf9aab6084}} 
{\bfseries Progress} (double max\+Progress=1.\+0)
\item 
\mbox{\Hypertarget{classACG_1_1Progress_ab4168b50fdd9dfa7d0b02e5d4217605d}\label{classACG_1_1Progress_ab4168b50fdd9dfa7d0b02e5d4217605d}} 
void {\bfseries set\+Max\+Progress} (double value)
\item 
double \hyperlink{classACG_1_1Progress_a2f89fe6e823e6918069a900debbbfdbd}{get\+Normalized\+Progress} () const
\item 
\mbox{\Hypertarget{classACG_1_1Progress_ab46f5c40fbbb81427f9275a75d05f8ad}\label{classACG_1_1Progress_ab46f5c40fbbb81427f9275a75d05f8ad}} 
double {\bfseries get\+Progress} () const
\item 
void \hyperlink{classACG_1_1Progress_a6a6872bca10bf8eea84e6fd3729b07f0}{add\+Sub\+Progress} (\hyperlink{classACG_1_1Progress}{Progress} $\ast$progress, double contribution)
\item 
\mbox{\Hypertarget{classACG_1_1Progress_ae8cf8b84fb711d6291bf65fd632d5e88}\label{classACG_1_1Progress_ae8cf8b84fb711d6291bf65fd632d5e88}} 
void {\bfseries increment} (double amount)
\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1Progress_a220e4a1e8ff4fe15ae7ce5c3069ee754}\label{classACG_1_1Progress_a220e4a1e8ff4fe15ae7ce5c3069ee754}} 
void {\bfseries on\+Child\+Progress} (\hyperlink{classACG_1_1Progress}{Progress} $\ast$)
\item 
\mbox{\Hypertarget{classACG_1_1Progress_a15c74eaeb3612677ff8acac42cd87a7b}\label{classACG_1_1Progress_a15c74eaeb3612677ff8acac42cd87a7b}} 
void {\bfseries progress\+Changed} ()
\item 
\mbox{\Hypertarget{classACG_1_1Progress_aede5010c680f62793ba2c5ec5be40dd2}\label{classACG_1_1Progress_aede5010c680f62793ba2c5ec5be40dd2}} 
void {\bfseries update\+Dialog} ()
\item 
\mbox{\Hypertarget{classACG_1_1Progress_a34f99bb36362eb2ffe4d57034a8f65bb}\label{classACG_1_1Progress_a34f99bb36362eb2ffe4d57034a8f65bb}} 
void {\bfseries child\+Goes\+Bye} (\hyperlink{classACG_1_1Progress}{Progress} $\ast$child)
\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1Progress_a79566210d031602e724292cdb0966020}\label{classACG_1_1Progress_a79566210d031602e724292cdb0966020}} 
\hyperlink{classACG_1_1Progress}{Progress} $\ast$ {\bfseries parent}
\item 
\mbox{\Hypertarget{classACG_1_1Progress_a9a90f5199950e933be4288e1760d0133}\label{classACG_1_1Progress_a9a90f5199950e933be4288e1760d0133}} 
std\+::set$<$ \hyperlink{classACG_1_1Progress_1_1ChildRecord}{Child\+Record} $>$ {\bfseries children}
\item 
\mbox{\Hypertarget{classACG_1_1Progress_af1ded8a3f076ed826285131fa271ece1}\label{classACG_1_1Progress_af1ded8a3f076ed826285131fa271ece1}} 
double {\bfseries max\+Progress}
\item 
\mbox{\Hypertarget{classACG_1_1Progress_affeff2d3a0f891b9263099c883d27e6f}\label{classACG_1_1Progress_affeff2d3a0f891b9263099c883d27e6f}} 
double {\bfseries current\+Progress}
\item 
\mbox{\Hypertarget{classACG_1_1Progress_ac769c94959eab26566b34dda2e41723b}\label{classACG_1_1Progress_ac769c94959eab26566b34dda2e41723b}} 
\begin{tabbing}
xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill
union \{\\
\>void $\ast$ {\bfseries dialog\_padding}\\
\}; \\

\end{tabbing}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\mbox{\Hypertarget{classACG_1_1Progress_a11746b6c13c444beca3965699b5f35ac}\label{classACG_1_1Progress_a11746b6c13c444beca3965699b5f35ac}} 
{\bfseries Progress} (const \hyperlink{classACG_1_1Progress}{Progress} \&rhs)
\item 
\mbox{\Hypertarget{classACG_1_1Progress_ad14273fc0a61b9cec92f5b8085470e39}\label{classACG_1_1Progress_ad14273fc0a61b9cec92f5b8085470e39}} 
\hyperlink{classACG_1_1Progress}{Progress} \& {\bfseries operator=} (const \hyperlink{classACG_1_1Progress}{Progress} \&rhs)
\end{DoxyCompactItemize}


\subsection{Detailed Description}
Keep track of the progress of tasks and subtasks.

Not thread safe. Could easily be made thread safe, though. See \char`\"{}\+Thread safety\char`\"{} comments in the source code.

Usage Example\+: \begin{DoxyVerb}Progress p1(5.0);
p1.increment(1.0);
assert(p1.getNormalizedProgress() == 0.2);
p1.increment(4.0);
assert(p1.getNormalizedProgress() == 1.0);

Progress p2(10.0);
{
    Progress p2_1(10.0);
    p2.addSubProgress(&p2_1, 5.0);
    assert(p2.getNormalizedProgress() == 0.0);
    p2_1.increment(5.0);
    assert(p2_1.getNormalizedProgress() == 0.5);
    assert(p2.getNormalizedProgress() == 0.25);
}

// When the sub progress gets destroyed, the parent
// assumes it is completed.
assert(p2.getNormalizedProgress() == 0.5);\end{DoxyVerb}
 

Definition at line 84 of file Progress.\+hh.



\subsection{Member Function Documentation}
\mbox{\Hypertarget{classACG_1_1Progress_a6a6872bca10bf8eea84e6fd3729b07f0}\label{classACG_1_1Progress_a6a6872bca10bf8eea84e6fd3729b07f0}} 
\index{A\+C\+G\+::\+Progress@{A\+C\+G\+::\+Progress}!add\+Sub\+Progress@{add\+Sub\+Progress}}
\index{add\+Sub\+Progress@{add\+Sub\+Progress}!A\+C\+G\+::\+Progress@{A\+C\+G\+::\+Progress}}
\subsubsection{\texorpdfstring{add\+Sub\+Progress()}{addSubProgress()}}
{\footnotesize\ttfamily void A\+C\+G\+::\+Progress\+::add\+Sub\+Progress (\begin{DoxyParamCaption}\item[{\hyperlink{classACG_1_1Progress}{Progress} $\ast$}]{progress,  }\item[{double}]{contribution }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

Does N\+OT take ownership of the supplied \hyperlink{classACG_1_1Progress}{Progress} object. 

Definition at line 128 of file Progress.\+hh.

\mbox{\Hypertarget{classACG_1_1Progress_a2f89fe6e823e6918069a900debbbfdbd}\label{classACG_1_1Progress_a2f89fe6e823e6918069a900debbbfdbd}} 
\index{A\+C\+G\+::\+Progress@{A\+C\+G\+::\+Progress}!get\+Normalized\+Progress@{get\+Normalized\+Progress}}
\index{get\+Normalized\+Progress@{get\+Normalized\+Progress}!A\+C\+G\+::\+Progress@{A\+C\+G\+::\+Progress}}
\subsubsection{\texorpdfstring{get\+Normalized\+Progress()}{getNormalizedProgress()}}
{\footnotesize\ttfamily double A\+C\+G\+::\+Progress\+::get\+Normalized\+Progress (\begin{DoxyParamCaption}{ }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}

\begin{DoxyReturn}{Returns}
A number in the interval \mbox{[}0, 1\mbox{]}, 0 being no progress at all and 1 being a finished job. 
\end{DoxyReturn}


Definition at line 108 of file Progress.\+hh.



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
Open\+Flipper/libs\+\_\+required/\+A\+C\+G/\+Utils/Progress.\+hh\end{DoxyCompactItemize}
