basicentry.h

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

Generated on Wed Nov 23 18:59:57 2011 for FreeCAD by  doxygen 1.6.1