[1096] | 1 | \section{QuaGzipFile Class Reference}
|
---|
| 2 | \label{classQuaGzipFile}\index{QuaGzipFile@{QuaGzipFile}}
|
---|
| 3 |
|
---|
| 4 |
|
---|
| 5 | GZIP file.
|
---|
| 6 |
|
---|
| 7 |
|
---|
| 8 |
|
---|
| 9 |
|
---|
| 10 | {\ttfamily \#include $<$quagzipfile.h$>$}
|
---|
| 11 |
|
---|
| 12 |
|
---|
| 13 |
|
---|
| 14 | Inheritance diagram for QuaGzipFile:
|
---|
| 15 | \nopagebreak
|
---|
| 16 | \begin{figure}[H]
|
---|
| 17 | \begin{center}
|
---|
| 18 | \leavevmode
|
---|
| 19 | \includegraphics[width=114pt]{classQuaGzipFile__inherit__graph}
|
---|
| 20 | \end{center}
|
---|
| 21 | \end{figure}
|
---|
| 22 |
|
---|
| 23 |
|
---|
| 24 | Collaboration diagram for QuaGzipFile:
|
---|
| 25 | \nopagebreak
|
---|
| 26 | \begin{figure}[H]
|
---|
| 27 | \begin{center}
|
---|
| 28 | \leavevmode
|
---|
| 29 | \includegraphics[width=114pt]{classQuaGzipFile__coll__graph}
|
---|
| 30 | \end{center}
|
---|
| 31 | \end{figure}
|
---|
| 32 | \subsection*{Public Member Functions}
|
---|
| 33 | \begin{DoxyCompactItemize}
|
---|
| 34 | \item
|
---|
| 35 | {\bf QuaGzipFile} ()
|
---|
| 36 | \begin{DoxyCompactList}\small\item\em Empty constructor. \end{DoxyCompactList}\item
|
---|
| 37 | {\bf QuaGzipFile} ({\bf QObject} $\ast${\bf parent})
|
---|
| 38 | \begin{DoxyCompactList}\small\item\em Empty constructor with a parent. \end{DoxyCompactList}\item
|
---|
| 39 | {\bf QuaGzipFile} (const {\bf QString} \&fileName, {\bf QObject} $\ast${\bf parent}=NULL)
|
---|
| 40 | \begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item
|
---|
| 41 | virtual {\bf $\sim$QuaGzipFile} ()\label{classQuaGzipFile_a1200bc76f36bb2e1991e1e0467befbf2}
|
---|
| 42 |
|
---|
| 43 | \begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item
|
---|
| 44 | void {\bf setFileName} (const {\bf QString} \&fileName)\label{classQuaGzipFile_a253fbaf410a3d4ae0a719505c5525149}
|
---|
| 45 |
|
---|
| 46 | \begin{DoxyCompactList}\small\item\em Sets the name of the GZIP file to be opened. \end{DoxyCompactList}\item
|
---|
| 47 | {\bf QString} {\bf getFileName} () const \label{classQuaGzipFile_a9a0954a1db1fcf2aeba0530239bce71c}
|
---|
| 48 |
|
---|
| 49 | \begin{DoxyCompactList}\small\item\em Returns the name of the GZIP file. \end{DoxyCompactList}\item
|
---|
| 50 | virtual bool {\bf isSequential} () const
|
---|
| 51 | \begin{DoxyCompactList}\small\item\em Returns true. \end{DoxyCompactList}\item
|
---|
| 52 | virtual bool {\bf open} ({\bf QIODevice::OpenMode} mode)
|
---|
| 53 | \begin{DoxyCompactList}\small\item\em Opens the file. \end{DoxyCompactList}\item
|
---|
| 54 | virtual bool {\bf open} (int fd, {\bf QIODevice::OpenMode} mode)
|
---|
| 55 | \begin{DoxyCompactList}\small\item\em Opens the file. \end{DoxyCompactList}\item
|
---|
| 56 | virtual bool {\bf flush} ()
|
---|
| 57 | \begin{DoxyCompactList}\small\item\em Flushes data to file. \end{DoxyCompactList}\item
|
---|
| 58 | virtual void {\bf close} ()\label{classQuaGzipFile_a273205350b1235a242a1eb5cbf586434}
|
---|
| 59 |
|
---|
| 60 | \begin{DoxyCompactList}\small\item\em Closes the file. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
---|
| 61 | \subsection*{Protected Member Functions}
|
---|
| 62 | \begin{DoxyCompactItemize}
|
---|
| 63 | \item
|
---|
| 64 | virtual qint64 {\bf readData} (char $\ast$data, qint64 maxSize)\label{classQuaGzipFile_a9eab41b46367e63e0c269c42ca883d82}
|
---|
| 65 |
|
---|
| 66 | \begin{DoxyCompactList}\small\item\em Implementation of {\bf QIODevice::readData()}. \end{DoxyCompactList}\item
|
---|
| 67 | virtual qint64 {\bf writeData} (const char $\ast$data, qint64 maxSize)\label{classQuaGzipFile_a6dd09d41d8a51c96b0f2134eff37f676}
|
---|
| 68 |
|
---|
| 69 | \begin{DoxyCompactList}\small\item\em Implementation of {\bf QIODevice::writeData()}. \end{DoxyCompactList}\end{DoxyCompactItemize}
|
---|
| 70 |
|
---|
| 71 |
|
---|
| 72 | \subsection{Detailed Description}
|
---|
| 73 | GZIP file.
|
---|
| 74 |
|
---|
| 75 | This class is a wrapper around GZIP file access functions in zlib. Unlike \doxyref{QuaZip}{p.}{classQuaZip} classes, it doesn't allow reading from a GZIP file opened as {\bf QIODevice}, for example, if your GZIP file is in {\bf QBuffer}. It only provides {\bf QIODevice} access to a GZIP file contents, but the GZIP file itself must be identified by its name on disk or by descriptor id.
|
---|
| 76 |
|
---|
| 77 | \subsection{Constructor \& Destructor Documentation}
|
---|
| 78 | \index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
|
---|
| 79 | \index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
|
---|
| 80 | \subsubsection[{QuaGzipFile}]{\setlength{\rightskip}{0pt plus 5cm}QuaGzipFile::QuaGzipFile (
|
---|
| 81 | \begin{DoxyParamCaption}
|
---|
| 82 | {}
|
---|
| 83 | \end{DoxyParamCaption}
|
---|
| 84 | )}\label{classQuaGzipFile_a709608207b41ca81d5beed2b34982809}
|
---|
| 85 |
|
---|
| 86 |
|
---|
| 87 | Empty constructor.
|
---|
| 88 |
|
---|
| 89 | Must call \doxyref{setFileName()}{p.}{classQuaGzipFile_a253fbaf410a3d4ae0a719505c5525149} before trying to open. \index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
|
---|
| 90 | \index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
|
---|
| 91 | \subsubsection[{QuaGzipFile}]{\setlength{\rightskip}{0pt plus 5cm}QuaGzipFile::QuaGzipFile (
|
---|
| 92 | \begin{DoxyParamCaption}
|
---|
| 93 | \item[{{\bf QObject} $\ast$}]{parent}
|
---|
| 94 | \end{DoxyParamCaption}
|
---|
| 95 | )}\label{classQuaGzipFile_a13996f5db660c4a29645f8d208b9ca6b}
|
---|
| 96 |
|
---|
| 97 |
|
---|
| 98 | Empty constructor with a parent.
|
---|
| 99 |
|
---|
| 100 | Must call \doxyref{setFileName()}{p.}{classQuaGzipFile_a253fbaf410a3d4ae0a719505c5525149} before trying to open.
|
---|
| 101 | \begin{DoxyParams}{Parameters}
|
---|
| 102 | {\em parent} & The parent object, as per {\bf QObject} logic. \\
|
---|
| 103 | \hline
|
---|
| 104 | \end{DoxyParams}
|
---|
| 105 | \index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
|
---|
| 106 | \index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
|
---|
| 107 | \subsubsection[{QuaGzipFile}]{\setlength{\rightskip}{0pt plus 5cm}QuaGzipFile::QuaGzipFile (
|
---|
| 108 | \begin{DoxyParamCaption}
|
---|
| 109 | \item[{const {\bf QString} \&}]{fileName, }
|
---|
| 110 | \item[{{\bf QObject} $\ast$}]{parent = {\ttfamily NULL}}
|
---|
| 111 | \end{DoxyParamCaption}
|
---|
| 112 | )}\label{classQuaGzipFile_ac7f7703bda9c6169c001aa15641bb2ea}
|
---|
| 113 |
|
---|
| 114 |
|
---|
| 115 | Constructor.
|
---|
| 116 |
|
---|
| 117 |
|
---|
| 118 | \begin{DoxyParams}{Parameters}
|
---|
| 119 | {\em fileName} & The name of the GZIP file. \\
|
---|
| 120 | \hline
|
---|
| 121 | {\em parent} & The parent object, as per {\bf QObject} logic. \\
|
---|
| 122 | \hline
|
---|
| 123 | \end{DoxyParams}
|
---|
| 124 |
|
---|
| 125 |
|
---|
| 126 | \subsection{Member Function Documentation}
|
---|
| 127 | \index{QuaGzipFile@{QuaGzipFile}!isSequential@{isSequential}}
|
---|
| 128 | \index{isSequential@{isSequential}!QuaGzipFile@{QuaGzipFile}}
|
---|
| 129 | \subsubsection[{isSequential}]{\setlength{\rightskip}{0pt plus 5cm}bool QuaGzipFile::isSequential (
|
---|
| 130 | \begin{DoxyParamCaption}
|
---|
| 131 | {}
|
---|
| 132 | \end{DoxyParamCaption}
|
---|
| 133 | ) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{classQuaGzipFile_ae97f4e15d86c965c156df33d00318176}
|
---|
| 134 |
|
---|
| 135 |
|
---|
| 136 | Returns true.
|
---|
| 137 |
|
---|
| 138 | Strictly speaking, zlib supports seeking for GZIP files, but it is poorly implemented, because there is no way to implement it properly. For reading, seeking backwards is very slow, and for writing, it is downright impossible. Therefore, \doxyref{QuaGzipFile}{p.}{classQuaGzipFile} does not support seeking at all.
|
---|
| 139 |
|
---|
| 140 | Reimplemented from {\bf QIODevice}.
|
---|
| 141 |
|
---|
| 142 | \index{QuaGzipFile@{QuaGzipFile}!open@{open}}
|
---|
| 143 | \index{open@{open}!QuaGzipFile@{QuaGzipFile}}
|
---|
| 144 | \subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}bool QuaGzipFile::open (
|
---|
| 145 | \begin{DoxyParamCaption}
|
---|
| 146 | \item[{{\bf QIODevice::OpenMode}}]{mode}
|
---|
| 147 | \end{DoxyParamCaption}
|
---|
| 148 | )\hspace{0.3cm}{\ttfamily [virtual]}}\label{classQuaGzipFile_a1d560babdfff3a3441d704099a5bc1e4}
|
---|
| 149 |
|
---|
| 150 |
|
---|
| 151 | Opens the file.
|
---|
| 152 |
|
---|
| 153 |
|
---|
| 154 | \begin{DoxyParams}{Parameters}
|
---|
| 155 | {\em mode} & Can be either QIODevice::Write or QIODevice::Read. ReadWrite and Append aren't supported. \\
|
---|
| 156 | \hline
|
---|
| 157 | \end{DoxyParams}
|
---|
| 158 |
|
---|
| 159 |
|
---|
| 160 | References QIODevice::setErrorString().
|
---|
| 161 |
|
---|
| 162 |
|
---|
| 163 |
|
---|
| 164 | Referenced by open().
|
---|
| 165 |
|
---|
| 166 | \index{QuaGzipFile@{QuaGzipFile}!open@{open}}
|
---|
| 167 | \index{open@{open}!QuaGzipFile@{QuaGzipFile}}
|
---|
| 168 | \subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}bool QuaGzipFile::open (
|
---|
| 169 | \begin{DoxyParamCaption}
|
---|
| 170 | \item[{int}]{fd, }
|
---|
| 171 | \item[{{\bf QIODevice::OpenMode}}]{mode}
|
---|
| 172 | \end{DoxyParamCaption}
|
---|
| 173 | )\hspace{0.3cm}{\ttfamily [virtual]}}\label{classQuaGzipFile_adf5a954bb9bfda2d33cd336a213e2549}
|
---|
| 174 |
|
---|
| 175 |
|
---|
| 176 | Opens the file.
|
---|
| 177 |
|
---|
| 178 | This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
|
---|
| 179 | \begin{DoxyParams}{Parameters}
|
---|
| 180 | {\em fd} & The file descriptor to read/write the GZIP file from/to. \\
|
---|
| 181 | \hline
|
---|
| 182 | {\em mode} & Can be either QIODevice::Write or QIODevice::Read. ReadWrite and Append aren't supported. \\
|
---|
| 183 | \hline
|
---|
| 184 | \end{DoxyParams}
|
---|
| 185 |
|
---|
| 186 |
|
---|
| 187 | References open(), and QIODevice::setErrorString().
|
---|
| 188 |
|
---|
| 189 | \index{QuaGzipFile@{QuaGzipFile}!flush@{flush}}
|
---|
| 190 | \index{flush@{flush}!QuaGzipFile@{QuaGzipFile}}
|
---|
| 191 | \subsubsection[{flush}]{\setlength{\rightskip}{0pt plus 5cm}bool QuaGzipFile::flush (
|
---|
| 192 | \begin{DoxyParamCaption}
|
---|
| 193 | {}
|
---|
| 194 | \end{DoxyParamCaption}
|
---|
| 195 | )\hspace{0.3cm}{\ttfamily [virtual]}}\label{classQuaGzipFile_ab745f345b727c81abbc3eb5af4dca844}
|
---|
| 196 |
|
---|
| 197 |
|
---|
| 198 | Flushes data to file.
|
---|
| 199 |
|
---|
| 200 | The data is written using Z\_\-SYNC\_\-FLUSH mode. Doesn't make any sense when reading.
|
---|
| 201 |
|
---|
| 202 | The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
|
---|
| 203 | \item
|
---|
| 204 | quazip/quagzipfile.h\item
|
---|
| 205 | quazip/quagzipfile.cpp\end{DoxyCompactItemize}
|
---|