#include <ariaUtil.h>
Public Types | |
enum | BITS { BIT0 = 0x1, BIT1 = 0x2, BIT2 = 0x4, BIT3 = 0x8, BIT4 = 0x10, BIT5 = 0x20, BIT6 = 0x40, BIT7 = 0x80, BIT8 = 0x100, BIT9 = 0x200, BIT10 = 0x400, BIT11 = 0x800, BIT12 = 0x1000, BIT13 = 0x2000, BIT14 = 0x4000, BIT15 = 0x8000 } |
Values for the bits from 0 to 16. More... | |
enum | REGKEY { REGKEY_CLASSES_ROOT, REGKEY_CURRENT_CONFIG, REGKEY_CURRENT_USER, REGKEY_LOCAL_MACHINE, REGKEY_USERS } |
Static Public Methods | |
void | sleep (unsigned int ms) |
Sleep for the given number of milliseconds. More... | |
unsigned int | getTime (void) |
Get the time in milliseconds. More... | |
template<class T> void | deleteSet (T begin, T end) |
Delete all members of a set. Does NOT empty the set. More... | |
template<class T> void | deleteSetPairs (T begin, T end) |
Delete all members of a set. Does NOT empty the set. More... | |
void | splitString (std::string inString, std::list< std::string > &outList) |
Split a string into a set of words. More... | |
long | sizeFile (std::string fileName) |
OS-independent way of finding the size of a file. More... | |
bool | findFile (const char *fileName) |
OS-independent way of checking to see if a file exists and is readable. More... | |
bool | stripDir (std::string fileIn, std::string &fileOut) |
OS-independent way of stripping the directory from the filename. More... | |
bool | stripFile (std::string fileIn, std::string &fileOut) |
OS-independent way of stripping the filename from the directory. More... | |
void | appendSlash (std::string &path) |
Appends a slash to a path if there is not one there already. More... | |
void | fixSlashes (std::string &path) |
Fix the slash orientation in file path string for windows or linux. More... | |
void | fixSlashesForward (std::string &path) |
Fix the slash orientation in file path string to be all forward. More... | |
void | fixSlashesBackward (std::string &path) |
Fix the slash orientation in file path string to be all backward. More... | |
int | strcmp (std::string str, std::string str2) |
Finds out if two strings are equal. More... | |
int | strcmp (std::string str, const char *str2) |
Finds out if two strings are equal. More... | |
int | strcmp (const char *str, std::string str2) |
Finds out if two strings are equal. More... | |
int | strcmp (const char *str, const char *str2) |
Finds out if two strings are equal. More... | |
void | escapeSpaces (char *dest, const char *src) |
Puts a \ before spaces in src, puts it into dest. More... | |
std::string | getStringFromFile (const char *fileName) |
Returns a string contained in an arbitrary file. More... | |
bool | getStringFromRegistry (REGKEY root, const char *key, const char *value, char *str, int len) |
Returns a string from the Windows registry. More... |
|
|
These are for passing into getStringFromRegistry |
|
Appends a slash to a path if there is not one there already.
|
|
Delete all members of a set. Does NOT empty the set. Assumes that T is an iterator that supports the operator *, operator!= and operator++. The return is assumed to be a pointer to a class that needs to be deleted. |
|
Delete all members of a set. Does NOT empty the set. Assumes that T is an iterator that supports the operator **, operator!= and operator++. The return is assumed to be a pair. The second value of the pair is assumed to be a pointer to a class that needs to be deleted. |
|
Puts a \ before spaces in src, puts it into dest. This copies src into dest but puts a \ before any spaces in src, escaping them... its mostly for use with ArArgumentBuilder... make sure you have enough space in the arrays that you're passing as dest... this allocates no memory |
|
OS-independent way of checking to see if a file exists and is readable.
|
|
Fix the slash orientation in file path string for windows or linux.
|
|
Fix the slash orientation in file path string to be all backward.
|
|
Fix the slash orientation in file path string to be all forward.
|
|
Returns a string contained in an arbitrary file.
This function looks in the given filename and extracts a string from the file. The string can contain spaces or tabs, but a '\r' or '
|
|
Returns a string from the Windows registry. This takes a root key, and looks up the given <key> within that root, then finds the string given to <value> and returns it.
|
|
Get the time in milliseconds. Get the time in milliseconds, counting from some arbitrary point. This time is only valid within this run of the program.
|
|
OS-independent way of finding the size of a file.
|
|
Sleep for the given number of milliseconds. This sleeps for the given number of milliseconds... Note in linux it tries to sleep for 10 ms less than the amount given, which should wind up close to correct... Linux is broken in this regard and sleeps for too long... it sleeps for the ceiling of the current 10 ms range, then for an additional 10 ms... so: 11 to 20 ms sleeps for 30 ms... 21 to 30 ms sleeps for 40 ms... 31 to 40 ms sleeps for 50 ms... this continues on up to the values we care about of.. 81 to 90 ms sleeps for 100 ms... 91 to 100 ms sleeps for 110 ms... so we'll sleep for 10 ms less than we want to, which should put us about right... guh
|
|
Split a string into a set of words. Takes a string and splits it into a list of words. It appends the words to the outList. If there is nothing found, it will not touch the outList.
|
|
Finds out if two strings are equal. This compares two strings, it returns an integer less than, equal to, or greater than zero if str is found, respectively, to be less than, to match, or be greater than str2.
|
|
Finds out if two strings are equal. This compares two strings, it returns an integer less than, equal to, or greater than zero if str is found, respectively, to be less than, to match, or be greater than str2.
|
|
Finds out if two strings are equal. This compares two strings, it returns an integer less than, equal to, or greater than zero if str is found, respectively, to be less than, to match, or be greater than str2.
|
|
Finds out if two strings are equal. This compares two strings, it returns an integer less than, equal to, or greater than zero if str is found, respectively, to be less than, to match, or be greater than str2.
|
|
OS-independent way of stripping the directory from the filename. Works for \ and /. Returns true if something was actualy done. Sets fileOut to be what ever the answer is.
|
|
OS-independent way of stripping the filename from the directory. Works for \ and /. Returns true if something was actualy done. Sets fileOut to be what ever the answer is.
|