| 1 | \section{QuaChecksum32 Class Reference} | 
 
 
 
 
 | 2 | \label{classQuaChecksum32}\index{QuaChecksum32@{QuaChecksum32}} | 
 
 
 
 
 | 3 |  | 
 
 
 
 
 | 4 |  | 
 
 
 
 
 | 5 | Checksum interface. | 
 
 
 
 
 | 6 |  | 
 
 
 
 
 | 7 |  | 
 
 
 
 
 | 8 |  | 
 
 
 
 
 | 9 |  | 
 
 
 
 
 | 10 | {\ttfamily \#include $<$quazip/quachecksum32.h$>$} | 
 
 
 
 
 | 11 |  | 
 
 
 
 
 | 12 |  | 
 
 
 
 
 | 13 |  | 
 
 
 
 
 | 14 | Inheritance diagram for QuaChecksum32: | 
 
 
 
 
 | 15 | \nopagebreak | 
 
 
 
 
 | 16 | \begin{figure}[H] | 
 
 
 
 
 | 17 | \begin{center} | 
 
 
 
 
 | 18 | \leavevmode | 
 
 
 
 
 | 19 | \includegraphics[width=190pt]{classQuaChecksum32__inherit__graph} | 
 
 
 
 
 | 20 | \end{center} | 
 
 
 
 
 | 21 | \end{figure} | 
 
 
 
 
 | 22 | \subsection*{Public Member Functions} | 
 
 
 
 
 | 23 | \begin{DoxyCompactItemize} | 
 
 
 
 
 | 24 | \item | 
 
 
 
 
 | 25 | virtual quint32 {\bf calculate} (const {\bf QByteArray} \&data)=0 | 
 
 
 
 
 | 26 | \begin{DoxyCompactList}\small\item\em Calculates the checksum for data. \end{DoxyCompactList}\item | 
 
 
 
 
 | 27 | virtual void {\bf reset} ()=0\label{classQuaChecksum32_ad3f5db3c76b00069db9bda333cb49d57} | 
 
 
 
 
 | 28 |  | 
 
 
 
 
 | 29 | \begin{DoxyCompactList}\small\item\em Resets the calculation on a checksun for a stream. \end{DoxyCompactList}\item | 
 
 
 
 
 | 30 | virtual void {\bf update} (const {\bf QByteArray} \&buf)=0 | 
 
 
 
 
 | 31 | \begin{DoxyCompactList}\small\item\em Updates the calculated checksum for the stream. \end{DoxyCompactList}\item | 
 
 
 
 
 | 32 | virtual quint32 {\bf value} ()=0 | 
 
 
 
 
 | 33 | \begin{DoxyCompactList}\small\item\em Value of the checksum calculated for the stream passed throw \doxyref{update()}{p.}{classQuaChecksum32_a63a6ed3171f9243214d307da67557f7e}. \end{DoxyCompactList}\end{DoxyCompactItemize} | 
 
 
 
 
 | 34 |  | 
 
 
 
 
 | 35 |  | 
 
 
 
 
 | 36 | \subsection{Detailed Description} | 
 
 
 
 
 | 37 | Checksum interface. | 
 
 
 
 
 | 38 |  | 
 
 
 
 
 | 39 | This is an interface for 32 bit checksums. Classes implementing this interface can calcunate a certin checksum in a single step: | 
 
 
 
 
 | 40 | \begin{DoxyCode} | 
 
 
 
 
 | 41 | QChecksum32 *crc32 = new QuaCrc32(); | 
 
 
 
 
 | 42 | rasoult = crc32->calculate(data); | 
 
 
 
 
 | 43 | \end{DoxyCode} | 
 
 
 
 
 | 44 | or by streaming the data: | 
 
 
 
 
 | 45 | \begin{DoxyCode} | 
 
 
 
 
 | 46 | QChecksum32 *crc32 = new QuaCrc32(); | 
 
 
 
 
 | 47 | while(!fileA.atEnd()) | 
 
 
 
 
 | 48 | crc32->update(fileA.read(bufSize)); | 
 
 
 
 
 | 49 | resoultA = crc32->value(); | 
 
 
 
 
 | 50 | crc32->reset(); | 
 
 
 
 
 | 51 | while(!fileB.atEnd()) | 
 
 
 
 
 | 52 | crc32->update(fileB.read(bufSize)); | 
 
 
 
 
 | 53 | resoultB = crc32->value(); | 
 
 
 
 
 | 54 | \end{DoxyCode} | 
 
 
 
 
 | 55 |  | 
 
 
 
 
 | 56 |  | 
 
 
 
 
 | 57 | \subsection{Member Function Documentation} | 
 
 
 
 
 | 58 | \index{QuaChecksum32@{QuaChecksum32}!calculate@{calculate}} | 
 
 
 
 
 | 59 | \index{calculate@{calculate}!QuaChecksum32@{QuaChecksum32}} | 
 
 
 
 
 | 60 | \subsubsection[{calculate}]{\setlength{\rightskip}{0pt plus 5cm}virtual quint32 QuaChecksum32::calculate ( | 
 
 
 
 
 | 61 | \begin{DoxyParamCaption} | 
 
 
 
 
 | 62 | \item[{const {\bf QByteArray} \&}]{data} | 
 
 
 
 
 | 63 | \end{DoxyParamCaption} | 
 
 
 
 
 | 64 | )\hspace{0.3cm}{\ttfamily  [pure virtual]}}\label{classQuaChecksum32_a14d800fcfd55b2ae11ef07d3924fe0b1} | 
 
 
 
 
 | 65 |  | 
 
 
 
 
 | 66 |  | 
 
 
 
 
 | 67 | Calculates the checksum for data. | 
 
 
 
 
 | 68 |  | 
 
 
 
 
 | 69 | {\itshape data\/} source data \begin{DoxyReturn}{Returns} | 
 
 
 
 
 | 70 | data checksum | 
 
 
 
 
 | 71 | \end{DoxyReturn} | 
 
 
 
 
 | 72 | This function has no efect on the value returned by \doxyref{value()}{p.}{classQuaChecksum32_afd836e7534194fce08356be6a8336da7}. | 
 
 
 
 
 | 73 |  | 
 
 
 
 
 | 74 | Implemented in {\bf QuaAdler32} \doxyref{}{p.}{classQuaAdler32_a350e84fd000ebfa3c33503336a7b21bb}, and {\bf QuaCrc32} \doxyref{}{p.}{classQuaCrc32_aaf6fdf6e36e55c97bf9eab6ec65ecb9e}. | 
 
 
 
 
 | 75 |  | 
 
 
 
 
 | 76 | \index{QuaChecksum32@{QuaChecksum32}!update@{update}} | 
 
 
 
 
 | 77 | \index{update@{update}!QuaChecksum32@{QuaChecksum32}} | 
 
 
 
 
 | 78 | \subsubsection[{update}]{\setlength{\rightskip}{0pt plus 5cm}virtual void QuaChecksum32::update ( | 
 
 
 
 
 | 79 | \begin{DoxyParamCaption} | 
 
 
 
 
 | 80 | \item[{const {\bf QByteArray} \&}]{buf} | 
 
 
 
 
 | 81 | \end{DoxyParamCaption} | 
 
 
 
 
 | 82 | )\hspace{0.3cm}{\ttfamily  [pure virtual]}}\label{classQuaChecksum32_a63a6ed3171f9243214d307da67557f7e} | 
 
 
 
 
 | 83 |  | 
 
 
 
 
 | 84 |  | 
 
 
 
 
 | 85 | Updates the calculated checksum for the stream. | 
 
 
 
 
 | 86 |  | 
 
 
 
 
 | 87 | {\itshape buf\/} next portion of data from the stream | 
 
 
 
 
 | 88 |  | 
 
 
 
 
 | 89 | Implemented in {\bf QuaAdler32} \doxyref{}{p.}{classQuaAdler32_aba24f7b16aa0cdc26f81a9ad687fc653}, and {\bf QuaCrc32} \doxyref{}{p.}{classQuaCrc32_a5015d80e04afe6e6d094155b7e99888e}. | 
 
 
 
 
 | 90 |  | 
 
 
 
 
 | 91 | \index{QuaChecksum32@{QuaChecksum32}!value@{value}} | 
 
 
 
 
 | 92 | \index{value@{value}!QuaChecksum32@{QuaChecksum32}} | 
 
 
 
 
 | 93 | \subsubsection[{value}]{\setlength{\rightskip}{0pt plus 5cm}virtual quint32 QuaChecksum32::value ( | 
 
 
 
 
 | 94 | \begin{DoxyParamCaption} | 
 
 
 
 
 | 95 | {} | 
 
 
 
 
 | 96 | \end{DoxyParamCaption} | 
 
 
 
 
 | 97 | )\hspace{0.3cm}{\ttfamily  [pure virtual]}}\label{classQuaChecksum32_afd836e7534194fce08356be6a8336da7} | 
 
 
 
 
 | 98 |  | 
 
 
 
 
 | 99 |  | 
 
 
 
 
 | 100 | Value of the checksum calculated for the stream passed throw \doxyref{update()}{p.}{classQuaChecksum32_a63a6ed3171f9243214d307da67557f7e}. | 
 
 
 
 
 | 101 |  | 
 
 
 
 
 | 102 | \begin{DoxyReturn}{Returns} | 
 
 
 
 
 | 103 | checksum | 
 
 
 
 
 | 104 | \end{DoxyReturn} | 
 
 
 
 
 | 105 |  | 
 
 
 
 
 | 106 |  | 
 
 
 
 
 | 107 | Implemented in {\bf QuaAdler32} \doxyref{}{p.}{classQuaAdler32_a2022e1db95c23cef220b335e44d74fb1}, and {\bf QuaCrc32} \doxyref{}{p.}{classQuaCrc32_a957ce46a53862f75c89d6a3ac4f73389}. | 
 
 
 
 
 | 108 |  | 
 
 
 
 
 | 109 |  | 
 
 
 
 
 | 110 |  | 
 
 
 
 
 | 111 | The documentation for this class was generated from the following file:\begin{DoxyCompactItemize} | 
 
 
 
 
 | 112 | \item | 
 
 
 
 
 | 113 | quazip/quachecksum32.h\end{DoxyCompactItemize} |