KrisLibrary  1.0.0
Files | Classes | Macros | Functions
Standard

Commonly used classes/routines. More...

Files

file  File.h
 A unified interface for reading/writing binary data to file.
 
file  utils.h
 Utilities commonly used throughout a program.
 

Classes

class  File
 A cross-platform class for reading/writing binary data. More...
 

Macros

#define SafeDelete(x)   { if (x) delete x; x=NULL; }
 Delete a non-NULL pointer and set it to NULL.
 
#define SafeArrayDelete(x)   { if (x) delete [] x; x=NULL; }
 Delete a non-NULL pointer to an array and set it to NULL.
 
#define SafeDeleteProc(x, proc)   { if (x) proc(x); x=NULL; }
 Delete a non-NULL pointer, using the provided function, and set it to NULL.
 
#define ArraySize(x)   (sizeof(x)/sizeof(x[0]))
 

Functions

template<class type >
type Max (const type &a, const type &b)
 
template<class type >
type Min (const type &a, const type &b)
 
template<class type >
void Swap (type &a, type &b)
 
template<class type >
type Max (const type &a, const type &b, const type &c)
 
template<class type >
type Max (const type &a, const type &b, const type &c, const type &d)
 
template<class type >
type Min (const type &a, const type &b, const type &c)
 
template<class type >
type Min (const type &a, const type &b, const type &c, const type &d)
 
void toggle (bool &bit)
 

Detailed Description

Commonly used classes/routines.