00001
00026 #ifndef FuelModel_H
00027 #define FuelModel_H
00028
00029 #include <stdlib.h>
00030 #include <stdio.h>
00031 #include <string.h>
00032
00033 #include "Err.h"
00034 #include "FuelSizeClasses.h"
00035 #include "RothFuelModel.h"
00036 #include "PhysFuelModel.h"
00037
00038
00039
00040
00041
00042
00043
00047 #define FUELMODEL_UNNAMED_MODEL ("UNNAMED")
00048
00055 enum FuelModelType_ {
00056 EnumUnknownFuelModelType = 0,
00057 EnumRoth = 1,
00058 EnumPhys = 2
00059 };
00060
00061
00062
00063
00064
00065
00066
00070 typedef enum FuelModelType_ FuelModelType;
00071
00075 typedef struct FuelModel_ FuelModel;
00076
00080 struct FuelModel_ {
00082 int model_num;
00084 char * model_name;
00086 char * model_desc;
00088 FuelModelType type;
00090 RothFuelModel * rfm;
00092 PhysFuelModel * pfm;
00093 };
00094
00095
00096
00097
00098
00099
00100
00101
00102
00103
00104
00105
00106
00119 FuelModel * InitFuelModelEmpty(int fm_num, char * fm_name, char * fm_desc);
00120
00136 FuelModel * InitFuelModelFMDFile(int fm_num, char * fm_name, char * fm_desc, char * fmd_fname, FuelModelType type);
00137
00150 FuelModel * InitFuelModelUnBurnable(int fm_num, char * fm_name, char * fm_desc, FuelModelType type);
00151
00158 void FuelModelDumpToStream(FuelModel * fm, FILE * fstream);
00159
00168 int CmpNumToFuelModelNum(const void * fm_num, const void * fm);
00169
00177 void FreeFuelModel(void * vptr);
00178
00179 #endif FuelModel_H