Zipios++
|
00001 #ifndef BASICENTRY_H 00002 #define BASICENTRY_H 00003 00004 #include "zipios++/zipios-config.h" 00005 00006 #include "zipios++/meta-iostreams.h" 00007 #include <string> 00008 00009 #include "zipios++/fcollexceptions.h" 00010 #include "zipios++/fileentry.h" 00011 #include "zipios++/filepath.h" 00012 #include "zipios++/zipios_defs.h" 00013 00014 namespace zipios { 00015 00018 class BasicEntry : public FileEntry { 00019 public: 00024 explicit BasicEntry( const string &filename, const string &comment, 00025 const FilePath &basepath = FilePath() ) ; 00026 virtual string getComment() const ; 00027 virtual uint32 getCompressedSize() const ; 00028 virtual uint32 getCrc() const ; 00029 virtual vector< unsigned char > getExtra() const ; 00030 virtual StorageMethod getMethod() const ; 00031 virtual string getName() const ; 00032 virtual string getFileName() const ; 00033 virtual uint32 getSize() const ; 00034 virtual int getTime() const ; 00035 virtual bool isValid() const ; 00036 00037 // virtual int hashCode() const ; 00038 virtual bool isDirectory() const ; 00039 00040 virtual void setComment( const string &comment ) ; 00041 virtual void setCompressedSize( uint32 size ) ; 00042 virtual void setCrc( uint32 crc ) ; 00043 virtual void setExtra( const vector< unsigned char > &extra ) ; 00044 virtual void setMethod( StorageMethod method ) ; 00045 virtual void setName( const string &name ) ; 00046 virtual void setSize( uint32 size ) ; 00047 virtual void setTime( int time ) ; 00048 00049 virtual string toString() const ; 00050 00051 virtual FileEntry *clone() const ; 00052 00053 virtual ~BasicEntry() ; 00054 protected: 00055 string _filename ; 00056 string _comment ; 00057 int _size ; 00058 bool _valid ; 00059 FilePath _basepath ; 00060 00061 }; 00062 00063 } 00064 #endif 00065 00070 /* 00071 Zipios++ - a small C++ library that provides easy access to .zip files. 00072 Copyright (C) 2000 Thomas Søndergaard 00073 00074 This library is free software; you can redistribute it and/or 00075 modify it under the terms of the GNU Lesser General Public 00076 License as published by the Free Software Foundation; either 00077 version 2 of the License, or (at your option) any later version. 00078 00079 This library is distributed in the hope that it will be useful, 00080 but WITHOUT ANY WARRANTY; without even the implied warranty of 00081 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00082 Lesser General Public License for more details. 00083 00084 You should have received a copy of the GNU Lesser General Public 00085 License along with this library; if not, write to the Free Software 00086 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 00087 */