#include <wx/archive.h>
This is an abstract base class which serves as a common interface to archive entry classes such as wxZipEntry.
These hold the meta-data (filename, timestamp, etc.), for entries in archive files such as zips and tars.
This information applies only when reading archives from non-seekable streams. When the stream is seekable GetNextEntry() returns a fully populated wxArchiveEntry. See Archives on Non-Seekable Streams 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 wxArchiveInputStream::GetNextEntry() returns, with the following exceptions:
<>< =''>:</>&;&;< =''>\ , \ </></>
Public Member Functions | |
wxArchiveEntry * | Clone () const |
Returns a copy of this entry object. | |
virtual wxDateTime | GetDateTime () const =0 |
Gets the entry's timestamp. | |
virtual void | SetDateTime (const wxDateTime &dt)=0 |
Sets the entry's timestamp. | |
virtual wxString | GetName (wxPathFormat format=wxPATH_NATIVE) const =0 |
Returns the entry's name, by default in the native format. | |
virtual void | SetName (const wxString &name, wxPathFormat format=wxPATH_NATIVE)=0 |
Sets the entry's name. | |
virtual wxFileOffset | GetSize () const =0 |
Returns the size of the entry's data in bytes. | |
virtual void | SetSize (wxFileOffset size)=0 |
Sets the size of the entry's data in bytes. | |
virtual wxPathFormat | GetInternalFormat () const =0 |
Returns the path format used internally within the archive to store filenames. | |
virtual wxString | GetInternalName () const =0 |
Returns the entry's filename in the internal format used within the archive. | |
virtual wxFileOffset | GetOffset () const =0 |
Returns a numeric value unique to the entry within the archive. | |
virtual bool | IsDir () const =0 |
Returns true if this is a directory entry. | |
virtual void | SetIsDir (bool isDir=true)=0 |
Marks this entry as a directory if isDir is true. | |
virtual bool | IsReadOnly () const =0 |
Returns true if the entry is a read-only file. | |
virtual void | SetIsReadOnly (bool isReadOnly=true)=0 |
Sets this entry as a read-only file. | |
void | SetNotifier (wxArchiveNotifier ¬ifier) |
Sets the notifier (see wxArchiveNotifier) for this entry. | |
virtual void | UnsetNotifier () |
Unsets the notifier eventually attached to this entry. | |
![]() | |
wxObject () | |
Default ctor; initializes to NULL the internal reference data. | |
wxObject (const wxObject &other) | |
Copy ctor. | |
virtual | ~wxObject () |
Destructor. | |
virtual wxClassInfo * | GetClassInfo () const |
This virtual function is redefined for every class that requires run-time type information, when using the wxDECLARE_CLASS macro (or similar). | |
wxObjectRefData * | GetRefData () const |
Returns the wxObject::m_refData pointer, i.e. the data referenced by this object. | |
bool | IsKindOf (const wxClassInfo *info) const |
Determines whether this class is a subclass of (or the same class as) the given class. | |
bool | IsSameAs (const wxObject &obj) const |
Returns true if this object has the same data pointer as obj. | |
void | Ref (const wxObject &clone) |
Makes this object refer to the data in clone. | |
void | SetRefData (wxObjectRefData *data) |
Sets the wxObject::m_refData pointer. | |
void | UnRef () |
Decrements the reference count in the associated data, and if it is zero, deletes the data. | |
void | UnShare () |
This is the same of AllocExclusive() but this method is public. | |
void | operator delete (void *buf) |
The delete operator is defined for debugging versions of the library only, when the identifier __WXDEBUG__ is defined. | |
void * | operator new (size_t size, const wxString &filename=NULL, int lineNum=0) |
The new operator is defined for debugging versions of the library only, when the identifier __WXDEBUG__ is defined. | |
Additional Inherited Members | |
![]() | |
void | AllocExclusive () |
Ensure that this object's data is not shared with any other object. | |
virtual wxObjectRefData * | CreateRefData () const |
Creates a new instance of the wxObjectRefData-derived class specific to this object and returns it. | |
virtual wxObjectRefData * | CloneRefData (const wxObjectRefData *data) const |
Creates a new instance of the wxObjectRefData-derived class specific to this object and initializes it copying data. | |
![]() | |
wxObjectRefData * | m_refData |
Pointer to an object which is the object's reference-counted data. | |
wxArchiveEntry * wxArchiveEntry::Clone | ( | ) | const |
Returns a copy of this entry object.
|
pure virtual |
Gets the entry's timestamp.
|
pure virtual |
Returns the path format used internally within the archive to store filenames.
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.
Implemented in wxTarEntry, and wxZipEntry.
|
pure virtual |
Returns 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 IsDir() is true) then the returned string is the name with a trailing path separator.
|
pure virtual |
Returns a numeric value unique to the entry within the archive.
|
pure virtual |
Returns the size of the entry's data in bytes.
Implemented in wxTarEntry.
Returns 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.
Returns true if the entry is a read-only file.
|
pure virtual |
Sets the entry's timestamp.
Marks this entry as a directory if isDir is true.
See IsDir() for more info.
Sets this entry as a read-only file.
|
pure virtual |
void wxArchiveEntry::SetNotifier | ( | wxArchiveNotifier & | notifier | ) |
Sets the notifier (see wxArchiveNotifier) for this entry.
Whenever the wxArchiveInputStream updates this entry, it will then invoke the associated notifier's wxArchiveNotifier::OnEntryUpdated 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).
|
pure virtual |
Sets the size of the entry's data in bytes.
Implemented in wxTarEntry.
Unsets the notifier eventually attached to this entry.
Reimplemented in wxZipEntry.