OpenSWMM Engine  6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
Loading...
Searching...
No Matches
Global Project Methods

Global methods associated with a SWMM project. More...

Collaboration diagram for Global Project Methods:

Functions

void project_open (const char *inp_file, const char *rpt_file, const char *out_file)
 Opens a new SWMM project.
 
void project_close (void)
 Close project.
 
void project_readInput (void)
 Read project inputs.
 
int project_readOption (char *s1, char *s2)
 Reads a project option from a pair of string tokens.
 
void project_validate (void)
 Checks validity of project data.
 
int project_init (void)
 Initializes the internal state of the project.
 
int project_addObject (int type, char *id, int n)
 Adds an object Id to a hash table.
 
int project_findObject (int type, const char *id)
 Uses hash table to find index of an object with a given ID.
 
char * project_findID (int type, char *id)
 Uses hash table to find address of a given string entry.
 
double ** project_createMatrix (int nrows, int ncols)
 Allocates memory for a matrix of doubles.
 
void project_freeMatrix (double **m)
 Frees memory allocated for a matrix of doubles.
 

Detailed Description

Global methods associated with a SWMM project.

Function Documentation

◆ project_addObject()

int project_addObject ( int  type,
char *  id,
int  n 
)

Adds an object Id to a hash table.

Parameters
[in]typeObject type
[in]idObject ID string
[in]nObject index
Returns
0 if object already added, 1 if not, -1 if hashing fails
Here is the call graph for this function:

◆ project_close()

void project_close ( void  )

Close project.

◆ project_createMatrix()

double ** project_createMatrix ( int  nrows,
int  ncols 
)

Allocates memory for a matrix of doubles.

Parameters
[in]nrowsNumber of rows (0-based)
[in]ncolsNumber of columns (0-based)
Returns
Pointer to a matrix of doubles

◆ project_findID()

char * project_findID ( int  type,
char *  id 
)

Uses hash table to find address of a given string entry.

Parameters
[in]typeObject type
[in]idID name being sought
Returns
Pointer to location where object's ID string is stored
Here is the call graph for this function:
Here is the caller graph for this function:

◆ project_findObject()

int project_findObject ( int  type,
const char *  id 
)

Uses hash table to find index of an object with a given ID.

Parameters
[in]typeObject type
[in]idObject ID string
Returns
Returns index of object with given ID, or -1 if not found
Here is the call graph for this function:
Here is the caller graph for this function:

◆ project_freeMatrix()

void project_freeMatrix ( double **  m)

Frees memory allocated for a matrix of doubles.

Here is the caller graph for this function:

◆ project_init()

int project_init ( void  )

Initializes the internal state of the project.

Here is the call graph for this function:

◆ project_open()

void project_open ( const char *  inp_file,
const char *  rpt_file,
const char *  out_file 
)

Opens a new SWMM project.

Parameters
[in]inp_fileSWMM input file
[in]rpt_fileSWMM report file
[in]out_fileSWMM output file

◆ project_readInput()

void project_readInput ( void  )

Read project inputs.

Here is the call graph for this function:

◆ project_readOption()

int project_readOption ( char *  s1,
char *  s2 
)

Reads a project option from a pair of string tokens.

Parameters
[in]s1Option keyword
[in]s2String representation of option's value
Returns
Error code
Note
All project options have default values assigned in setDefaults().
Here is the call graph for this function:

◆ project_validate()

void project_validate ( void  )

Checks validity of project data.

Here is the call graph for this function: