Diffpack Documentation


Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Search  

FieldWriter.h

Go to the documentation of this file.
00001 
00005 class FieldWriter
00006 
00007 {
00008 private:
00009 
00010   static long int int_SIZE;
00011   static long int long_SIZE;
00012 
00013   String name_of_dataset;
00014   String fname;
00015 
00016   
00017   Os fieldfile;
00018   Os gridfile;
00019 
00020   Format_type field_format;
00021   Format_type grid_format;
00022 
00023   
00024   Os field_ixfile;
00025   Os grid_ixfile;
00026 
00027   
00028   Os simres_map;
00029 
00030   
00031   FieldReader reader;
00032 
00033   
00034   bool files_open;
00035   FileMode next_openmode_ix,next_openmode_dat;
00036   bool xdr_format;
00037 
00038 
00039   void writeGridHeader
00040      (
00041       const Grid&  grid,
00042             int    gridnum,
00043             int    checknum
00044      );
00045 
00046   void updateGridIndex (int gridnum, long address);
00047 
00048   void writeFieldHeader
00049      (
00050             Field&  field,
00051             int  fieldnum,
00052             int  gridnum,
00053       const String& header,
00054             real time,
00055       const String& description,
00056             int  component,
00057             int  maxcomponent
00058      );
00059 
00060   void updateFieldIndex (int fieldnum, long address);
00061 
00062   void  open();          
00063   void  close();         
00064 
00065   
00066   static StringList dataset_names;
00067   bool datasetIsManaged (const String& dataset_name);
00068   void newDataset (const String& dataset_name);
00069 
00070 public:
00071 
00072   FieldWriter ();
00073   FieldWriter (const String& dataset_name, bool append = false);
00074  ~FieldWriter();
00075 
00076   
00077   void setDatasetName (const String& dataset_name,
00078                        bool append = false);
00079 
00080   void setStorageMode (Format_type field_format, Format_type grid_format);
00081 
00082   int writeField               
00083      (
00084             Field&  field,
00085       const String& header,
00086             real    time,
00087       const String& description,
00088             int     component = 1,
00089             int     maxcomponent = 1
00090      );
00091 
00092   int writeField               
00093      (
00094             Field&  field,
00095       const String& header,
00096             real    time = DUMMY,
00097             int     component = 1,
00098             int     maxcomponent = 1
00099      );
00100 
00101   int writeField               
00102      (
00103       Field&  field,
00104       real    time = DUMMY,
00105       int     component = 1,
00106       int     maxcomponent = 1
00107      );
00108 };
00109 
00110 

Copyright © 2003 inuTech GmbH. All rights reserved.