00001 #ifndef cbvswritemgr_h 00002 #define cbvswritemgr_h 00003 00004 /*+ 00005 ________________________________________________________________________ 00006 00007 (C) dGB Beheer B.V.; (LICENSE) http://opendtect.org/OpendTect_license.txt 00008 Author: A.H.Bril 00009 Date: 12-3-2001 00010 Contents: Common Binary Volume Storage format writer 00011 RCS: $Id: cbvswritemgr.h,v 1.17 2009-07-22 16:01:15 cvsbert Exp $ 00012 ________________________________________________________________________ 00013 00014 -*/ 00015 00016 #include "cbvsio.h" 00017 #include "cbvsinfo.h" 00018 #include <iosfwd> 00019 00020 class CBVSWriter; 00021 00024 mStruct VBrickSpec 00025 { 00026 VBrickSpec() { setStd(false); } 00027 00028 void setStd(bool yn_bricking=false); 00029 00030 int nrsamplesperslab; 00031 int maxnrslabs; 00032 }; 00033 00034 00037 mClass CBVSWriteMgr : public CBVSIOMgr 00038 { 00039 public: 00040 00041 CBVSWriteMgr(const char* basefname,const CBVSInfo&, 00042 const PosAuxInfo* =0,VBrickSpec* =0, 00043 bool singlefile=false, 00044 CBVSIO::CoordPol cp=CBVSIO::InAux); 00046 ~CBVSWriteMgr(); 00047 00048 unsigned long bytesPerFile() const; 00053 void setBytesPerFile(unsigned long); 00055 00056 bool put(void**); 00058 void close(); 00060 00061 int nrComponents() const; 00062 const BinID& binID() const; 00063 00064 void ensureConsistent(); 00065 00066 protected: 00067 00068 ObjectSet<CBVSWriter> writers_; 00069 TypeSet<int> endsamps_; 00070 CBVSInfo info_; 00071 bool single_file; 00072 CBVSIO::CoordPol coordpol_; 00073 00074 const char* errMsg_() const; 00075 00076 std::ostream* mkStrm(); 00077 void cleanup(); 00078 00079 }; 00080 00081 00082 #endif
1.7.1