zipios::ZipCDirEntry Class Reference

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>

Inheritance diagram for zipios::ZipCDirEntry:
zipios::ZipLocalEntry zipios::FileEntry

List of all members.

Public Member Functions

virtual FileEntryclone () 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
ZipCDirEntryoperator= (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)

Detailed Description

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.


Constructor & Destructor Documentation

zipios::ZipCDirEntry::ZipCDirEntry ( const string &  _filename = "",
const string &  _file_comment = "",
const vector< unsigned char > &  _extra_field = vector< unsigned char >() 
) [inline]

Definition at line 108 of file ziphead.h.

Referenced by clone().

virtual zipios::ZipCDirEntry::~ZipCDirEntry (  )  [inline, virtual]

Definition at line 140 of file ziphead.h.


Member Function Documentation

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.

Returns:
A heap allocated copy of the object this method is called for.

Reimplemented from zipios::ZipLocalEntry.

Definition at line 260 of file ziphead.cpp.

References ZipCDirEntry().

int zipios::ZipCDirEntry::getCDirHeaderSize (  )  const
string zipios::ZipCDirEntry::getComment (  )  const [virtual]

Returns the comment of the entry, if it has one.

Otherwise it returns an empty string.

Returns:
the comment associated with the entry, if there is one.

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  ) 
void zipios::ZipCDirEntry::setComment ( const string &  comment  )  [virtual]

Sets the comment field for the FileEntry.

Parameters:
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.

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.


Friends And Related Function Documentation

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.


The documentation for this class was generated from the following files:

Generated on Wed Nov 23 19:02:52 2011 for FreeCAD by  doxygen 1.6.1