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


{\ttfamily \#include $<$A\+C\+G/\+Utils/\+Progress.\+hh$>$}

\subsection*{Classes}
\begin{DoxyCompactItemize}
\item 
class \hyperlink{a00404}{Child\+Record}
\end{DoxyCompactItemize}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01023_ae50edf7a6bdf07ad47713caf9aab6084}{{\bfseries Progress} (double max\+Progress=1.\+0)}\label{a01023_ae50edf7a6bdf07ad47713caf9aab6084}

\item 
\hypertarget{a01023_ab4168b50fdd9dfa7d0b02e5d4217605d}{void {\bfseries set\+Max\+Progress} (double value)}\label{a01023_ab4168b50fdd9dfa7d0b02e5d4217605d}

\item 
double \hyperlink{a01023_a2afb0037f5f8afe379822356568937f3}{get\+Normalized\+Progress} () const 
\item 
\hypertarget{a01023_a97bb728fc1142a4782417e422cdaaade}{double {\bfseries get\+Progress} () const }\label{a01023_a97bb728fc1142a4782417e422cdaaade}

\item 
void \hyperlink{a01023_a6a6872bca10bf8eea84e6fd3729b07f0}{add\+Sub\+Progress} (\hyperlink{a01023}{Progress} $\ast$progress, double contribution)
\item 
\hypertarget{a01023_ae8cf8b84fb711d6291bf65fd632d5e88}{void {\bfseries increment} (double amount)}\label{a01023_ae8cf8b84fb711d6291bf65fd632d5e88}

\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01023_a220e4a1e8ff4fe15ae7ce5c3069ee754}{void {\bfseries on\+Child\+Progress} (\hyperlink{a01023}{Progress} $\ast$)}\label{a01023_a220e4a1e8ff4fe15ae7ce5c3069ee754}

\item 
\hypertarget{a01023_a15c74eaeb3612677ff8acac42cd87a7b}{void {\bfseries progress\+Changed} ()}\label{a01023_a15c74eaeb3612677ff8acac42cd87a7b}

\item 
\hypertarget{a01023_aede5010c680f62793ba2c5ec5be40dd2}{void {\bfseries update\+Dialog} ()}\label{a01023_aede5010c680f62793ba2c5ec5be40dd2}

\item 
\hypertarget{a01023_a34f99bb36362eb2ffe4d57034a8f65bb}{void {\bfseries child\+Goes\+Bye} (\hyperlink{a01023}{Progress} $\ast$child)}\label{a01023_a34f99bb36362eb2ffe4d57034a8f65bb}

\end{DoxyCompactItemize}
\subsection*{Protected Attributes}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01023_a79566210d031602e724292cdb0966020}{\hyperlink{a01023}{Progress} $\ast$ {\bfseries parent}}\label{a01023_a79566210d031602e724292cdb0966020}

\item 
\hypertarget{a01023_a9a90f5199950e933be4288e1760d0133}{std\+::set$<$ \hyperlink{a00404}{Child\+Record} $>$ {\bfseries children}}\label{a01023_a9a90f5199950e933be4288e1760d0133}

\item 
\hypertarget{a01023_af1ded8a3f076ed826285131fa271ece1}{double {\bfseries max\+Progress}}\label{a01023_af1ded8a3f076ed826285131fa271ece1}

\item 
\hypertarget{a01023_affeff2d3a0f891b9263099c883d27e6f}{double {\bfseries current\+Progress}}\label{a01023_affeff2d3a0f891b9263099c883d27e6f}

\item 
\hypertarget{a01023_ac769c94959eab26566b34dda2e41723b}{\begin{tabbing}
xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=xx\=\kill
union \{\\
\>void $\ast$ {\bfseries dialog\_padding}\\
\}; }\label{a01023_ac769c94959eab26566b34dda2e41723b}
\\

\end{tabbing}\end{DoxyCompactItemize}
\subsection*{Private Member Functions}
\begin{DoxyCompactItemize}
\item 
\hypertarget{a01023_a11746b6c13c444beca3965699b5f35ac}{{\bfseries Progress} (const \hyperlink{a01023}{Progress} \&rhs)}\label{a01023_a11746b6c13c444beca3965699b5f35ac}

\item 
\hypertarget{a01023_ad14273fc0a61b9cec92f5b8085470e39}{\hyperlink{a01023}{Progress} \& {\bfseries operator=} (const \hyperlink{a01023}{Progress} \&rhs)}\label{a01023_ad14273fc0a61b9cec92f5b8085470e39}

\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 90 of file Progress.\+hh.



\subsection{Member Function Documentation}
\hypertarget{a01023_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[{add\+Sub\+Progress}]{\setlength{\rightskip}{0pt plus 5cm}void A\+C\+G\+::\+Progress\+::add\+Sub\+Progress (
\begin{DoxyParamCaption}
\item[{{\bf Progress} $\ast$}]{progress, }
\item[{double}]{contribution}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [inline]}}}\label{a01023_a6a6872bca10bf8eea84e6fd3729b07f0}
Does N\+O\+T take ownership of the supplied \hyperlink{a01023}{Progress} object. 

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

\hypertarget{a01023_a2afb0037f5f8afe379822356568937f3}{\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[{get\+Normalized\+Progress}]{\setlength{\rightskip}{0pt plus 5cm}double A\+C\+G\+::\+Progress\+::get\+Normalized\+Progress (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [inline]}}}\label{a01023_a2afb0037f5f8afe379822356568937f3}
\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 114 of file Progress.\+hh.



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