Specialization of ZipLocalEntry, that add fields for storing the extra information, that is only present in the entries in the zip central directory and not in the local entry headers. More...
#include <ziphead.h>
Public Member Functions | |
virtual FileEntry * | clone () const |
Create a heap allocated clone of the object this method is called for. | |
int | getCDirHeaderSize () const |
virtual string | getComment () const |
Returns the comment of the entry, if it has one. | |
virtual uint32 | getLocalHeaderOffset () const |
ZipCDirEntry & | operator= (const class ZipCDirEntry &src) |
virtual void | setComment (const string &comment) |
Sets the comment field for the FileEntry. | |
void | setDefaultWriter () |
virtual void | setLocalHeaderOffset (uint32 offset) |
virtual string | toString () const |
Returns a human-readable string representation of the entry. | |
ZipCDirEntry (const string &_filename="", const string &_file_comment="", const vector< unsigned char > &_extra_field=vector< unsigned char >()) | |
virtual | ~ZipCDirEntry () |
Friends | |
ostream & | operator<< (ostream &os, const ZipCDirEntry &zcdh) |
bool | operator== (const ZipLocalEntry &zlh, const ZipCDirEntry &ze) |
istream & | operator>> (istream &is, ZipCDirEntry &zcdh) |
Specialization of ZipLocalEntry, that add fields for storing the extra information, that is only present in the entries in the zip central directory and not in the local entry headers.
Definition at line 102 of file ziphead.h.
zipios::ZipCDirEntry::ZipCDirEntry | ( | const string & | _filename = "" , |
|
const string & | _file_comment = "" , |
|||
const vector< unsigned char > & | _extra_field = vector< unsigned char >() | |||
) | [inline] |
virtual zipios::ZipCDirEntry::~ZipCDirEntry | ( | ) | [inline, virtual] |
FileEntry * zipios::ZipCDirEntry::clone | ( | ) | const [virtual] |
Create a heap allocated clone of the object this method is called for.
The caller is responsible for deallocating the clone when he is done with it.
Reimplemented from zipios::ZipLocalEntry.
Definition at line 260 of file ziphead.cpp.
References ZipCDirEntry().
int zipios::ZipCDirEntry::getCDirHeaderSize | ( | ) | const |
Definition at line 255 of file ziphead.cpp.
References zipios::ZipLocalEntry::extra_field, and zipios::ZipLocalEntry::filename.
string zipios::ZipCDirEntry::getComment | ( | ) | const [virtual] |
Returns the comment of the entry, if it has one.
Otherwise it returns an empty string.
Reimplemented from zipios::ZipLocalEntry.
Definition at line 228 of file ziphead.cpp.
uint32 zipios::ZipCDirEntry::getLocalHeaderOffset | ( | ) | const [virtual] |
Definition at line 232 of file ziphead.cpp.
Referenced by zipios::ZipOutputStreambuf::updateEntryHeaderInfo().
ZipCDirEntry & zipios::ZipCDirEntry::operator= | ( | const class ZipCDirEntry & | src | ) |
Reimplemented from zipios::ZipLocalEntry.
Definition at line 58 of file ziphead.cpp.
References zipios::ZipLocalEntry::compress_method, zipios::ZipLocalEntry::compress_size, zipios::ZipLocalEntry::crc_32, zipios::ZipLocalEntry::extra_field, zipios::ZipLocalEntry::extra_field_len, zipios::ZipLocalEntry::extract_version, zipios::ZipLocalEntry::filename, zipios::ZipLocalEntry::filename_len, zipios::ZipLocalEntry::gp_bitfield, zipios::ZipLocalEntry::last_mod_fdate, zipios::ZipLocalEntry::last_mod_ftime, and zipios::ZipLocalEntry::uncompress_size.
void zipios::ZipCDirEntry::setComment | ( | const string & | comment | ) | [virtual] |
Sets the comment field for the FileEntry.
comment | string with the new comment. |
Reimplemented from zipios::ZipLocalEntry.
Definition at line 241 of file ziphead.cpp.
void zipios::ZipCDirEntry::setDefaultWriter | ( | ) |
Definition at line 218 of file ziphead.cpp.
void zipios::ZipCDirEntry::setLocalHeaderOffset | ( | uint32 | offset | ) | [virtual] |
Definition at line 236 of file ziphead.cpp.
Referenced by zipios::ZipOutputStreambuf::putNextEntry().
string zipios::ZipCDirEntry::toString | ( | ) | const [virtual] |
Returns a human-readable string representation of the entry.
Reimplemented from zipios::ZipLocalEntry.
Definition at line 247 of file ziphead.cpp.
References zipios::ZipLocalEntry::compress_size, zipios::ZipLocalEntry::filename, zipios::OutputStringStream::str(), and zipios::ZipLocalEntry::uncompress_size.
ostream& operator<< | ( | ostream & | os, | |
const ZipCDirEntry & | zcdh | |||
) | [friend] |
Reimplemented from zipios::ZipLocalEntry.
bool operator== | ( | const ZipLocalEntry & | zlh, | |
const ZipCDirEntry & | ze | |||
) | [friend] |
istream& operator>> | ( | istream & | is, | |
ZipCDirEntry & | zcdh | |||
) | [friend] |
Reimplemented from zipios::ZipLocalEntry.