![]() |
OpenSWMM Engine
6.0.0-alpha.1
Data-oriented, plugin-extensible SWMM Engine (6.0.0-alpha.1)
|
Global utility methods. More...
Functions | |
| double | UCF (int quantity) |
| Computes a conversion factor from SWMM's internal units to user's units. | |
| int | getInt (char *s, int *y) |
| Converts a string to an int value. | |
| int | getFloat (char *s, float *y) |
| Converts a string to a float value. | |
| int | getDouble (char *s, double *y) |
| Converts a string to a double precision floating point number. | |
| char * | getTempFileName (char *fname) |
| Creates a temporary file name with path prepended to it. | |
| int | findmatch (char *s, char *keyword[]) |
| Finds match between string and array of keyword strings. | |
| int | match (char *str, char *substr) |
| Sees if a sub-string of characters appears in a string (not case sensitive). (not case sensitive). | |
| int | strcomp (const char *s1, const char *s2) |
| Compares two strings (case insensitive). | |
| size_t | sstrncpy (char *dest, const char *src, size_t n) |
| Copies a string to a new memory location in a safe way. | |
| size_t | sstrcat (char *dest, const char *src, size_t destsize) |
| Safe string concatenation. | |
| void | writecon (const char *s) |
| Writes string to console. | |
| void | getElapsedTime (DateTime aDate, int *days, int *hrs, int *mins) |
| Finds elapsed simulation time for a given calendar date. | |
| DateTime | getDateTime (double elapsedMsec) |
| Finds calendar date/time value for elapsed milliseconds of simulation time. | |
| char * | addAbsolutePath (char *fname) |
| Adds an absolute path name to a file name. | |
Global utility methods.
| char * addAbsolutePath | ( | char * | fname | ) |
Adds an absolute path name to a file name.
| [in] | fname | file name string |
| int findmatch | ( | char * | s, |
| char * | keyword[] | ||
| ) |
Finds match between string and array of keyword strings.
| [in] | s | a character string |
| [in] | keyword | array of keyword strings |
Finds match between string and array of keyword strings.
| [in] | s | a character string |
| [in] | keyword | array of keyword strings |
Finds match between string and array of keyword strings.
| DateTime getDateTime | ( | double | elapsedMsec | ) |
Finds calendar date/time value for elapsed milliseconds of simulation time.
| [in] | elapsedMsec | elapsed time in milliseconds |
| int getDouble | ( | char * | s, |
| double * | y | ||
| ) |
Converts a string to a double precision floating point number.
| [in] | s | a character string |
| [out] | y | converted value of s |
Converts a string to a double precision floating point number.
| [in] | s | a character string |
| [out] | y | converted value of s |
Converts a string to a double precision floating point number.
| void getElapsedTime | ( | DateTime | aDate, |
| int * | days, | ||
| int * | hrs, | ||
| int * | mins | ||
| ) |
Finds elapsed simulation time for a given calendar date.
| [in] | aDate | a calendar date + time |
| [out] | days | number of days since simulation start |
| [out] | hrs | number of hours since start of current day |
| [out] | mins | number of minutes since start of current hour |
| int getFloat | ( | char * | s, |
| float * | y | ||
| ) |
Converts a string to a float value.
| [in] | s | a character string |
| [out] | y | converted value of s |
Converts a string to a float value.
| [in] | s | a character string |
| [out] | y | converted value of s |
Converts a string to a float value.
| int getInt | ( | char * | s, |
| int * | y | ||
| ) |
Converts a string to an int value.
| [in] | s | a character string |
| [out] | y | converted value of s |
Converts a string to an int value.
| [in] | s | a character string |
| [out] | y | converted value of s |
Converts a string to an int value.
| char * getTempFileName | ( | char * | fname | ) |
Creates a temporary file name with path prepended to it.
| [in] | fname | file name string (with max size of MAXFNAME) |
| int match | ( | char * | str, |
| char * | substr | ||
| ) |
Sees if a sub-string of characters appears in a string (not case sensitive). (not case sensitive).
| [in] | str | character string being searched |
| [in] | substr | sub-string being searched for |
Sees if a sub-string of characters appears in a string (not case sensitive). (not case sensitive).
| [in] | str | character string being searched |
| [in] | substr | sub-string being searched for |
Sees if a sub-string of characters appears in a string (not case sensitive). (not case sensitive).
| size_t sstrcat | ( | char * | dest, |
| const char * | src, | ||
| size_t | destsize | ||
| ) |
Safe string concatenation.
| [in,out] | dest | string to be appended |
| [in] | src | string to append to dest |
| [in] | destsize | allocated size of dest (including null terminator) |
| size_t sstrncpy | ( | char * | dest, |
| const char * | src, | ||
| size_t | n | ||
| ) |
Copies a string to a new memory location in a safe way.
| [in] | s | a character string |
| [in] | src | pointer to source string |
| [in] | n | number of characters to copy from source string |
| int strcomp | ( | const char * | s1, |
| const char * | s2 | ||
| ) |
Compares two strings (case insensitive).
| [in] | s1 | first string |
| [in] | s2 | second string |
| double UCF | ( | int | quantity | ) |
Computes a conversion factor from SWMM's internal units to user's units.
| [in] | integer | code of quantity being converted |
| void writecon | ( | const char * | s | ) |
Writes string to console.
| [in] | s | a character string |