Main Page   Compound List   File List   Compound Members   File Members  

CellState.c File Reference

#include "CellState.h"

Go to the source code of this file.

Functions

CellStateInitCellStateFuels (GridData * fuels, ChHashTable * fmtble)
 Allocates memory for CellState structure of same size as fuels array. More...

int CellStateSetCellStateRowCol (CellState * cs, int i, int j, EnumCellState state)
 Sets the state of the cell at array i,j location. More...

int CellStateSetCellStateRealWorld (CellState * cs, double rwx, double rwy, EnumCellState state)
 Sets the state of the cell at real world x,y location. More...

void FreeCellState (CellState * cs)
 Frees memory associated with CellState 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 CellState.c.


Function Documentation

int CellStateSetCellStateRealWorld ( CellState * cs,
double rwx,
double rwy,
EnumCellState state )
 

Sets the state of the cell at real world x,y location.

See also:
CellState
Parameters:
cs   CellState struct to be set by function
rwx   real world x coordinate
rwy   real world y coordinate
state   state to assign to location
Return values:
ERR_SUCCESS   (0) if operation successful, an error code otherwise
Note:
Best use of this facility is as follows:
            int error_status = SomeFunctionXXX();
            if ( error_status )
                // something bad happened

Definition at line 96 of file CellState.c.

int CellStateSetCellStateRowCol ( CellState * cs,
int i,
int j,
EnumCellState state )
 

Sets the state of the cell at array i,j location.

See also:
CellState
Parameters:
cs   CellState struct to be set by function
i   row index
j   column index
state   state to assign to location
Return values:
ERR_SUCCESS   (0) if operation successful, an error code otherwise
Note:
Best use of this facility is as follows:
            int error_status = SomeFunctionXXX();
            if ( error_status )
                // something bad happened

Definition at line 82 of file CellState.c.

void FreeCellState ( CellState * cs )
 

Frees memory associated with CellState structure.

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

See also:
CellState
Parameters:
cs   ptr to CellState

Definition at line 119 of file CellState.c.

CellState * InitCellStateFuels ( GridData * fuels,
ChHashTable * fmtble )
 

Allocates memory for CellState structure of same size as fuels array.

See also:
CellState
Parameters:
fuels   Raster of fuel model numbers
fmtble   ChHashTable of fuel model attributes
Return values:
CellState   * Ptr to initialized CellState structure

Definition at line 27 of file CellState.c.


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