6 #ifndef _INC_cStreamProgress_H
7 #define _INC_cStreamProgress_H
16 template<
typename TYPE = STREAM_POS_t >
95 void put_PercentComplete(
float fComplete = 1.0f )
97 m_nAmount = fComplete;
125 , m_iChunks(iSubChunks)
138 prog.m_nTotal = (((float)iParentChunks) * prog.m_nTotal) / ((
float)m_iChunks);
144 if (m_ProgPrev.m_nTotal >= 1.0f)
146 m_Prog.m_nTotal = m_Prog.m_nAmount = 1.0f;
158 if (m_iChunk > m_iChunks)
161 m_iChunk = m_iChunks;
163 m_Prog.m_nAmount += iChunks * m_Prog.m_nTotal;
#define IGNORE_WARN_ABSTRACT(c)
Definition: GrayCore.h:81
#define GRAYCORE_LINK
Definition: GrayCore.h:47
#define TYPE
Definition: StrT.cpp:38
#define DECLSPEC_NOVTABLE
Definition: SysTypes.h:322
#define UNREFERENCED_REFERENCE(x)
Definition: SysTypes.h:318
INT32 HRESULT
_WIN32 style error codes. INT32
Definition: SysTypes.h:465
#define ASSERT(exp)
Definition: cDebugAssert.h:87
Definition: cStreamProgress.h:111
~cStreamProgressChunk()
Definition: cStreamProgress.h:141
void IncChunk(int iChunks=1)
Definition: cStreamProgress.h:153
cStreamProgressChunk(cStreamProgressF &prog, int iSubChunks, int iParentChunks=1)
Definition: cStreamProgress.h:122
Definition: cStreamProgress.h:71
void InitPercent()
Definition: cStreamProgress.h:89
cStreamProgressF()
Definition: cStreamProgress.h:84
float get_PercentComplete() const
Definition: cStreamProgress.h:100
float get_PercentChunk() const
Definition: cStreamProgress.h:104
Definition: cStreamProgress.h:18
TYPE m_nTotal
Total size of the stream. 0 = i have no idea how big the total is.
Definition: cStreamProgress.h:24
cStreamProgressT(TYPE nAmount=0, TYPE nTotal=0)
Definition: cStreamProgress.h:27
float get_PercentFloat() const
Definition: cStreamProgress.h:40
bool isComplete() const
Definition: cStreamProgress.h:32
int get_PercentInt() const
Definition: cStreamProgress.h:48
TYPE m_nAmount
How far the stream has progressed toward m_nTotal.
Definition: cStreamProgress.h:23
void InitZero()
Definition: cStreamProgress.h:61
bool isValidPercent() const
Definition: cStreamProgress.h:55
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14
cStreamProgressT< STREAM_POS_t > cStreamProgress
Definition: cStreamProgress.h:68
Definition: cStreamProgress.h:168
virtual HRESULT _stdcall onProgressCallback(const cStreamProgress &progress)
Definition: cStreamProgress.h:176