Index: A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z
Back to the top of sys_info
enum | Boolean; |
enum | Result; |
typedef signed char | int8; |
typedef unsigned char | uint8; |
typedef short | int16; |
typedef unsigned short | uint16; |
typedef int | int32; |
typedef unsigned int | uint32; |
typedef uint32 | uintp; |
typedef float | float32; |
typedef double | float64; |
typedef unsigned int | bit32; |
typedef unsigned int | bitfield; |
typedef unsigned char * | baddr; |
const int32 | INT8_MAX = 127; |
const int32 | INT8_MIN = -128; |
const int32 | INT16_MAX = 32767; |
const int32 | INT16_MIN = -32768; |
const int32 | INT32_MAX = 2147483647; |
const int32 | INT32_MIN = (-2147483647 - 1); |
const uint32 | UINT8_MAX = 0xFF; |
const uint32 | UINT16_MAX = 0xFFFF; |
const uint32 | UINT32_MAX = 0xFFFFFFFF; |
typedef uint32 | Timeout; |
const Timeout | TIMEOUT_FOREVER = UINT32_MAX; |
const Timeout | TIMEOUT_POLL = 0; |
typedef char | TCHAR; |
typedef uint16 | WCHAR; |
#define | ASSERT(expr) |
#define | ASSERTS(expr, str) |
#define | ASSERT_WARN(expr) |
#define | ASSERTS_WARN(expr, str) |
#define | EC_FAIL(str) |
#define | EC_WARN(str) |
#define | NEC(x) |
#define | EC(x) |
#define | INSTANCE_ASSERT(expr) |
#define | INSTANCE_ASSERTS(expr, str) |
#define | _EC_INSTANCE(stmnt) |
#define | PARAM_ASSERT(expr) |
#define | PARAM_ASSERTS(expr, str) |
#define | _EC_PARAM(stmnt) |
enum | InputEventType |
// Types defined by standard C and C++ | |
typedef long unsigned int | size_t; |
typedef void * | malloc_t; |
Back to the top of sys_info
void | USE_IT(variable); |
type | Max(type x, type y); |
type | Min(type x, type y); |
typedef void ( | VoidFuncOneArg)(void *arg); |
#define | PTR2INT(p) ((char *)(p) - (char *)0) |
const TCHAR* | _TEXT(char* str); |
TCHAR | _CHAR(char ch); |
// Error Checking (EC) macros | |
dll_link void | AssertFail(const char* file, int line, const char* string); |
dll_link void | AssertWarn(const char* file, int line, const char* string); |
#define | VERIFY(expr, test) (expr) |
#define | VERIFY_WARN(expr, test) (expr) |
// Useful numerical functions | |
void | Swap( int16& aa, int16& bb ); |
void | Swap( int32& aa, int32& bb ); |
int32 | Sign( int32 aa ) |
int32 | Abs( int32 aa ) ; |
int32 | Min3( int32 aa, int32 bb, int32 cc ) ; |
int32 | Max3( int32 aa, int32 bb, int32 cc ) ; |
// Unicode, SJIS and JIS conversion functions | |
Boolean | UnicodeToSJISConversionPossible(TCHAR character); |
Boolean | SJISToUnicodeConversionPossible(TCHAR character); |
TCHAR | UnicodeToSJIS(TCHAR character); |
TCHAR | SJISToUnicode(TCHAR character); |
TCHAR | SJISToJIS(TCHAR character); |
Back to the top of sys_info
void USE_IT(variable);
#include <basedef.h>
This is actually a #define
macro that allows you to
use an argument that is otherwise not used in a function. This
prevents "arg not used" warnings.
Parameters:
int MyFunction(int param) { USE_IT(param); return 5; }
Prototype:
void USE_IT(variable);
type Max(type x, type y);
#include <basedef.h>
A #define
macro that returns the bigger of two
arguments. The items compared must have a '>' operator associated
with them (true of all integral and floating point types).
Parameters:
See also: Min()
Prototype:
type Max(type x, type y);
type Min(type x, type y);
#include <basedef.h>
Returns the smaller of two arguments. The items compared must have a '<' operator associated with them (true of all integral and floating point types).
Parameters:
See also: Max()
Prototype:
type Min(type x, type y);
enum Boolean;
#include <basedef.h>
A Boolean value is used whenever something is either TRUE or FALSE. It is not used as a success or failure result code.
For example, the WinRectangle::Contains() method returns a Boolean, but Array::Append() does not.
See also: Result
Declared as:
enum Boolean { FALSE, TRUE };
enum Result;
#include <basedef.h>
An error value returned when a function or method can succeed or fail. It is not used as a boolean TRUE/FALSE or yes/no value.
For example, Array::Append() returns a Result (it can succeed or fail), but WinRectangle::Contains() does not (it returns whether something is true or not).
Note that when comparing a Result value, you should always compare against SUCCESS. E.g. (variable == SUCCESS) or (variable != SUCCESS).
Declared as:
enum Result { SUCCESS = 0, FAILURE = -1 };
typedef signed char int8;
#include <basedef.h>
A signed 8-bit integer. Use in preference to char or signed char.
See also: uint8, int16, uint16, int32, uint32, float32, bit32, bitfield, INT8_MIN, INT8_MAX
Declared as:
typedef signed char int8;
typedef unsigned char uint8;
#include <basedef.h>
An unsigned 8-bit integer. Use in preference to unsigned char.
See also: int8, int16, uint16, int32, uint32, float32, bit32, bitfield, UINT8_MAX
Declared as:
typedef unsigned char uint8;
typedef short int16;
#include <basedef.h>
A signed 16-bit integer. Use in preference to short.
See also: int8, uint8, uint16, int32, uint32, float32, bit32, bitfield, INT16_MIN, INT16_MAX
Declared as:
typedef short int16;
typedef unsigned short uint16;
#include <basedef.h>
An unsigned 16-bit integer. Use in preference to unsigned short.
See also: int8, uint8, int16, int32, uint32, float32, bit32, bitfield, UINT16_MAX
Declared as:
typedef unsigned short uint16;
typedef int int32;
#include <basedef.h>
A signed 32-bit integer. Use in preference to int.
See also: int8, uint8, int16, uint16, uint32, float32, bit32, bitfield, INT32_MIN, INT32_MAX
Declared as:
typedef int int32;
typedef unsigned int uint32;
#include <basedef.h>
An unsigned 32-bit integer. Use in preference to unsigned int.
See also: int8, uint8, int16, uint16, int32, float32, bit32, uintp bitfield, UINT32_MAX
Declared as:
typedef unsigned int uint32;
typedef uint32 uintp;
#include <basedef.h>
An unsigned integer that is large enough to hold both a uint32 and a pointer. Use in preference to uint32 or (void *) in places where either type may need to be stored in a single variable.
See also: int8, uint8, int16, uint16, int32, float32, bit32, bitfield, UINT32_MAX
Declared as:
typedef uint32 uintp;
typedef float float32;
#include <basedef.h>
A 32-bit floating point value. Use in preference to float.
See also: int8, uint8, int16, uint16, int32, uint32, bit32, bitfield, float64
Declared as:
typedef float float32;
typedef double float64;
#include <basedef.h>
A 64-bit floating point value. Use in preference to double.
See also: int8, uint8, int16, uint16, int32, uint32, bit32, bitfield, float32
Declared as:
typedef double float64;
typedef unsigned int bit32;
#include <basedef.h>
An unsigned 32-bit value. Use in preference to uint32 when the value is treated as a collection of bits rather than a number.
See also: int8, uint8, int16, uint16, int32, uint32, float32, bitfield
Declared as:
typedef unsigned int bit32; /* 32 changable bits. */
typedef unsigned int bitfield;
#include <basedef.h>
An unsigned integer. Use as the type for all bitfields.
See also: int8, uint8, int16, uint16, int32, uint32, float32, bit32
Declared as:
typedef unsigned int bitfield; /* bitfield entry */
typedef unsigned char *baddr;
#include <basedef.h>
A pointer into memory.
This type is deprecated. New code should not use it, and it will not appear in future versions.
Declared as:
typedef unsigned char *baddr;
const int32 INT8_MAX = 127;
#include <basedef.h>
The maximum value an int8 variable can hold.
Declared as:
const int32 INT8_MAX = 127;
const int32 INT8_MIN = -128;
#include <basedef.h>
The minimum value an int8 variable can hold.
Declared as:
const int32 INT8_MIN = -128;
const int32 INT16_MAX = 32767;
#include <basedef.h>
The maximum value an int16 variable can hold.
Declared as:
const int32 INT16_MAX = 32767;
const int32 INT16_MIN = -32768;
#include <basedef.h>
The minimum value an int16 variable can hold.
Declared as:
const int32 INT16_MIN = -32768;
const int32 INT32_MAX = 2147483647;
#include <basedef.h>
The maximum value an int32 variable can hold.
Declared as:
const int32 INT32_MAX = 2147483647;
const int32 INT32_MIN = (-2147483647 - 1);
#include <basedef.h>
The minimum value an int32 variable can hold.
Declared as:
const int32 INT32_MIN = (-2147483647 - 1);
const uint32 UINT8_MAX = 0xFF;
#include <basedef.h>
The maximum value a uint8 variable can hold. There is no UINT8_MIN equivalent, because it is zero.
See also: uint8
Declared as:
const uint32 UINT8_MAX = 0xFF;
const uint32 UINT16_MAX = 0xFFFF;
#include <basedef.h>
The maximum value a uint16 variable can hold. There is no UINT16_MIN equivalent, because it is zero.
See also: uint16
Declared as:
const uint32 UINT16_MAX = 0xFFFF;
const uint32 UINT32_MAX = 0xFFFFFFFF;
#include <basedef.h>
The maximum value a uint32 variable can hold. There is no UINT32_MIN equivalent, because it is zero.
Declared as:
const uint32 UINT32_MAX = 0xFFFFFFFF;
typedef uint32 Timeout;
#include <basedef.h>
A Timeout
is the number of milliseconds before a given
call should time out. There are 1000 milliseconds in every second.
It is used as an argument for methods that can potentially block
waiting for some resource. Classes that use Timeout include
MessageQueue, Semaphore, and Thread.
Both the value 0 and UINT32_MAX should not be used; instead use the special values TIMEOUT_FOREVER or TIMEOUT_POLL.
The special values TIMEOUT_FOREVER and TIMEOUT_POLL can be used when a standard timeout period is not desired. TIMEOUT_FOREVER indicates no timeout should occur (and the method can potentially wait forever), and TIMEOUT_POLL is used when the call should not delay at all.
Declared as:
typedef uint32 Timeout;
const Timeout TIMEOUT_FOREVER = UINT32_MAX;
#include <basedef.h>
TIMEOUT_FOREVER is a special Timeout value that indicates a call should never return with a "timeout" error. The call can potentially block forever.
See also: Timeout
Declared as:
const Timeout TIMEOUT_FOREVER = UINT32_MAX;
const Timeout TIMEOUT_POLL = 0;
#include <basedef.h>
TIMEOUT_POLL is a special Timeout value that indicates the call should never block.
See also: Timeout
Declared as:
const Timeout TIMEOUT_POLL = 0;
typedef void (VoidFuncOneArg)(void *arg);
#include <basedef.h>
VoidFuncOneArg is a typedef for a function that take one void* argument and returns void.
See also: Timer::Start()
Prototype:
typedef void (VoidFuncOneArg)(void *arg);
#define PTR2INT(p) ((char *)(p) - (char *)0)
#include <basedef.h>
Turns a pointer type into an integral value.
Parameters:
See also: INT2PTR()
Prototype:
#define PTR2INT(p) ((char *)(p) - (char *)0)
typedef char TCHAR;
#include <basedef.h>
Variables of type TCHAR are text characters (either Unicode or ASCII). TCHAR variables require one byte under single-byte character sets (SBCS, in effect when DO_DBCS is not #defined) and two bytes under double-byte character sets (DBCS, in effect when DO_DBCS is #defined).
Use TCHAR rather than another integral type whenever the value could be either a Unicode or ASCII character.
Always use TCHAR in preference to wchar_t.
See also: _TEXT()
Declared as:
typedef char TCHAR;
const TCHAR* _TEXT(char* str);
#include <basedef.h>
The _TEXT() macro is applied to string constants.
Under DBCS it instructs the compiler to use 2 bytes per character when storing the string constant. Under SBCS it has no effect, but should be used for portability.
Parameters:
Example:
One might apply the macro when adding text to a dialog box:
DisplayWarningDialog(_TEXT("File not found!"));
See also: TCHAR()
Prototype:
const TCHAR* _TEXT(char* str);
TCHAR _CHAR(char ch);
#include <basedef.h>
The _CHAR() macro is applied to character constants. Under DBCS it marks character constants for special handling. Under SBCS it has no effect but should be used for portability.
Parameters:
See also: TCHAR()
Prototype:
TCHAR _CHAR(char ch);
typedef uint16 WCHAR;
#include <basedef.h>
Variables of type WCHAR are always 2-byte Unicode characters, even if the system is being compiled with no double-byte character support (DBCS).
In general, code should use TCHAR whenever the value could be either a Unicode or ASCII character. Uses of WCHAR should be restricted to those that must assume the character is Unicode.
See also: _TEXT()
Declared as:
typedef uint16 WCHAR;
dll_link void AssertFail(const char* file, int line, const char* string);
#include <ec.h>
This function is EC-only and so is compiled into the code only when ERROR_CHECK is defined for the C preprocessor.
Do a failed assertion for this platform. Do not call this function directly. If you want to always fail, use EC_FAIL(). It is often useful to set breakpoints on this function within the debugger, however.
The behavior of AssertFail() is platform-dependent, but it will always halt the system.
Parameters:
Prototype:
dll_link void AssertFail(const char* file, int line, const char* string);
dll_link void AssertWarn(const char* file, int line, const char* string);
#include <ec.h>
This function is EC-only and so is compiled into the code only when ERROR_CHECK is defined for the C preprocessor.
Do an assertion warning for this platform. Do not call this function directly. If you want to always warn, use EC_WARN(). It is sometimes useful to set breakpoints on this function within the debugger, however.
The behavior of AssertWarn() is platform-dependent, but it will never halt the system. Instead it will issue a warning and continue.
Parameters:
Prototype:
dll_link void AssertWarn(const char* file, int line, const char* string);
#define ASSERT(expr)
#include <ec.h>
An EC utility that halts the program if the passed expression evaluates to FALSE.
The file, line, and expression text are provided to the user in some way at the time of the failure (see AssertFail()).
This macro generates code only when ERROR_CHECK is defined for the C preprocessor.
Parameters:
Declared as:
#define ASSERT(expr)
#define ASSERTS(expr, str)
#include <ec.h>
An EC utility that halts the program if the passed expression evaluates to FALSE.
The file, line, and passed string are provided to the user in some way at the time of the failure (see AssertFail()).
This macro generates code only when ERROR_CHECK is defined for the C preprocessor.
Parameters:
Declared as:
#define ASSERTS(expr, str)
#define ASSERT_WARN(expr)
#include <ec.h>
An EC utility that issues a warning if the passed expression evaluates to FALSE.
The file, line, and expression text are provided to the user in some way at the time of the warning (see AssertWarn()).
This macro generates code only when ERROR_CHECK is defined for the C preprocessor.
Parameters:
Declared as:
#define ASSERT_WARN(expr)
#define ASSERTS_WARN(expr, str)
#include <ec.h>
An EC utility that issues a warning if the passed expression evaluates to FALSE.
The file, line, and supplied string are provided to the user in some way at the time of the warning (see AssertWarn()).
This macro generates code only when ERROR_CHECK is defined for the C preprocessor.
Parameters:
Declared as:
#define ASSERTS_WARN(expr, str)
#define EC_FAIL(str)
#include <ec.h>
An EC utility that halts the program if called.
The file, line, and supplied string are provided to the user in some way at the time of the failure (see AssertFail()).
This macro generates code only when ERROR_CHECK is defined for the C preprocessor.
See also: ASSERTS(),ASSERT_WARN(), ASSERTS_WARN(), EC_WARN(), AssertFail()
Declared as:
#define EC_FAIL(str)
#define EC_WARN(str)
#include <ec.h>
An EC utility that issues a warning if called.
The file, line, and supplied string are provided to the user in some way at the time of the warning (see AssertWarn()).
This macro generates code only when ERROR_CHECK is defined for the C preprocessor.
See also: ASSERTS(), EC_FAIL(), ASSERT_WARN(), ASSERTS_WARN(), EC_WARN(), AssertFail()
Declared as:
#define EC_WARN(str)
#define VERIFY(expr, test) (expr)
#include <ec.h>
VERIFY is like ASSERT, except that the expr is still evaluated when in non-EC.
This is provided because its use can be justified in certain cases, but convince yourself why the error condition doesn't need to be checked in production code before doing so.
For instance, any error that could result from user error or lack of resources should not be checked with VERIFY. Errors that either never result assuming bug-free code or that get caught later on with non-ec checks can be checked with VERIFY.
See also: ASSERT, VERIFY_WARN()
Prototype:
#define VERIFY(expr, test) (expr)
#define VERIFY_WARN(expr, test) (expr)
#include <ec.h>
VERIFY_WARN is like ASSERT_WARN, except that the expr is still evaluated when in non-EC.
This is provided because its use can be justified in certain cases, but convince yourself why the error condition doesn't need to be checked in production code before doing so.
For instance, any error that could result from user error or lack of resources should not be checked with VERIFY_WARN. Errors that either never result assuming bug-free code or that get caught later on with non-ec checks can be checked with VERIFY_WARN.
See also: ASSERT()
Prototype:
#define VERIFY_WARN(expr, test) (expr)
#define NEC(x)
#include <ec.h>
A macro that inlines its parameter in code when error-checking is turned OFF. For example, NEC(x--); is compiled only if error- checking is turned off.
Parameters:
Declared as:
#define NEC(x)
#define EC(x)
#include <ec.h>
A macro that inlines its parameter in code only if error-checking is turned ON. For example, EC(printf("Entered third if statement.\n")); is compiled only if error-checking is turned on.
Parameters:
Declared as:
#define EC(x)
#define INSTANCE_ASSERT(expr)
#include <ec.h>
Equivalent to ASSERT(), but typically used in checking an object's instance data.
It is compiled into the code when EC_INSTANCE is defined (normal EC images do define EC_INSTANCE).
See also: ASSERT(), INSTANCE_ASSERTS()
Declared as:
#define INSTANCE_ASSERT(expr)
#define INSTANCE_ASSERTS(expr, str)
#include <ec.h>
Equivalent to ASSERTS(), but typically used in checking an object's instance data.
It is compiled into the code when EC_INSTANCE is defined (normal EC images do define EC_INSTANCE).
See also: ASSERTS(), INSTANCE_ASSERT()
Declared as:
#define INSTANCE_ASSERTS(expr, str)
#define _EC_INSTANCE(stmnt)
#include <ec.h>
Equivalent to EC(), but typically used in checking an object's instance data.
It is compiled into the code when EC_INSTANCE is defined (normal EC images do define EC_INSTANCE).
See also: ASSERT(), INSTANCE_ASSERTS()
Declared as:
#define _EC_INSTANCE(stmnt)
#define PARAM_ASSERT(expr)
#include <ec.h>
Equivalent to ASSERT(), but should be used to check a function's parameters.
It is compiled into the code when EC_PARAM is defined (normal EC images do define EC_PARAM).
See also: ASSERT(), PARAM_ASSERTS()
Declared as:
#define PARAM_ASSERT(expr)
#define PARAM_ASSERTS(expr, str)
#include <ec.h>
Equivalent to ASSERTS(), but should be used to check a function's parameters.
It is compiled into the code when EC_PARAM is defined (normal EC images do define EC_PARAM).
See also: ASSERTS(), PARAM_ASSERT()
Declared as:
#define PARAM_ASSERTS(expr, str)
#define _EC_PARAM(stmnt)
#include <ec.h>
Equivalent to EC(), but should be used to check a function's parameters.
It is compiled into the code when EC_PARAM is defined (normal EC images do define EC_PARAM).
See also: EC(), _EC_INSTANCE()
Declared as:
#define _EC_PARAM(stmnt)
enum InputEventType
#include <inputmgr.h>
InputEventType enumerated type to be used when identifying input events in the input monitor chain. It is typically associated with up to four arguments, which are passed to InputMonitor::ProcessEvent.
Declared as:
enum InputEventType { IET_POINTER, IET_CHAR, IET_INK_QUERY, IET_INK, IET_INFO_FOR_INK_MONITOR, IET_HARD_ICON_PRESSED
void Swap( int16& aa, int16& bb );
#include <numerics.h>
Swaps two int16 values.
Parameters:
Prototype:
inline void Swap( int16& aa, int16& bb );
void Swap( int32& aa, int32& bb );
#include <numerics.h>
Swaps two int32 values.
Parameters:
Prototype:
inline void Swap( int32& aa, int32& bb );
int32 Sign( int32 aa )
#include <numerics.h>
Returns the numeric sign of a value.
Parameters:
Status: Frozen
Prototype:
inline int32 Sign( int32 aa )
int32 Abs( int32 aa ) ;
#include <numerics.h>
Returns the absolute value of the argument. A negative becomes positive.
Parameters:
Status: Frozen
Prototype:
inline int32 Abs( int32 aa ) ;
int32 Min3( int32 aa, int32 bb, int32 cc ) ;
#include <numerics.h>
Returns the minimum of three values.
Parameters:
See also: Max3()
Status: Frozen
Prototype:
inline int32 Min3( int32 aa, int32 bb, int32 cc ) ;
int32 Max3( int32 aa, int32 bb, int32 cc ) ;
#include <numerics.h>
Returns the maximum of three values.
Parameters:
See also: Min3()
Status: Frozen
Prototype:
inline int32 Max3( int32 aa, int32 bb, int32 cc ) ;
Boolean UnicodeToSJISConversionPossible(TCHAR character);
#include <sjisxlat.h>
Return whether a given Unicode character can be converted into a SJIS character.
Note that the Unicode -> SJIS tables are mostly standard, but can be customized for each device.
Parameters:
See also: SJISToUnicodeConversionPossible(), UnicodeToSJIS()
Status: Frozen.
Prototype:
Boolean UnicodeToSJISConversionPossible(TCHAR character);
Boolean SJISToUnicodeConversionPossible(TCHAR character);
#include <sjisxlat.h>
Return whether a given SJIS character can be converted into a Unicode character.
Note that the SJIS -> Unicode tables are mostly standard, but can be customized for each device.
Parameters:
See also: UnicodeToSJISConversionPossible(), SJISToUnicode()
Status: Frozen.
Prototype:
Boolean SJISToUnicodeConversionPossible(TCHAR character);
TCHAR UnicodeToSJIS(TCHAR character);
#include <sjisxlat.h>
Convert a Unicode character into a SJIS character.
Parameters:
See also: SJISToUnicode()
Status: Frozen.
Prototype:
TCHAR UnicodeToSJIS(TCHAR character);
TCHAR SJISToUnicode(TCHAR character);
#include <sjisxlat.h>
Convert a SJIS character into a Unicode character.
Parameters:
See also: UnicodeToSJIS()
Status: Frozen.
Prototype:
TCHAR SJISToUnicode(TCHAR character);
TCHAR SJISToJIS(TCHAR character);
#include <sjisxlat.h>
Convert a SJIS character to a JIS character.
Parameters:
Status: Frozen.
Prototype:
TCHAR SJISToJIS(TCHAR character);
typedef long unsigned int size_t;
#include <stdtypes.h>
The type used by memory allocation routines to specify the size of a memory block.
Declared as:
typedef long unsigned int size_t;
typedef void *malloc_t;
#include <stdtypes.h>
The pointer type used by memory allocation routines such as malloc() and realloc().
Declared as:
typedef void *malloc_t;