archive.tex

来自「Wxpython Implemented on Windows CE, Sou」· TEX 代码 · 共 649 行 · 第 1/2 页

TEX
649
字号
%
% automatically generated by HelpGen $Revision: 1.3 $ from
% wx/archive.h at 16/Sep/04 12:19:29
%

\section{\class{wxArchiveClassFactory}}\label{wxarchiveclassfactory}

An abstract base class which serves as a common interface to
archive class factories such as \helpref{wxZipClassFactory}{wxzipclassfactory}.

For each supported archive type (such as zip) there is a class factory
derived from wxArchiveClassFactory, which allows archive objects to be
created in a generic way, without knowing the particular type of archive
being used.

\wxheading{Derived from}

\helpref{wxObject}{wxobject}

\wxheading{Include files}

<wx/archive.h>

\wxheading{See also}

\helpref{Archive formats such as zip}{wxarc}\\
\helpref{Generic archive programming}{wxarcgeneric}\\
\helpref{wxArchiveEntry}{wxarchiveentry}\\
\helpref{wxArchiveInputStream}{wxarchiveinputstream}\\
\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}

\latexignore{\rtfignore{\wxheading{Members}}}


\membersection{wxArchiveClassFactory::Get/SetConv}\label{wxarchiveclassfactoryconv}

\constfunc{wxMBConv\&}{GetConv}{\void}

\func{void}{SetConv}{\param{wxMBConv\& }{conv}}

The \helpref{wxMBConv}{wxmbconv} object that the created streams
will use when translating meta-data. The initial default, set by the
constructor, is wxConvLocal.


\membersection{wxArchiveClassFactory::GetInternalName}\label{wxarchiveclassfactorygetinternalname}

\constfunc{wxString}{GetInternalName}{\param{const wxString\& }{name}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}

Calls the static GetInternalName() function for the archive entry type,
for example
 \helpref{wxZipEntry::GetInternalName()}{wxzipentrygetinternalname}.


\membersection{wxArchiveClassFactory::NewEntry}\label{wxarchiveclassfactorynewentry}

\constfunc{wxArchiveEntry*}{NewEntry}{\void}

Create a new \helpref{wxArchiveEntry}{wxarchiveentry} object of the
appropriate type.


\membersection{wxArchiveClassFactory::NewStream}\label{wxarchiveclassfactorynewstream}

\constfunc{wxArchiveInputStream*}{NewStream}{\param{wxInputStream\& }{stream}}

\constfunc{wxArchiveOutputStream*}{NewStream}{\param{wxOutputStream\& }{stream}}

Create a new \helpref{wxArchiveInputStream}{wxarchiveinputstream}
or \helpref{wxArchiveOutputStream}{wxarchiveoutputstream} of the
appropriate type.


%
% automatically generated by HelpGen $Revision: 1.3 $ from
% wx/archive.h at 16/Sep/04 12:19:29
%

\section{\class{wxArchiveEntry}}\label{wxarchiveentry}

An abstract base class which serves as a common interface to
archive entry classes such as \helpref{wxZipEntry}{wxzipentry}.
These hold the meta-data (filename, timestamp, etc.), for entries
in archive files such as zips and tars.

\wxheading{Derived from}

\helpref{wxObject}{wxobject}

\wxheading{Include files}

<wx/archive.h>

\wxheading{See also}

\helpref{Archive formats such as zip}{wxarc}\\
\helpref{Generic archive programming}{wxarcgeneric}\\
\helpref{wxArchiveInputStream}{wxarchiveinputstream}\\
\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}\\
\helpref{wxArchiveNotifier}{wxarchivenotifier}

\wxheading{Non-seekable streams}

This information applies only when reading archives from non-seekable
streams. When the stream is
seekable \helpref{GetNextEntry()}{wxarchiveinputstreamgetnextentry}
returns a fully populated \helpref{wxArchiveEntry}{wxarchiveentry}.
See '\helpref{Archives on non-seekable streams}{wxarcnoseek}' for
more information.

For generic programming, when the worst case must be assumed, you can
rely on all the fields of wxArchiveEntry being fully populated when
GetNextEntry() returns, with the the following exceptions:

\begin{twocollist}\twocolwidtha{3cm}
\twocolitem{\helpref{GetSize()}{wxarchiveentrysize}}{Guaranteed to be
available after the entry has been read to \helpref{Eof()}{wxinputstreameof},
or \helpref{CloseEntry()}{wxarchiveinputstreamcloseentry} has been called}
\twocolitem{\helpref{IsReadOnly()}{wxarchiveentryisreadonly}}{Guaranteed to
be available after the end of the archive has been reached, i.e. after
GetNextEntry() returns NULL and Eof() is true}
\end{twocollist}


\latexignore{\rtfignore{\wxheading{Members}}}


\membersection{wxArchiveEntry::Clone}\label{wxarchiveentryclone}

\constfunc{wxArchiveEntry*}{Clone}{\void}

Returns a copy of this entry object.


\membersection{wxArchiveEntry::Get/SetDateTime}\label{wxarchiveentrydatetime}

\constfunc{wxDateTime}{GetDateTime}{\void}

\func{void}{SetDateTime}{\param{const wxDateTime\& }{dt}}

The entry's timestamp.


\membersection{wxArchiveEntry::GetInternalFormat}\label{wxarchiveentrygetinternalformat}

\constfunc{wxPathFormat}{GetInternalFormat}{\void}

Returns the path format used internally within the archive to store
filenames.


\membersection{wxArchiveEntry::GetInternalName}\label{wxarchiveentrygetinternalname}

\constfunc{wxString}{GetInternalName}{\void}

Returns the entry's filename in the internal format used within the
archive. The name can include directory components, i.e. it can be a
full path.

The names of directory entries are returned without any trailing path
separator. This gives a canonical name that can be used in comparisons.

\wxheading{See also}

\helpref{Looking up an archive entry by name}{wxarcbyname}


\membersection{wxArchiveEntry::Get/SetName}\label{wxarchiveentryname}

\constfunc{wxString}{GetName}{\param{wxPathFormat }{format = wxPATH\_NATIVE}}

\func{void}{SetName}{\param{const wxString\& }{name}, \param{wxPathFormat }{format = wxPATH\_NATIVE}}

The entry's name, by default in the native format. The name can include
directory components, i.e. it can be a full path.

If this is a directory entry, (i.e. if \helpref{IsDir()}{wxarchiveentryisdir}
is true) then GetName() returns the name with a trailing path separator.

Similarly, setting a name with a trailing path separator sets IsDir().


\membersection{wxArchiveEntry::GetOffset}\label{wxarchiveentrygetoffset}

\constfunc{off\_t}{GetOffset}{\void}

Returns a numeric value unique to the entry within the archive.


\membersection{wxArchiveEntry::Get/SetSize}\label{wxarchiveentrysize}

\constfunc{off\_t}{GetSize}{\void}

\func{void}{SetSize}{\param{off\_t }{size}}

The size of the entry's data in bytes.


\membersection{wxArchiveEntry::IsDir/SetIsDir}\label{wxarchiveentryisdir}

\constfunc{bool}{IsDir}{\void}

\func{void}{SetIsDir}{\param{bool }{isDir = true}}

True if this is a directory entry.

Directory entries are entries with no data, which are used to store
the meta-data of directories. They also make it possible for completely
empty directories to be stored.

The names of entries within an archive can be complete paths, and
unarchivers typically create whatever directories are necessary as they
restore files, even if the archive contains no explicit directory entries.


\membersection{wxArchiveEntry::IsReadOnly/SetIsReadOnly}\label{wxarchiveentryisreadonly}

\constfunc{bool}{IsReadOnly}{\void}

\func{void}{SetIsReadOnly}{\param{bool }{isReadOnly = true}}

True if the entry is a read-only file.


\membersection{wxArchiveEntry::Set/UnsetNotifier}\label{wxarchiveentrynotifier}

\func{void}{SetNotifier}{\param{wxArchiveNotifier\& }{notifier}}

\func{void}{UnsetNotifier}{\void}

Sets the \helpref{notifier}{wxarchivenotifier} for this entry.
Whenever the \helpref{wxArchiveInputStream}{wxarchiveinputstream} updates
this entry, it will then invoke the associated
notifier's \helpref{OnEntryUpdated}{wxarchivenotifieronentryupdated}
method.

Setting a notifier is not usually necessary. It is used to handle
certain cases when modifying an archive in a pipeline (i.e. between
non-seekable streams).

\wxheading{See also}

\helpref{Archives on non-seekable streams}{wxarcnoseek}\\
\helpref{wxArchiveNotifier}{wxarchivenotifier}


%
% automatically generated by HelpGen $Revision: 1.3 $ from
% wx/archive.h at 16/Sep/04 12:19:29
%

\section{\class{wxArchiveInputStream}}\label{wxarchiveinputstream}

An abstract base class which serves as a common interface to
archive input streams such as \helpref{wxZipInputStream}{wxzipinputstream}.

\helpref{GetNextEntry()}{wxarchiveinputstreamgetnextentry} returns an
 \helpref{wxArchiveEntry}{wxarchiveentry} object containing the meta-data
for the next entry in the archive (and gives away ownership). Reading from
the wxArchiveInputStream then returns the entry's data. Eof() becomes true
after an attempt has been made to read past the end of the entry's data.
When there are no more entries, GetNextEntry() returns NULL and sets Eof().

\wxheading{Derived from}

\helpref{wxFilterInputStream}{wxfilterinputstream}

\wxheading{Include files}

<wx/archive.h>

\wxheading{Data structures}
\begin{verbatim}
typedef wxArchiveEntry entry_type
\end{verbatim}

\wxheading{See also}

\helpref{Archive formats such as zip}{wxarc}\\
\helpref{wxArchiveEntry}{wxarchiveentry}\\
\helpref{wxArchiveOutputStream}{wxarchiveoutputstream}

\latexignore{\rtfignore{\wxheading{Members}}}


\membersection{wxArchiveInputStream::CloseEntry}\label{wxarchiveinputstreamcloseentry}

\func{bool}{CloseEntry}{\void}

Closes the current entry. On a non-seekable stream reads to the end of
the current entry first.


\membersection{wxArchiveInputStream::GetNextEntry}\label{wxarchiveinputstreamgetnextentry}

\func{wxArchiveEntry*}{GetNextEntry}{\void}

Closes the current entry if one is open, then reads the meta-data for
the next entry and returns it in a \helpref{wxArchiveEntry}{wxarchiveentry}
object, giving away ownership. Reading this wxArchiveInputStream then
returns the entry's data.


\membersection{wxArchiveInputStream::OpenEntry}\label{wxarchiveinputstreamopenentry}

\func{bool}{OpenEntry}{\param{wxArchiveEntry\& }{entry}}

Closes the current entry if one is open, then opens the entry specified
by the \helpref{wxArchiveEntry}{wxarchiveentry} object.

{\it entry} must be from the same archive file that this
wxArchiveInputStream is reading, and it must be reading it from a
seekable stream.

\wxheading{See also}

\helpref{Looking up an archive entry by name}{wxarcbyname}


%
% automatically generated by HelpGen $Revision: 1.3 $ from
% wx/archive.h at 16/Sep/04 12:19:29
%

\section{\class{wxArchiveIterator}}\label{wxarchiveiterator}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?