Main Page   Compound List   File List   Compound Members   File Members  

FuelModel.c File Reference

#include "FuelModel.h"

Go to the source code of this file.

Functions

FuelModelInitFuelModelEmpty (int fm_num, char * fm_name, char * fm_desc)
 Initializes an empty FuelModel structure. More...

FuelModelInitFuelModelFMDFile (int fm_num, char * fm_name, char * fm_desc, char * fmd_fname, FuelModelType type)
 Initializes the the FuelModel structure with attributes from a .FMD file. More...

FuelModelInitFuelModelUnBurnable (int fm_num, char * fm_name, char * fm_desc, FuelModelType type)
 Initializes the the FuelModel structure as unburnable fuel. More...

int CmpNumToFuelModelNum (const void * fm_num, const void * fm)
 Tests if model num given by first argument is same as model num in FuelModel. More...

void FuelModelDumpToStream (FuelModel * fm, FILE * fstream)
 Dumps contents of Fuel Model to stream. More...

void FreeFuelModel (void * vptr)
 Frees memory associated with FuelModel structure. More...


Detailed Description

Author(s):
Marco Morais
Date:
2000-2001

HFire (Highly Optmized Tolerance Fire Spread Model) Library Copyright (C) 2001 Marco Morais

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA

Definition in file FuelModel.c.


Function Documentation

int CmpNumToFuelModelNum ( const void * fm_num,
const void * fm )
 

Tests if model num given by first argument is same as model num in FuelModel.

Can be passed as function pointer for comparison tests.

Parameters:
fm_num   an int fuel model number to match to
fm   ptr to FuelModel
Return values:
int   1 if numbers match, else 0

Definition at line 274 of file FuelModel.c.

void FreeFuelModel ( void * vptr )
 

Frees memory associated with FuelModel structure.

Subsequent calls to methods taking FuelModel as argument will not work.

See also:
FuelModel
Parameters:
vptr   ptr to FuelModel

Definition at line 312 of file FuelModel.c.

Referenced by InitFuelModelFMDFile(), and InitFuelModelUnBurnable().

void FuelModelDumpToStream ( FuelModel * fm,
FILE * fstream )
 

Dumps contents of Fuel Model to stream.

See also:
FuelModel
Parameters:
fm   ptr to FuelModel
fstream   an open stream to dump to, can be stdout, stderr, or open FILE stream

Definition at line 278 of file FuelModel.c.

Referenced by FireConfigDumpFuelModelListToStream().

int FuelModelInitPhysFuelModel ( FuelModel * fm,
char * fmd_fname )
 

Definition at line 226 of file FuelModel.c.

int FuelModelInitPhysFuelModelUnBurnable ( FuelModel * fm )
 

Definition at line 262 of file FuelModel.c.

int FuelModelInitRothFuelModel ( FuelModel * fm,
char * fmd_fname )
 

Definition at line 165 of file FuelModel.c.

int FuelModelInitRothFuelModelUnBurnable ( FuelModel * fm )
 

Definition at line 201 of file FuelModel.c.

FuelModel * InitFuelModelEmpty ( int fm_num,
char * fm_name,
char * fm_desc )
 

Initializes an empty FuelModel structure.

Does not initialize structure members (eg RothFuelModel or PhysFuelModel) containing attributes.

See also:
FuelModel , RothFuelModel , PhysFuelModel
Parameters:
fm_num   number of newly initialized FuelModel
fm_name   name opf newly initialized FuelModel
fm_desc   description of newly initialized FuelModel
Return values:
FuelModel   * Ptr to initialized FuelModel structure

Definition at line 41 of file FuelModel.c.

Referenced by InitFuelModelFMDFile(), and InitFuelModelUnBurnable().

FuelModel * InitFuelModelFMDFile ( int fm_num,
char * fm_name,
char * fm_desc,
char * fmd_fname,
FuelModelType type )
 

Initializes the the FuelModel structure with attributes from a .FMD file.

If FuelModelType is EnumRoth, then RothFuelModel structure populated. If FuelModelType is EnumPhys, then PhysFuelModel structure populated.

See also:
FuelModel , RothFuelModel , PhysFuelModel
Parameters:
fm_num   number of newly initialized FuelModel
fm_name   name opf newly initialized FuelModel
fm_desc   description of newly initialized FuelModel
fmd_fname   name of fmd file containing FuelModel attributes
type   which style of attributes (Roth or Phys) should be populated
Return values:
FuelModel   * Ptr to initialized FuelModel structure

Definition at line 96 of file FuelModel.c.

Referenced by InitRothFuelModelListFromProps().

FuelModel * InitFuelModelUnBurnable ( int fm_num,
char * fm_name,
char * fm_desc,
FuelModelType type )
 

Initializes the the FuelModel structure as unburnable fuel.

If FuelModelType is EnumRoth, then RothFuelModel structure populated. Else FuelModelType is EnumPhys, then PhysFuelModel structure populated.

See also:
FuelModel
Parameters:
fm_num   number of newly initialized FuelModel
fm_name   name opf newly initialized FuelModel
fm_desc   description of newly initialized FuelModel
type   which style of attributes (Roth or Phys) should be populated
Return values:
FuelModel   * Ptr to initialized FuelModel structure

Definition at line 124 of file FuelModel.c.

Referenced by InitRothFuelModelListFromProps().


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