CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_5_2_7_hltpatch2/src/Utilities/StorageFactory/interface/Storage.h

Go to the documentation of this file.
00001 #ifndef STORAGE_FACTORY_STORAGE_H
00002 # define STORAGE_FACTORY_STORAGE_H
00003 
00004 # include "Utilities/StorageFactory/interface/IOInput.h"
00005 # include "Utilities/StorageFactory/interface/IOOutput.h"
00006 # include "Utilities/StorageFactory/interface/IOPosBuffer.h"
00007 
00008 class Storage : public virtual IOInput, public virtual IOOutput
00009 {
00010 public:
00011   enum Relative { SET, CURRENT, END };
00012 
00013   Storage (void);
00014   virtual ~Storage (void);
00015 
00016   using IOInput::read;
00017   using IOInput::readv;
00018   using IOOutput::write;
00019   using IOOutput::writev;
00020 
00021   virtual bool          prefetch (const IOPosBuffer *what, IOSize n);
00022   virtual IOSize        read (void *into, IOSize n, IOOffset pos);
00023   IOSize                read (IOBuffer into, IOOffset pos);
00024   virtual IOSize        readv (IOPosBuffer *into, IOSize buffers);
00025   virtual IOSize        write (const void *from, IOSize n, IOOffset pos);
00026   IOSize                write (IOBuffer from, IOOffset pos);
00027   virtual IOSize        writev (const IOPosBuffer *from, IOSize buffers);
00028 
00029   virtual bool          eof (void) const;
00030   virtual IOOffset      size (void) const;
00031   virtual IOOffset      position (void) const;
00032   virtual IOOffset      position (IOOffset offset, Relative whence = SET) = 0;
00033 
00034   virtual void          rewind (void);
00035 
00036   virtual void          resize (IOOffset size) = 0;
00037 
00038   virtual void          flush (void);
00039   virtual void          close (void);
00040 
00041 private:
00042   // undefined, no semantics
00043   Storage (const Storage &);
00044   Storage &operator= (const Storage &);
00045 };
00046 
00047 #endif // STORAGE_FACTORY_STORAGE_H