#include <Utilities.h>
Static Public Member Functions | |
| static int | absVal (const int &num) |
| static double | absVal (const double &num) |
| static bool | cStringEquals (const char *cString1, const char *cString2, int length) |
| static double | getDouble (const char *cString) |
| static double | getDouble (string s) |
| static int | getInt (const char *cString) |
| static int | getInt (string s) |
| static unsigned int | getNeuronGrpID (string neurGrpStr) |
| static unsigned int | getRandomUInt (unsigned int rangeHigh) |
| static short | getShort (const char *cString) |
| static short | getShort (string str) |
| static unsigned int | getUInt (const char *cString) |
| static unsigned int | getUInt (string s) |
| static unsigned short | getUShort (const char *cString) |
| static unsigned short | getUShort (string s) |
| static double | round (double number, unsigned int numPlaces) |
| static void | roundTwoDecimalPlaces (double &) |
| static void | safeCStringCat (char target[], const char source[], int targetSize) |
| static void | safeCStringCopy (char target[], const char source[], int targetSize) |
Definition at line 36 of file Utilities.h.
|
|
Returns the absolute value of the number. Definition at line 77 of file Utilities.cpp. |
|
|
Returns the absolute value of the number. Definition at line 69 of file Utilities.cpp. |
|
||||||||||||||||
|
Returns true if string1 = string2 without the possibility of a buffer overflow. Definition at line 86 of file Utilities.cpp. |
|
|
Converts string to double. Definition at line 155 of file Utilities.cpp. References getDouble(). |
|
|
Converts cstring to double. Definition at line 101 of file Utilities.cpp. References numConversionException. Referenced by getDouble(). |
|
|
Converts string to integer. Definition at line 182 of file Utilities.cpp. References getInt(). |
|
|
Converts cstring to signed integer. Definition at line 161 of file Utilities.cpp. References numConversionException. Referenced by getInt(), and getShort(). |
|
|
Extracts NeuronGrpID from string of the form "layerName[NeuronGrpID]". Definition at line 188 of file Utilities.cpp. References genUtilitiesException, and getUInt(). |
|
|
Returns a random unsigned integer betwen 0 and rangeHigh. rand() returns a number between 0 and RANGE_MAX, so dividing this by RANGE MAX gives a number between 0 and 1.0 Definition at line 208 of file Utilities.cpp. |
|
|
Converts string to short. Definition at line 225 of file Utilities.cpp. References getShort(). |
|
|
Converts cstring to short. Definition at line 214 of file Utilities.cpp. References getInt(), MAX_SHORT_VALUE, MIN_SHORT_VALUE, and numConversionException. Referenced by getShort(). |
|
|
Converts string to unsigned integer. Definition at line 245 of file Utilities.cpp. References getUInt(). |
|
|
Converts cstring to unsigned integer. Definition at line 231 of file Utilities.cpp. References numConversionException. Referenced by getNeuronGrpID(), and getUInt(). |
|
|
Converts string to unsigned short. Definition at line 268 of file Utilities.cpp. References getUShort(). |
|
|
Converts cstring to unsigned short. Definition at line 251 of file Utilities.cpp. References MAX_USHORT_VALUE, and numConversionException. Referenced by getUShort(). |
|
||||||||||||
|
Rounds the given double to the specified number of decimal places. Definition at line 274 of file Utilities.cpp. |
|
|
Rounds the given double to two decimal places. Definition at line 292 of file Utilities.cpp. |
|
||||||||||||||||
|
Adds source onto the end of target without potential buffer overflow. Definition at line 300 of file Utilities.cpp. References genUtilitiesException. |
|
||||||||||||||||
|
Carries out a safe copy of source cstring to target cstring that is no larger than targetSize. Definition at line 336 of file Utilities.cpp. References genUtilitiesException. Referenced by DBInterface::DBInterface(), and LogWriter::setLogPath(). |
1.4.4