metaforce/hecl-gui/quazip/doc/latex/classQuaGzipFile.tex

178 lines
7.2 KiB
TeX

\section{QuaGzipFile Class Reference}
\label{classQuaGzipFile}\index{QuaGzipFile@{QuaGzipFile}}
GZIP file.
{\ttfamily \#include $<$quagzipfile.h$>$}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item
{\bf QuaGzipFile} ()
\begin{DoxyCompactList}\small\item\em Empty constructor. \end{DoxyCompactList}\item
{\bf QuaGzipFile} (QObject $\ast$parent)
\begin{DoxyCompactList}\small\item\em Empty constructor with a parent. \end{DoxyCompactList}\item
{\bf QuaGzipFile} (const QString \&fileName, QObject $\ast$parent=NULL)
\begin{DoxyCompactList}\small\item\em Constructor. \end{DoxyCompactList}\item
virtual {\bf $\sim$QuaGzipFile} ()\label{classQuaGzipFile_a1200bc76f36bb2e1991e1e0467befbf2}
\begin{DoxyCompactList}\small\item\em Destructor. \end{DoxyCompactList}\item
void {\bf setFileName} (const QString \&fileName)\label{classQuaGzipFile_a253fbaf410a3d4ae0a719505c5525149}
\begin{DoxyCompactList}\small\item\em Sets the name of the GZIP file to be opened. \end{DoxyCompactList}\item
QString {\bf getFileName} () const \label{classQuaGzipFile_a9a0954a1db1fcf2aeba0530239bce71c}
\begin{DoxyCompactList}\small\item\em Returns the name of the GZIP file. \end{DoxyCompactList}\item
virtual bool {\bf isSequential} () const
\begin{DoxyCompactList}\small\item\em Returns true. \end{DoxyCompactList}\item
virtual bool {\bf open} (QIODevice::OpenMode mode)
\begin{DoxyCompactList}\small\item\em Opens the file. \end{DoxyCompactList}\item
virtual bool {\bf open} (int fd, QIODevice::OpenMode mode)
\begin{DoxyCompactList}\small\item\em Opens the file. \end{DoxyCompactList}\item
virtual bool {\bf flush} ()
\begin{DoxyCompactList}\small\item\em Flushes data to file. \end{DoxyCompactList}\item
virtual void {\bf close} ()\label{classQuaGzipFile_a273205350b1235a242a1eb5cbf586434}
\begin{DoxyCompactList}\small\item\em Closes the file. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Protected Member Functions}
\begin{DoxyCompactItemize}
\item
virtual qint64 {\bf readData} (char $\ast$data, qint64 maxSize)\label{classQuaGzipFile_a9eab41b46367e63e0c269c42ca883d82}
\begin{DoxyCompactList}\small\item\em Implementation of QIODevice::readData(). \end{DoxyCompactList}\item
virtual qint64 {\bf writeData} (const char $\ast$data, qint64 maxSize)\label{classQuaGzipFile_a6dd09d41d8a51c96b0f2134eff37f676}
\begin{DoxyCompactList}\small\item\em Implementation of QIODevice::writeData(). \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection{Detailed Description}
GZIP file.
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 QIODevice, for example, if your GZIP file is in QBuffer. It only provides QIODevice access to a GZIP file contents, but the GZIP file itself must be identified by its name on disk or by descriptor id.
\subsection{Constructor \& Destructor Documentation}
\index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
\index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{QuaGzipFile}]{\setlength{\rightskip}{0pt plus 5cm}QuaGzipFile::QuaGzipFile (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)}\label{classQuaGzipFile_a709608207b41ca81d5beed2b34982809}
Empty constructor.
Must call \doxyref{setFileName()}{p.}{classQuaGzipFile_a253fbaf410a3d4ae0a719505c5525149} before trying to open. \index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
\index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{QuaGzipFile}]{\setlength{\rightskip}{0pt plus 5cm}QuaGzipFile::QuaGzipFile (
\begin{DoxyParamCaption}
\item[{QObject $\ast$}]{parent}
\end{DoxyParamCaption}
)}\label{classQuaGzipFile_a13996f5db660c4a29645f8d208b9ca6b}
Empty constructor with a parent.
Must call \doxyref{setFileName()}{p.}{classQuaGzipFile_a253fbaf410a3d4ae0a719505c5525149} before trying to open.
\begin{DoxyParams}{Parameters}
{\em parent} & The parent object, as per QObject logic. \\
\hline
\end{DoxyParams}
\index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
\index{QuaGzipFile@{QuaGzipFile}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{QuaGzipFile}]{\setlength{\rightskip}{0pt plus 5cm}QuaGzipFile::QuaGzipFile (
\begin{DoxyParamCaption}
\item[{const QString \&}]{fileName, }
\item[{QObject $\ast$}]{parent = {\ttfamily NULL}}
\end{DoxyParamCaption}
)}\label{classQuaGzipFile_ac7f7703bda9c6169c001aa15641bb2ea}
Constructor.
\begin{DoxyParams}{Parameters}
{\em fileName} & The name of the GZIP file. \\
\hline
{\em parent} & The parent object, as per QObject logic. \\
\hline
\end{DoxyParams}
\subsection{Member Function Documentation}
\index{QuaGzipFile@{QuaGzipFile}!isSequential@{isSequential}}
\index{isSequential@{isSequential}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{isSequential}]{\setlength{\rightskip}{0pt plus 5cm}bool QuaGzipFile::isSequential (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
) const\hspace{0.3cm}{\ttfamily [virtual]}}\label{classQuaGzipFile_ae97f4e15d86c965c156df33d00318176}
Returns true.
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. \index{QuaGzipFile@{QuaGzipFile}!open@{open}}
\index{open@{open}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}bool QuaGzipFile::open (
\begin{DoxyParamCaption}
\item[{QIODevice::OpenMode}]{mode}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classQuaGzipFile_a1d560babdfff3a3441d704099a5bc1e4}
Opens the file.
\begin{DoxyParams}{Parameters}
{\em mode} & Can be either QIODevice::Write or QIODevice::Read. ReadWrite and Append aren't supported. \\
\hline
\end{DoxyParams}
Referenced by open().
\index{QuaGzipFile@{QuaGzipFile}!open@{open}}
\index{open@{open}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{open}]{\setlength{\rightskip}{0pt plus 5cm}bool QuaGzipFile::open (
\begin{DoxyParamCaption}
\item[{int}]{fd, }
\item[{QIODevice::OpenMode}]{mode}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classQuaGzipFile_adf5a954bb9bfda2d33cd336a213e2549}
Opens the file.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
\begin{DoxyParams}{Parameters}
{\em fd} & The file descriptor to read/write the GZIP file from/to. \\
\hline
{\em mode} & Can be either QIODevice::Write or QIODevice::Read. ReadWrite and Append aren't supported. \\
\hline
\end{DoxyParams}
References open().
\index{QuaGzipFile@{QuaGzipFile}!flush@{flush}}
\index{flush@{flush}!QuaGzipFile@{QuaGzipFile}}
\subsubsection[{flush}]{\setlength{\rightskip}{0pt plus 5cm}bool QuaGzipFile::flush (
\begin{DoxyParamCaption}
{}
\end{DoxyParamCaption}
)\hspace{0.3cm}{\ttfamily [virtual]}}\label{classQuaGzipFile_ab745f345b727c81abbc3eb5af4dca844}
Flushes data to file.
The data is written using Z\_\-SYNC\_\-FLUSH mode. Doesn't make any sense when reading.
The documentation for this class was generated from the following files:\begin{DoxyCompactItemize}
\item
quazip/quagzipfile.h\item
quazip/quagzipfile.cpp\end{DoxyCompactItemize}