Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

utils.h File Reference

#include <math.h>
#include <string>
#include <ostream>

Go to the source code of this file.

Namespaces

namespace  CB2

Defines

#define CB2_ASSERT(cond, warning)
 Exception macros.

#define CB2_CONVERSION(cond, warning)
#define CB2_RANGECHECK(cond, value)
#define CB2_MEMORYCHECK(cond)
#define CB2_NOTFOUND(cond)


Define Documentation

#define CB2_ASSERT cond,
warning   ) 
 

Value:

if (!(cond)) \ throw ExceptionAssert(warning ": " #cond " in " __FILE__, __LINE__);
Exception macros.

If the condition 'cond' is false, the given exception is thrown (with mandantory warning or value identification).

#define CB2_CONVERSION cond,
warning   ) 
 

Value:

if (!(cond)) \ throw ExceptionConversion(warning ": " #cond " in " __FILE__, __LINE__);

#define CB2_MEMORYCHECK cond   ) 
 

Value:

if (!(cond)) \ throw ExceptionMemory(#cond ": Memory dereference fault in " __FILE__, __LINE__);

#define CB2_NOTFOUND cond   ) 
 

Value:

if (!(cond)) \ throw ExceptionNotFound(#cond ": Item not found in " __FILE__, __LINE__);

#define CB2_RANGECHECK cond,
value   ) 
 

Value:

if (!(cond)) \ throw ExceptionRange< typeof(value)>(#cond ": Value " #value "=", value, " is out of range in " __FILE__, __LINE__);


Generated on Thu Sep 16 23:26:49 2004 for ColorBox2 by doxygen 1.3.7