Main Page   Compound List   File List   Compound Members   File Members  

FireExport.h

Go to the documentation of this file.
00001 
00027 #ifndef FireExport_H
00028 #define FireExport_H
00029 
00030 #include <stdlib.h>
00031 #include <stdio.h>
00032 #include <string.h>
00033 
00034 #ifdef USING_GD
00035 
00036 #include "FireExportImg.h"
00037 
00038 #endif /* INCLUDES SUPPORT FOR EXPORTING IMAGES FROM SIMULATION USING GD LIBRARY */
00039 
00040 #include "FireTimer.h"
00041 #include "FireYear.h"
00042 #include "FireProp.h"
00043 #include "GridData.h"
00044 #include "ChHashTable.h"
00045 #include "KeyVal.h"
00046 #include "Err.h"
00047 
00048 /*
00049  *********************************************************
00050  * DEFINES, ENUMS
00051  *********************************************************
00052  */
00053  
00054 #ifndef DOXYGEN_SHOULD_SKIP_THIS
00055 
00056 /* defaults for exported filenames */
00057 #define FIRE_EXPORT_DEFAULT_FILENAME_SIZE                       (256)
00058 #define FIRE_EXPORT_DEFAULT_TITLE_SIZE                          (40)
00059 
00060 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
00061 
00068 enum EnumFireExportFreq_    {
00069     EnumFreqTimestep    = 0,
00070     EnumFreqDaily       = 1,
00071     EnumFreqAnnual      = 2
00072     };
00073      
00074 /*
00075  *********************************************************
00076  * STRUCTS, TYPEDEFS
00077  *********************************************************
00078  */
00079 
00083 typedef enum EnumFireExportFreq_ EnumFireExportFreq;
00084 
00088 typedef struct FireExport_ FireExport;
00089 
00093 struct FireExport_  {
00095     EnumFireExportFreq exp_freq;
00097     FireTimer * ft;
00099     FireYear * fyr;
00101     GridData * fuels;
00103     GridData * std_age;
00105     int (* FireExportFireIDAscRaster)   (ChHashTable * proptbl, FireYear * fyr, FireTimer * ft);
00107     int (* FireExportFuelsAscRaster)    (ChHashTable * proptbl, GridData * fuels, FireTimer * ft);
00109     int (* FireExportStandAgeAscRaster) (ChHashTable * proptbl, GridData * std_age, FireTimer * ft);
00113     int (* FireExportFireIDPng)         (ChHashTable * proptbl, FireYear * fyr, FireTimer * ft);
00114     };
00115          
00116 /*
00117  *********************************************************
00118  * MACROS
00119  *********************************************************
00120  */
00121  
00127 #define FIRE_EXPORT_SET_FIRE_TIMER(fe, ft)                          ((fe)->ft = (ft))
00128 
00134 #define FIRE_EXPORT_SET_FIRE_YEAR(fe, fyr)                          ((fe)->fyr = (fyr))
00135 
00141 #define FIRE_EXPORT_SET_FUELS(fe, fuels)                            ((fe)->fuels = (fuels))
00142 
00148 #define FIRE_EXPORT_SET_STAND_AGE(fe, std_age)                      ((fe)->std_age = (std_age))
00149 
00150 /*
00151  *********************************************************
00152  * PUBLIC FUNCTIONS
00153  *********************************************************
00154  */
00155 
00166 FireExport * InitFireExport(ChHashTable * proptbl);
00167 
00185 int FireExportSpatialData(ChHashTable * proptbl, FireExport * fe);
00186 
00200 int FireExportInitTxtFileHeaders(ChHashTable * proptbl);
00201 
00219 int FireExportIgLocsTxtFile(ChHashTable * proptbl, double rwx, double rwy, FireTimer * ft);
00220 
00238 int FireExportSantaAnaEvtTxtFile(ChHashTable * proptbl, int duration, int year, int month, int day);
00239 
00248 void FreeFireExport(FireExport * fe);
00249   
00250 #endif FireExport_H     /* end of FireExport.h */

Generated at Fri Jun 22 00:46:50 2001 for HFire by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000