32 #ifndef EGS_FUNCTIONS_
33 #define EGS_FUNCTIONS_
59 const EGS_Float
epsilon = 1.0/(1<<21);
172 enum EGS_InfoType { Information, Warning, Fatal };
270 bool EGS_EXPORT egsEquivStr(
const string &a,
const string &b);
#define EGS_EXPORT
Export symbols from the egspp library.
string egsStripPath(const string &aname)
Strip the path from a file name and return the result.
const EGS_I64 loopMax
The maximum number of iterations for near-infinite loops.
bool EGS_EXPORT egsGetI64(istream &data, EGS_I64 &n)
Reads a 64 bit integer from the stream data and assigns it to n. Returns true on success, false on failure.
int egsGetPid()
Get the process id.
bool egsIsAbsolutePath(const string &path)
Does the string path represent an absolute path name?
const EGS_Float distanceEpsilon
The distanceEpsilon constant for physical distance comparisons.
bool EGS_EXPORT egsStoreI64(ostream &data, EGS_I64 n)
Writes the 64 bit integer n to the output stream data and returns true on success, false on failure.
string egsJoinPath(const string &first, const string &second)
Join two path variables (or a path and a file name) using the platform specific directory separator a...
EGS_InfoFunction egsSetInfoFunction(EGS_InfoType t, EGS_InfoFunction func)
Set a function to be used for outputing information, warning messages or reporting fatal errors...
void egsSetDefaultIOFunctions()
Reset I/O functions to their defaults.
const EGS_Float veryFar
A very large float.
void egsSwapBytes(int *n)
Swap the bytes of 32 bit integers.
EGS_InfoFunction EGS_EXPORT egsFatal
Always use this function for reporting fatal errors.
string egsExpandPath(const string &aname)
Expands first environment variable found in a file name.
EGS_InfoFunction EGS_EXPORT egsInformation
Always use this function for reporting the progress of a simulation and any other type of information...
int egsGetEndian()
Get the endianess of the machine.
string egsSimplifyCVSKey(const string &key)
Remove the $'s from a CVS key.
const EGS_Float epsilon
The epsilon constant for floating point comparisons.
Defines the EGS_EXPORT and EGS_LOCAL macros.
void(* EGS_InfoFunction)(const char *,...)
Defines a function printf-like prototype for functions to be used to report info, warnings...
string egsHostName()
Get the name of the host the program is running on.
EGS_InfoFunction EGS_EXPORT egsWarning
Always use this function for reporting warnings.