|
Classes |
class | RandomGen |
class | Regex |
struct | char_traits_char_nocase |
Defines |
#define | SAFE_DELETE(p) { delete (p); (p)=NULL; } |
#define | SAFE_DELETE_ARRAY(p) { delete[] (p); (p)=NULL; } |
#define | ZERO(x) memset(&x, 0, sizeof(x)) |
#define | COPY(a, b) { ASSERT(sizeof(a)==sizeof(b)); memcpy(&(a), &(b), sizeof(a)); } |
#define | ARRAYSIZE(a) (sizeof(a) / sizeof((a)[0])) |
#define | MAX(a, b) (((a) > (b)) ? (a) : (b)) |
#define | MIN(a, b) (((a) < (b)) ? (a) : (b)) |
#define | clamp(val, low, high) ( max( (low), min((val),(high)) ) ) |
#define | SCALE(x, l1, h1, l2, h2) (((x) - (l1)) * ((h2) - (l2)) / ((h1) - (l1)) + (l2)) |
Typedefs |
typedef int | longchar |
typedef basic_string< char,
char_traits_char_nocase > | istring |
Functions |
float | min (float a, int b) |
float | min (int a, float b) |
float | max (float a, int b) |
float | max (int a, float b) |
unsigned long | min (unsigned int a, unsigned long b) |
unsigned long | min (unsigned long a, unsigned int b) |
unsigned long | max (unsigned int a, unsigned long b) |
unsigned long | max (unsigned long a, unsigned int b) |
bool | CLAMP (int &x, int l, int h) |
bool | CLAMP (float &x, float l, float h) |
void | wrap (int &x, int n) |
void | wrap (float &x, float n) |
uint32_t | Swap32 (uint32_t n) |
uint32_t | Swap24 (uint32_t n) |
uint16_t | Swap16 (uint16_t n) |
uint32_t | Swap32BE (uint32_t n) |
uint32_t | Swap24BE (uint32_t n) |
uint16_t | Swap16BE (uint16_t n) |
uint32_t | Swap32LE (uint32_t n) |
uint32_t | Swap24LE (uint32_t n) |
uint16_t | Swap16LE (uint16_t n) |
float | RandomFloat (int &seed) |
float | RandomFloat () |
float | RandomFloat (float fLow, float fHigh) |
int | RandomInt (int nLow, int nHigh) |
float | randomf (const float low=-1.0f, const float high=1.0f) |
float | Quantize (const float f, const float fRoundInterval) |
int | Quantize (const int i, const int iRoundInterval) |
float | ftruncf (const float f, const float fTruncInterval) |
int | QuantizeUp (int i, int iInterval) |
void | fapproach (float &val, float other_val, float to_move) |
float | fmodfp (float x, float y) |
int | power_of_two (int input) |
bool | IsAnInt (const CString &s) |
bool | IsHexVal (const CString &s) |
float | HHMMSSToSeconds (const CString &sHMS) |
CString | SecondsToHHMMSS (float fSecs) |
CString | SecondsToMMSSMsMs (float fSecs) |
CString | SecondsToMMSSMsMsMs (float fSecs) |
CString | PrettyPercent (float fNumerator, float fDenominator) |
CString | PrettyPercent (int fNumerator, int fDenominator) |
CString | Commify (int iNum) |
tm | GetLocalTime () |
CString | ssprintf (const char *fmt,...) PRINTF(1 |
CString | vssprintf (const char *fmt, va_list argList) |
void | splitpath (const CString &Path, CString &Dir, CString &Filename, CString &Ext) |
CString | SetExtension (const CString &path, const CString &ext) |
CString | GetExtension (const CString &sPath) |
int | utf8_get_char_len (char p) |
bool | utf8_to_wchar (const CString &s, unsigned &start, wchar_t &ch) |
bool | utf8_to_wchar_ec (const CString &s, unsigned &start, wchar_t &ch) |
void | wchar_to_utf8 (wchar_t ch, CString &out) |
wchar_t | utf8_get_char (const CString &s) |
bool | utf8_is_valid (const CString &s) |
void | utf8_remove_bom (CString &s) |
CString | WStringToCString (const wstring &str) |
CString | WcharToUTF8 (wchar_t c) |
wstring | CStringToWstring (const CString &str) |
void | split (const CString &Source, const CString &Delimitor, CStringArray &AddIt, const bool bIgnoreEmpty=true) |
void | split (const wstring &Source, const wstring &Delimitor, vector< wstring > &AddIt, const bool bIgnoreEmpty=true) |
void | split (const CString &Source, const CString &Delimitor, int &begin, int &size, const bool bIgnoreEmpty=true) |
void | split (const wstring &Source, const wstring &Delimitor, int &begin, int &size, const bool bIgnoreEmpty=true) |
void | split (const CString &Source, const CString &Delimitor, int &begin, int &size, int len, const bool bIgnoreEmpty) |
void | split (const wstring &Source, const wstring &Delimitor, int &begin, int &size, int len, const bool bIgnoreEmpty) |
CString | join (const CString &Delimitor, const CStringArray &Source) |
CString | join (const CString &Delimitor, CStringArray::const_iterator begin, CStringArray::const_iterator end) |
CString | GetCwd () |
void | CRC32 (unsigned int &iCRC, const void *pBuffer, size_t iSize) |
unsigned int | GetHashForString (const CString &s) |
unsigned int | GetHashForFile (const CString &sPath) |
unsigned int | GetHashForDirectory (const CString &sDir) |
bool | DirectoryIsEmpty (const CString &dir) |
bool | CompareCStringsAsc (const CString &str1, const CString &str2) |
bool | CompareCStringsDesc (const CString &str1, const CString &str2) |
void | SortCStringArray (CStringArray &AddTo, const bool bSortAscending=true) |
float | calc_mean (const float *start, const float *end) |
float | calc_stddev (const float *start, const float *end) |
template<class T1, class T2> int | FindIndex (T1 begin, T1 end, const T2 *p) |
template<class T> T | Increment (T a) |
template<class T> T | Decrement (T a) |
void | TrimLeft (CString &str, const char *s="\r\n\t ") |
void | TrimRight (CString &str, const char *s="\r\n\t ") |
void | StripCrnl (CString &s) |
CString | DerefRedir (const CString &path) |
CString | GetRedirContents (const CString &path) |
void | Replace_Unicode_Markers (CString &Text) |
CString | WcharDisplayText (wchar_t c) |
CString | Basename (const CString &dir) |
CString | Dirname (const CString &dir) |
CString | Capitalize (const CString &s) |
void | GetDirListing (const CString &sPath, CStringArray &AddTo, bool bOnlyDirs=false, bool bReturnPathToo=false) |
bool | DoesFileExist (const CString &sPath) |
bool | IsAFile (const CString &sPath) |
bool | IsADirectory (const CString &sPath) |
unsigned | GetFileSizeInBytes (const CString &sFilePath) |
void | FlushDirCache () |
void | FixSlashesInPlace (CString &sPath) |
CString | FixSlashes (CString sPath) |
void | CollapsePath (CString &sPath, bool bRemoveLeadingDot=false) |
bool | FromString (const CString &sValue, int &out) |
bool | FromString (const CString &sValue, unsigned &out) |
bool | FromString (const CString &sValue, float &out) |
bool | FromString (const CString &sValue, bool &out) |
CString | ToString (int value) |
CString | ToString (unsigned value) |
CString | ToString (float value) |
CString | ToString (bool value) |
bool | FileRead (RageFile &f, CString &sOut) |
bool | FileRead (RageFile &f, int &iOut) |
bool | FileRead (RageFile &f, unsigned &uOut) |
bool | FileRead (RageFile &f, float &fOut) |
void | FileWrite (RageFile &f, const CString &sWrite) |
void | FileWrite (RageFile &f, int iWrite) |
void | FileWrite (RageFile &f, size_t uWrite) |
void | FileWrite (RageFile &f, float fWrite) |
bool | FileCopy (CString sSrcFile, CString sDstFile) |
Variables |
int | randseed |
const wchar_t | INVALID_CHAR |