|
Namespaces |
namespace | cat |
Defines |
#define | FALSE false |
#define | TRUE true |
#define | COM_RELEASE(ref) if (ref) { (ref)->Release(); (ref) = 0; } |
#define | SINGLE_RELEASE(ref) if (ref) { delete (ref); (ref) = 0; } |
#define | ARRAY_RELEASE(ref) if (ref) { delete [](ref); (ref) = 0; } |
#define | BOSWAP32(n) ( ((n) << 24) | (((n) & 0x00ff0000) >> 8) | (((n) & 0x0000ff00) << 8) | ((n) >> 24) ) |
#define | BOSWAP16(n) ( ((n) << 8) | ((n) >> 8) ) |
#define | swapBE(n) |
#define | getBE(n) (n) |
#define | ROL8(n, r) ( ((n) << (r)) | ((n) >> ( 8 - (r))) ) |
#define | ROR8(n, r) ( ((n) >> (r)) | ((n) << ( 8 - (r))) ) |
#define | ROL16(n, r) ( ((n) << (r)) | ((n) >> (16 - (r))) ) |
#define | ROR16(n, r) ( ((n) >> (r)) | ((n) << (16 - (r))) ) |
#define | ROL32(n, r) ( ((n) << (r)) | ((n) >> (32 - (r))) ) |
#define | ROR32(n, r) ( ((n) >> (r)) | ((n) << (32 - (r))) ) |
#define | MEMADD32(ptr, len, val) |
#define | STRNCPY(dest, src, size) |
#define | MEMCLR(dest, size) memset(dest, 0, size) |
#define | OBJCLR(object) memset(&(object), 0, sizeof(object)) |
#define | _C1B_INTERMED(n) ( (n) - (((n) >> 1) & 033333333333) - (((n) >> 2) & 011111111111) ) |
#define | COUNT1BITS32(n) ( ((_C1B_INTERMED(n) + (_C1B_INTERMED(n) >> 3)) & 030707070707) % 63 ) |
#define | AT_LEAST_2_BITS(n) ( (n) & ((n) - 1) ) |
#define | LEAST_SIGNIFICANT_BIT(n) ( (n) & -(n) ) |
#define | IS_POWER_OF_2(n) ( n && !AT_LEAST_2_BITS(n) ) |
#define | CEIL_UNIT(n, width) ( ( (n) + (width) - 1 ) / (width) ) |
#define | CEIL(n, width) ( CEIL_UNIT(n, width) * (width) ) |
#define | IS_ALPHA(ch) ( (((u8)(ch) & 0xc0) == 0x40) && ((((u8)(ch) - 1) & 0x1f) <= 0x19) ) |
#define | IS_NUM(ch) ( ((u8)(ch) - 0x30) < 10 ) |
#define | IS_ALPHANUM(ch) ( IS_ALPHA(ch) || IS_NUM(ch) ) |
#define | TO_LOWER(ch) (char)( (ch) | 0x20 ) |
#define | TO_UPPER(ch) (char)( (ch) & (~0x20) ) |
Typedefs |
typedef unsigned char | u8 |
typedef signed char | s8 |
typedef unsigned short | u16 |
typedef signed short | s16 |
typedef unsigned int | u32 |
typedef signed int | s32 |
typedef float | f32 |
typedef double | f64 |
typedef s32 | sfp22_10 |
typedef u32 | ufp22_10 |
typedef s32 | sfp16_16 |
typedef u32 | ufp16_16 |
Functions |
INLINE void | swapLE (u32 &n) |
INLINE void | swapLE (u16 &n) |
INLINE u32 | getLE (u32 n) |
INLINE u16 | getLE (u16 n) |
INLINE void | swapLE (s32 &n) |
INLINE void | swapLE (s16 &n) |
INLINE s32 | getLE (s32 n) |
INLINE s16 | getLE (s16 n) |
INLINE cat::u32 | next_highest_power_of_2 (cat::u32 n) |
* Fundamental tools & types
*
* Catid(cat02e@fsu.edu)
*
* 8/9/2004 Added SINGLE/ARRAY_RELEASE
* 8/5/2004 Added COMPILER_ preprocessors
* class NoCopies
* 8/1/2004 Removed mask stuff
* 7/29/2004 Added swapLE, swapBE, getLE, getBE
* 7/28/2004 Automatic and AutoArray now compile in dev-c++
* Added pre-processor conditions to support
* other compilers
* Removed GETWORD and GETDWORD
* 7/15/2004 Now using COM_RELEASE throughout CatGL3
* 6/22/2004 Removed triple and pair
* 6/12/2004 AutoDeallocate -> Automatic, AutoArray
* 6/9/2004 OBJCLR
* 5/2/2004 class AutoDeallocate
* 5/1/2004 IS_POWER_OF_2, next_highest_power_of_2
* 4/30/2004 Merged character manip macros
* 2/23/2004 CEIL*
* Removed MEMCOPY32 and MEMCLEAR32,
* memcpy and memset are now faster
* MAKE_MASK
* 2/10/2004 LITTLE_ENDIAN
* COUNT1BITS32
* AT_LEAST_2_BITS
* LEAST_SIGNIFICANT_BIT
* X-mas/2003 [u/s]int?? -> [u/s]??
* 7/3/2003 Added template triple, point->pair
* 6/15/2003 Added template rect, point
* 3/30/2003 Added RO?8, RO?16 and ?int64
* Added MEMCOPY32 and MEMCLEAR32
* 3/12/2003 Added GETWORD and GETDWORD
* 1/16/2003 Formalized this library.
*
* Tabs: 4 spaces
* Dist: public
*