Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages   Examples  

CTBzfile.hxx

Go to the documentation of this file.
00001 #ifndef _CTBzfile_HXX
00002 #define _CTBzfile_HXX 1
00003 
00008 /*----------------------------------------------------------------------------*/
00009 /* C Tool Box: Designed and implemented by:                                   */
00010 /*    Walter F.J. Mueller   Gesellschaft fuer Schwerionenforschung (GSI)      */
00011 /*                          Planckstrasse 1, D-64291 Darmstadt, Germany       */
00012 /*                  Email:  W.F.J.Mueller@gsi.de                              */
00013 /*                  WWW:    http://www-kp3.gsi.de/www/kp3/people/mueller.html */
00014 /*------------------------------------------+---------------------------------*/
00015 
00016 class CTBzfile {
00017 
00018   public:
00019 
00020                     CTBzfile();
00021 
00022                     ~CTBzfile();
00023 
00024     bool            Open(const char *c_name, const char *c_mode);
00025     void            Close();
00026 
00027     CTBint          Read(void* p_buf, CTBint i_size);
00028     CTBint          Write(const void* p_buf, CTBint i_size);
00029 
00030     CTBint          ReadObject(void* p_buf, CTBint i_size);
00031     CTBint          WriteObject(const void* p_buf, CTBint i_size);
00032 
00033     bool            Good();
00034     bool            Bad();
00035     bool            Fail();
00036     bool            Eof();
00037 
00038     void            Dump(int i_indent=0, ostream& os=cout,
00039                          const char* p_text=0) const; 
00040 
00041   private:
00042 
00043     enum type { closed = 0,                 
00044                 cfile,                      
00045                 gzfile                      
00046     };
00047 
00048     int             mi_type;                
00049     void*           m_file;                 
00050     bool            mb_bad;                 
00051     bool            mb_eof;                 
00052 };
00053 
00054 
00055 #endif

Generated at Fri Oct 24 18:11:31 2003 for CTBbase by doxygen1.2.9-20010812 written by Dimitri van Heesch, © 1997-2001