![]() |
Main Page Class Hierarchy Alphabetical List Compound List File List Compound Members
![]() |
Go to the source code of this file.
Namespaces | |
namespace | FX |
Defines | |
#define | TRUE 1 |
#define | FALSE 0 |
#define | MAYBE 2 |
#define | NULL 0 |
#define | PATHSEP '/' |
#define | PATHSEPSTRING "/" |
#define | PATHLISTSEP ':' |
#define | PATHLISTSEPSTRING ":" |
#define | ISPATHSEP(c) ((c)=='/') |
#define | ENDLINE "\n" |
#define | FXLOCAL |
#define | FXEXPORT |
#define | FXIMPORT |
#define | FXAPI |
#define | FXTEMPLATE_EXTERN |
#define | FX_PRINTF(fmt, arg) |
#define | FX_SCANF(fmt, arg) |
#define | FXABS(val) (((val)>=0)?(val):-(val)) |
#define | FXSGN(val) (((val)<0)?-1:1) |
#define | FXSGNZ(val) ((val)<0?-1:(val)>0?1:0) |
#define | FXMAX(a, b) (((a)>(b))?(a):(b)) |
#define | FXMIN(a, b) (((a)>(b))?(b):(a)) |
#define | FXMIN3(x, y, z) ((x)<(y)?FXMIN(x,z):FXMIN(y,z)) |
#define | FXMAX3(x, y, z) ((x)>(y)?FXMAX(x,z):FXMAX(y,z)) |
#define | FXMIN4(x, y, z, w) (FXMIN(FXMIN(x,y),FXMIN(z,w))) |
#define | FXMAX4(x, y, z, w) (FXMAX(FXMAX(x,y),FXMAX(z,w))) |
#define | FXMINMAX(lo, hi, a, b) ((a)<(b)?((lo)=(a),(hi)=(b)):((lo)=(b),(hi)=(a))) |
#define | FXCLAMP(lo, x, hi) ((x)<(lo)?(lo):((x)>(hi)?(hi):(x))) |
#define | FXSWAP(a, b, t) ((t)=(a),(a)=(b),(b)=(t)) |
#define | FXLERP(a, b, f) ((a)+((b)-(a))*(f)) |
#define | STRUCTOFFSET(str, member) (((char *)(&(((str *)0)->member)))-((char *)0)) |
#define | ARRAYNUMBER(array) (sizeof(array)/sizeof(array[0])) |
#define | CONTAINER(ptr, str, mem) ((str*)(((char*)(ptr))-STRUCTOFFSET(str,mem))) |
#define | MKUINT(l, h) ((((FX::FXuint)(l))&0xffff) | (((FX::FXuint)(h))<<16)) |
#define | FXSEL(type, id) ((((FX::FXuint)(id))&0xffff) | (((FX::FXuint)(type))<<16)) |
#define | FXSELTYPE(s) ((FX::FXushort)(((s)>>16)&0xffff)) |
#define | FXSELID(s) ((FX::FXushort)((s)&0xffff)) |
#define | FXBITREVERSE(b) (((b&0x01)<<7)|((b&0x02)<<5)|((b&0x04)<<3)|((b&0x08)<<1)|((b&0x10)>>1)|((b&0x20)>>3)|((b&0x40)>>5)|((b&0x80)>>7)) |
#define | FXISUTF(c) (((c)&0xC0)!=0x80) |
#define | FXAVGCOLOR(ca, cb) (((ca)&(cb))+((((ca)^(cb))&0xFEFEFEFE)>>1)) |
#define | FXRGBA(r, g, b, a) (((FX::FXuint)(FX::FXuchar)(r)) | ((FX::FXuint)(FX::FXuchar)(g)<<8) | ((FX::FXuint)(FX::FXuchar)(b)<<16) | ((FX::FXuint)(FX::FXuchar)(a)<<24)) |
#define | FXRGB(r, g, b) (((FX::FXuint)(FX::FXuchar)(r)) | ((FX::FXuint)(FX::FXuchar)(g)<<8) | ((FX::FXuint)(FX::FXuchar)(b)<<16) | 0xff000000) |
#define | FXREDVAL(rgba) ((FX::FXuchar)((rgba)&0xff)) |
#define | FXGREENVAL(rgba) ((FX::FXuchar)(((rgba)>>8)&0xff)) |
#define | FXBLUEVAL(rgba) ((FX::FXuchar)(((rgba)>>16)&0xff)) |
#define | FXALPHAVAL(rgba) ((FX::FXuchar)(((rgba)>>24)&0xff)) |
#define | FXRGBACOMPVAL(rgba, comp) ((FX::FXuchar)(((rgba)>>((comp)<<3))&0xff)) |
#define | FXASSERT(exp) ((exp)?((void)0):(void)FX::fxassert(#exp,__FILE__,__LINE__)) |
#define | FXVERIFY(exp) ((exp)?((void)0):(void)FX::fxverify(#exp,__FILE__,__LINE__)) |
#define | FXTRACE(arguments) FX::fxtrace arguments |
#define | FXMALLOC(ptr, type, no) (FX::fxmalloc((void **)(ptr),sizeof(type)*(no))) |
#define | FXCALLOC(ptr, type, no) (FX::fxcalloc((void **)(ptr),sizeof(type)*(no))) |
#define | FXRESIZE(ptr, type, no) (FX::fxresize((void **)(ptr),sizeof(type)*(no))) |
#define | FXMEMDUP(ptr, src, type, no) (FX::fxmemdup((void **)(ptr),(const void*)(src),sizeof(type)*(no))) |
#define | FXFREE(ptr) (FX::fxfree((void **)(ptr))) |
#define | fabsf(x) ((float)fabs((double)(x))) |
#define | ceilf(x) ((float)ceil((double)(x))) |
#define | floorf(x) ((float)floor((double)(x))) |
#define | fmodf(x, y) ((float)fmod((double)(x),(double)(y))) |
#define | sqrtf(x) ((float)sqrt((double)(x))) |
#define | sinf(x) ((float)sin((double)(x))) |
#define | cosf(x) ((float)cos((double)(x))) |
#define | tanf(x) ((float)tan((double)(x))) |
#define | asinf(x) ((float)asin((double)(x))) |
#define | acosf(x) ((float)acos((double)(x))) |
#define | atanf(x) ((float)atan((double)(x))) |
#define | atan2f(y, x) ((float)atan2((double)(y),(double)(x))) |
#define | powf(x, y) ((float)pow((double)(x),(double)(y))) |
#define | expf(x) ((float)exp((double)(x))) |
#define | logf(x) ((float)log((double)(x))) |
#define | log10f(x) ((float)log10((double)(x))) |
Typedefs | |
typedef char | FX::FXchar |
typedef unsigned char | FX::FXuchar |
typedef bool | FX::FXbool |
typedef unsigned short | FX::FXushort |
typedef short | FX::FXshort |
typedef unsigned int | FX::FXuint |
typedef int | FX::FXint |
typedef float | FX::FXfloat |
typedef double | FX::FXdouble |
typedef FXObject * | FX::FXObjectPtr |
typedef wchar_t | FX::FXwchar |
typedef unsigned short | FX::FXnchar |
typedef long | FX::FXival |
typedef unsigned long | FX::FXuval |
typedef unsigned long | FX::FXID |
typedef FXlong | FX::FXTime |
typedef unsigned long | FX::FXPixel |
typedef FXuint | FX::FXColor |
typedef FXuint | FX::FXHotKey |
typedef FXID | FX::FXDragType |
typedef FXint | FX::FXInputHandle |
typedef _XEvent | FX::FXRawEvent |
Enumerations | |
enum | FX::FXSelType { FX::SEL_NONE, FX::SEL_KEYPRESS, FX::SEL_KEYRELEASE, FX::SEL_LEFTBUTTONPRESS, FX::SEL_LEFTBUTTONRELEASE, FX::SEL_MIDDLEBUTTONPRESS, FX::SEL_MIDDLEBUTTONRELEASE, FX::SEL_RIGHTBUTTONPRESS, FX::SEL_RIGHTBUTTONRELEASE, FX::SEL_MOTION, FX::SEL_ENTER, FX::SEL_LEAVE, FX::SEL_FOCUSIN, FX::SEL_FOCUSOUT, FX::SEL_KEYMAP, FX::SEL_UNGRABBED, FX::SEL_PAINT, FX::SEL_CREATE, FX::SEL_DESTROY, FX::SEL_UNMAP, FX::SEL_MAP, FX::SEL_CONFIGURE, FX::SEL_SELECTION_LOST, FX::SEL_SELECTION_GAINED, FX::SEL_SELECTION_REQUEST, FX::SEL_RAISED, FX::SEL_LOWERED, FX::SEL_CLOSE, FX::SEL_DELETE, FX::SEL_MINIMIZE, FX::SEL_RESTORE, FX::SEL_MAXIMIZE, FX::SEL_UPDATE, FX::SEL_COMMAND, FX::SEL_CLICKED, FX::SEL_DOUBLECLICKED, FX::SEL_TRIPLECLICKED, FX::SEL_MOUSEWHEEL, FX::SEL_CHANGED, FX::SEL_VERIFY, FX::SEL_DESELECTED, FX::SEL_SELECTED, FX::SEL_INSERTED, FX::SEL_REPLACED, FX::SEL_DELETED, FX::SEL_OPENED, FX::SEL_CLOSED, FX::SEL_EXPANDED, FX::SEL_COLLAPSED, FX::SEL_BEGINDRAG, FX::SEL_ENDDRAG, FX::SEL_DRAGGED, FX::SEL_LASSOED, FX::SEL_TIMEOUT, FX::SEL_SIGNAL, FX::SEL_CLIPBOARD_LOST, FX::SEL_CLIPBOARD_GAINED, FX::SEL_CLIPBOARD_REQUEST, FX::SEL_CHORE, FX::SEL_FOCUS_SELF, FX::SEL_FOCUS_RIGHT, FX::SEL_FOCUS_LEFT, FX::SEL_FOCUS_DOWN, FX::SEL_FOCUS_UP, FX::SEL_FOCUS_NEXT, FX::SEL_FOCUS_PREV, FX::SEL_DND_ENTER, FX::SEL_DND_LEAVE, FX::SEL_DND_DROP, FX::SEL_DND_MOTION, FX::SEL_DND_REQUEST, FX::SEL_IO_READ, FX::SEL_IO_WRITE, FX::SEL_IO_EXCEPT, FX::SEL_PICKED, FX::SEL_QUERY_TIP, FX::SEL_QUERY_HELP, FX::SEL_DOCKED, FX::SEL_FLOATED, FX::SEL_SPACEBALLMOTION, FX::SEL_SPACEBALLBUTTONPRESS, FX::SEL_SPACEBALLBUTTONRELEASE, FX::SEL_SESSION_NOTIFY, FX::SEL_SESSION_CLOSED, FX::SEL_IME_START, FX::SEL_IME_END, FX::SEL_LAST } |
enum | { FX::SHIFTMASK = 0x001, FX::CAPSLOCKMASK = 0x002, FX::CONTROLMASK = 0x004, FX::ALTMASK = 0x008, FX::METAMASK = 0x040, FX::NUMLOCKMASK = 0x010, FX::SCROLLLOCKMASK = 0x0E0, FX::LEFTBUTTONMASK = 0x100, FX::MIDDLEBUTTONMASK = 0x200, FX::RIGHTBUTTONMASK = 0x400 } |
enum | { FX::LEFTBUTTON = 1, FX::MIDDLEBUTTON = 2, FX::RIGHTBUTTON = 3 } |
enum | { FX::CROSSINGNORMAL, FX::CROSSINGGRAB, FX::CROSSINGUNGRAB } |
enum | { FX::VISIBILITYTOTAL, FX::VISIBILITYPARTIAL, FX::VISIBILITYNONE } |
enum | { FX::FILEMATCH_FILE_NAME = 1, FX::FILEMATCH_NOESCAPE = 2, FX::FILEMATCH_PERIOD = 4, FX::FILEMATCH_LEADING_DIR = 8, FX::FILEMATCH_CASEFOLD = 16 } |
enum | FX::FXDragAction { FX::DRAG_REJECT = 0, FX::DRAG_ASK = 1, FX::DRAG_COPY = 2, FX::DRAG_MOVE = 3, FX::DRAG_LINK = 4, FX::DRAG_PRIVATE = 5, FX::DRAG_ACCEPT = 6 } |
enum | FX::FXClipAction { FX::CLIP_COPY = 0, FX::CLIP_CUT = 1 } |
enum | FX::FXDNDOrigin { FX::FROM_SELECTION = 0, FX::FROM_CLIPBOARD = 1, FX::FROM_DRAGNDROP = 2 } |
enum | FX::FXExponent { FX::EXP_NEVER = FALSE, FX::EXP_ALWAYS = TRUE, FX::EXP_AUTO = MAYBE } |
enum | { FX::SEARCH_FORWARD = 0, FX::SEARCH_BACKWARD = 1, FX::SEARCH_NOWRAP = 0, FX::SEARCH_WRAP = 2, FX::SEARCH_EXACT = 0, FX::SEARCH_IGNORECASE = 4, FX::SEARCH_REGEX = 8, FX::SEARCH_PREFIX = 16 } |
Functions | |
FXuint | FX::fxrandom (FXuint &seed) |
FXbool | FX::fxmalloc (void **ptr, unsigned long size) |
FXbool | FX::fxcalloc (void **ptr, unsigned long size) |
FXbool | FX::fxresize (void **ptr, unsigned long size) |
FXbool | FX::fxmemdup (void **ptr, const void *src, unsigned long size) |
void | FX::fxfree (void **ptr) |
void | FX::fxerror (const char *format,...) FX_PRINTF(1 |
void void | FX::fxwarning (const char *format,...) FX_PRINTF(1 |
void void void | FX::fxmessage (const char *format,...) FX_PRINTF(1 |
void void void void | FX::fxassert (const char *expression, const char *filename, unsigned int lineno) |
void | FX::fxverify (const char *expression, const char *filename, unsigned int lineno) |
void | FX::fxtrace (unsigned int level, const char *format,...) FX_PRINTF(2 |
void void | FX::fxsleep (FXuint n) |
FXbool | FX::fxfilematch (const FXchar *string, const FXchar *pattern="*", FXuint flags=(FILEMATCH_NOESCAPE|FILEMATCH_FILE_NAME)) |
FXColor | FX::makeHiliteColor (FXColor clr) |
FXColor | FX::makeShadowColor (FXColor clr) |
FXint | FX::fxgetpid () |
FXbool | FX::fxtoDOS (FXchar *&string, FXint &len) |
FXbool | FX::fxfromDOS (FXchar *&string, FXint &len) |
FXchar * | FX::fxstrdup (const FXchar *str) |
FXuint | FX::fxstrhash (const FXchar *str) |
FXColor | FX::fxcolorfromname (const FXchar *colorname) |
FXchar * | FX::fxnamefromcolor (FXchar *colorname, FXColor color) |
void | FX::fxrgb_to_hsv (FXfloat &h, FXfloat &s, FXfloat &v, FXfloat r, FXfloat g, FXfloat b) |
void | FX::fxhsv_to_rgb (FXfloat &r, FXfloat &g, FXfloat &b, FXfloat h, FXfloat s, FXfloat v) |
FXint | FX::fxieeefloatclass (FXfloat number) |
FXint | FX::fxieeedoubleclass (FXdouble number) |
FXbool | FX::fxIsFinite (FXfloat number) |
FXbool | FX::fxIsFinite (FXdouble number) |
FXbool | FX::fxIsInf (FXfloat number) |
FXbool | FX::fxIsInf (FXdouble number) |
FXbool | FX::fxIsNan (FXfloat number) |
FXbool | FX::fxIsNan (FXdouble number) |
FXwchar | FX::fxkeysym2ucs (FXwchar sym) |
FXwchar | FX::fxucs2keysym (FXwchar ucs) |
FXint | FX::fxparsegeometry (const FXchar *string, FXint &x, FXint &y, FXint &w, FXint &h) |
FXbool | FX::fxisconsole (const FXchar *path) |
FXwchar | FX::wc (const FXchar *ptr) |
FXwchar | FX::wc (const FXnchar *ptr) |
FXint | FX::wclen (const FXchar *ptr) |
FXint | FX::wclen (const FXnchar *ptr) |
FXint | FX::wcvalidate (const FXchar *string, FXint pos) |
FXint | FX::wcvalidate (const FXnchar *string, FXint pos) |
FXint | FX::wcinc (const FXchar *string, FXint pos) |
FXint | FX::wcinc (const FXnchar *string, FXint pos) |
FXint | FX::wcdec (const FXchar *string, FXint pos) |
FXint | FX::wcdec (const FXnchar *string, FXint pos) |
FXint | FX::utfslen (const FXwchar *str, FXint n) |
FXint | FX::utfslen (const FXwchar *str) |
FXint | FX::utfslen (const FXnchar *str, FXint n) |
FXint | FX::utfslen (const FXnchar *str) |
FXint | FX::wcslen (const FXchar *str, FXint n) |
FXint | FX::wcslen (const FXchar *str) |
FXint | FX::ncslen (const FXchar *str, FXint n) |
FXint | FX::ncslen (const FXchar *str) |
FXint | FX::utf2wcs (FXwchar *dst, FXint dn, const FXchar *src, FXint sn) |
FXint | FX::utf2ncs (FXnchar *dst, FXint dn, const FXchar *src, FXint sn) |
FXint | FX::wc2utfs (FXchar *dst, FXint dn, const FXwchar *src, FXint sn) |
FXint | FX::nc2utfs (FXchar *dst, FXint dn, const FXnchar *src, FXint sn) |
FXTime | FX::fxgetticks () |
Variables | |
const FXdouble | FX::PI = 3.1415926535897932384626433833 |
const FXdouble | FX::EULER = 2.7182818284590452353602874713 |
const FXdouble | FX::DTOR = 0.0174532925199432957692369077 |
const FXdouble | FX::RTOD = 57.295779513082320876798154814 |
const FXTime | FX::forever = 9223372036854775807LL |
const FXuchar | FX::fxversion [3] |
FXuint | FX::fxTraceLevel |
#define TRUE 1 |
#define FALSE 0 |
#define MAYBE 2 |
#define NULL 0 |
#define PATHSEP '/' |
#define PATHSEPSTRING "/" |
#define PATHLISTSEP ':' |
#define PATHLISTSEPSTRING ":" |
#define ISPATHSEP | ( | c | ) | ((c)=='/') |
#define ENDLINE "\n" |
#define FXLOCAL |
#define FXEXPORT |
#define FXIMPORT |
#define FXAPI |
#define FXTEMPLATE_EXTERN |
#define FX_PRINTF | ( | fmt, | |||
arg | ) |
#define FX_SCANF | ( | fmt, | |||
arg | ) |
#define FXABS | ( | val | ) | (((val)>=0)?(val):-(val)) |
Abolute value.
#define FXSGN | ( | val | ) | (((val)<0)?-1:1) |
Return 1 if val >= 0 and -1 otherwise.
#define FXSGNZ | ( | val | ) | ((val)<0?-1:(val)>0?1:0) |
Return 1 if val > 0, -1 if val < 0, and 0 otherwise.
#define FXMAX | ( | a, | |||
b | ) | (((a)>(b))?(a):(b)) |
#define FXMIN | ( | a, | |||
b | ) | (((a)>(b))?(b):(a)) |
#define FXMIN3 | ( | x, | |||
y, | |||||
z | ) | ((x)<(y)?FXMIN(x,z):FXMIN(y,z)) |
Return the minimum of x, y and z.
#define FXMAX3 | ( | x, | |||
y, | |||||
z | ) | ((x)>(y)?FXMAX(x,z):FXMAX(y,z)) |
Return the maximum of x, y and z.
#define FXMIN4 | ( | x, | |||
y, | |||||
z, | |||||
w | ) | (FXMIN(FXMIN(x,y),FXMIN(z,w))) |
Return the minimum of x, y, z, and w.
#define FXMAX4 | ( | x, | |||
y, | |||||
z, | |||||
w | ) | (FXMAX(FXMAX(x,y),FXMAX(z,w))) |
Return the maximum of of x, y, z, and w.
#define FXMINMAX | ( | lo, | |||
hi, | |||||
a, | |||||
b | ) | ((a)<(b)?((lo)=(a),(hi)=(b)):((lo)=(b),(hi)=(a))) |
Return minimum and maximum of a, b.
#define FXCLAMP | ( | lo, | |||
x, | |||||
hi | ) | ((x)<(lo)?(lo):((x)>(hi)?(hi):(x))) |
Clamp value x to range [lo..hi].
Referenced by FX::FXVec4f::clamp(), FX::FXVec4d::clamp(), FX::FXVec3f::clamp(), FX::FXVec3d::clamp(), FX::FXVec2f::clamp(), and FX::FXVec2d::clamp().
#define FXSWAP | ( | a, | |||
b, | |||||
t | ) | ((t)=(a),(a)=(b),(b)=(t)) |
Swap a pair of numbers.
#define FXLERP | ( | a, | |||
b, | |||||
f | ) | ((a)+((b)-(a))*(f)) |
Linear interpolation between a and b, where 0<=f<=1.
#define STRUCTOFFSET | ( | str, | |||
member | ) | (((char *)(&(((str *)0)->member)))-((char *)0)) |
Offset of member in a structure.
#define ARRAYNUMBER | ( | array | ) | (sizeof(array)/sizeof(array[0])) |
Number of elements in a static array.
#define CONTAINER | ( | ptr, | |||
str, | |||||
mem | ) | ((str*)(((char*)(ptr))-STRUCTOFFSET(str,mem))) |
Container class of a member class.
#define MKUINT | ( | l, | |||
h | ) | ((((FX::FXuint)(l))&0xffff) | (((FX::FXuint)(h))<<16)) |
Make int out of two shorts.
#define FXSEL | ( | type, | |||
id | ) | ((((FX::FXuint)(id))&0xffff) | (((FX::FXuint)(type))<<16)) |
Make selector from message type and message id.
#define FXSELTYPE | ( | s | ) | ((FX::FXushort)(((s)>>16)&0xffff)) |
Get type from selector.
#define FXSELID | ( | s | ) | ((FX::FXushort)((s)&0xffff)) |
Get ID from selector.
#define FXBITREVERSE | ( | b | ) | (((b&0x01)<<7)|((b&0x02)<<5)|((b&0x04)<<3)|((b&0x08)<<1)|((b&0x10)>>1)|((b&0x20)>>3)|((b&0x40)>>5)|((b&0x80)>>7)) |
Reverse bits in byte.
#define FXISUTF | ( | c | ) | (((c)&0xC0)!=0x80) |
Test if character c is at the start of a utf8 sequence.
#define FXAVGCOLOR | ( | ca, | |||
cb | ) | (((ca)&(cb))+((((ca)^(cb))&0xFEFEFEFE)>>1)) |
Average of two FXColor ca and FXColor cb.
#define FXRGBA | ( | r, | |||
g, | |||||
b, | |||||
a | ) | (((FX::FXuint)(FX::FXuchar)(r)) | ((FX::FXuint)(FX::FXuchar)(g)<<8) | ((FX::FXuint)(FX::FXuchar)(b)<<16) | ((FX::FXuint)(FX::FXuchar)(a)<<24)) |
Make RGBA color.
#define FXRGB | ( | r, | |||
g, | |||||
b | ) | (((FX::FXuint)(FX::FXuchar)(r)) | ((FX::FXuint)(FX::FXuchar)(g)<<8) | ((FX::FXuint)(FX::FXuchar)(b)<<16) | 0xff000000) |
Make RGB color.
#define FXREDVAL | ( | rgba | ) | ((FX::FXuchar)((rgba)&0xff)) |
Get red value from RGBA color.
#define FXGREENVAL | ( | rgba | ) | ((FX::FXuchar)(((rgba)>>8)&0xff)) |
Get green value from RGBA color.
#define FXBLUEVAL | ( | rgba | ) | ((FX::FXuchar)(((rgba)>>16)&0xff)) |
Get blue value from RGBA color.
#define FXALPHAVAL | ( | rgba | ) | ((FX::FXuchar)(((rgba)>>24)&0xff)) |
Get alpha value from RGBA color.
#define FXRGBACOMPVAL | ( | rgba, | |||
comp | ) | ((FX::FXuchar)(((rgba)>>((comp)<<3))&0xff)) |
Get component value of RGBA color.
#define FXASSERT | ( | exp | ) | ((exp)?((void)0):(void)FX::fxassert(#exp,__FILE__,__LINE__)) |
FXASSERT() prints out a message when the expression fails, and nothing otherwise.
Unlike assert(), FXASSERT() will not terminate the execution of the application. When compiling your application for release, all assertions are compiled out; thus there is no impact on execution speed.
#define FXVERIFY | ( | exp | ) | ((exp)?((void)0):(void)FX::fxverify(#exp,__FILE__,__LINE__)) |
FXVERIFY prints out a message when the expression fails, and nothing otherwise.
When compiling your application for release, these messages are compiled out, but unlike FXASSERT, FXVERIFY will still execute the expression.
#define FXTRACE | ( | arguments | ) | FX::fxtrace arguments |
FXTRACE() allows you to trace the execution of your application with increasing levels of detail the higher the trace level.
The trace level is determined by variable fxTraceLevel, which may be set from the command line with "-tracelevel <level>". When compiling your application for release, all trace statements are compiled out, just like FXASSERT. A statement like: FXTRACE((10,"The value of x=%d\n",x)) will generate output only if fxTraceLevel is set to 11 or greater. The default value fxTraceLevel=0 will block all trace outputs. Note the double parentheses!
#define FXMALLOC | ( | ptr, | |||
type, | |||||
no | ) | (FX::fxmalloc((void **)(ptr),sizeof(type)*(no))) |
Allocate a memory block of no elements of type and store a pointer to it into the address pointed to by ptr.
Return FALSE if size!=0 and allocation fails, TRUE otherwise. An allocation of a zero size block returns a NULL pointer.
#define FXCALLOC | ( | ptr, | |||
type, | |||||
no | ) | (FX::fxcalloc((void **)(ptr),sizeof(type)*(no))) |
Allocate a zero-filled memory block no elements of type and store a pointer to it into the address pointed to by ptr.
Return FALSE if size!=0 and allocation fails, TRUE otherwise. An allocation of a zero size block returns a NULL pointer.
#define FXRESIZE | ( | ptr, | |||
type, | |||||
no | ) | (FX::fxresize((void **)(ptr),sizeof(type)*(no))) |
Resize the memory block referred to by the pointer at the address ptr, to a hold no elements of type.
Returns FALSE if size!=0 and reallocation fails, TRUE otherwise. If reallocation fails, pointer is left to point to old block; a reallocation to a zero size block has the effect of freeing it. The ptr argument must be the address where the pointer to the allocated block is to be stored.
#define FXMEMDUP | ( | ptr, | |||
src, | |||||
type, | |||||
no | ) | (FX::fxmemdup((void **)(ptr),(const void*)(src),sizeof(type)*(no))) |
Allocate and initialize memory from another block.
Return FALSE if size!=0 and source!=NULL and allocation fails, TRUE otherwise. An allocation of a zero size block returns a NULL pointer. The ptr argument must be the address where the pointer to the allocated block is to be stored.
#define FXFREE | ( | ptr | ) | (FX::fxfree((void **)(ptr))) |
Free a block of memory allocated with either FXMALLOC, FXCALLOC, FXRESIZE, or FXMEMDUP.
It is OK to call free a NULL pointer. The argument must be the address of the pointer to the block to be released. The pointer is set to NULL to prevent any further references to the block after releasing it.
#define fabsf | ( | x | ) | ((float)fabs((double)(x))) |
These are some of the ISO C99 standard single-precision transcendental functions.
On LINUX, specify _GNU_SOURCE or _ISOC99_SOURCE to enable native implementation; otherwise, these macros will be used. Apple OS-X implements fabsf(x), ceilf(x), floorf(x), and fmodf(x,y). Define FLOAT_MATH_FUNCTIONS if these functions are available in some other library you're linking to.
#define ceilf | ( | x | ) | ((float)ceil((double)(x))) |
#define floorf | ( | x | ) | ((float)floor((double)(x))) |
#define fmodf | ( | x, | |||
y | ) | ((float)fmod((double)(x),(double)(y))) |
#define sqrtf | ( | x | ) | ((float)sqrt((double)(x))) |
Referenced by FX::FXVec4f::length(), FX::FXVec3f::length(), FX::FXVec2f::length(), and FX::FXComplexf::modulus().
#define sinf | ( | x | ) | ((float)sin((double)(x))) |
Referenced by FX::polar().
#define cosf | ( | x | ) | ((float)cos((double)(x))) |
Referenced by FX::polar().
#define tanf | ( | x | ) | ((float)tan((double)(x))) |
#define asinf | ( | x | ) | ((float)asin((double)(x))) |
#define acosf | ( | x | ) | ((float)acos((double)(x))) |
#define atanf | ( | x | ) | ((float)atan((double)(x))) |
#define atan2f | ( | y, | |||
x | ) | ((float)atan2((double)(y),(double)(x))) |
Referenced by FX::FXComplexf::argument().
#define powf | ( | x, | |||
y | ) | ((float)pow((double)(x),(double)(y))) |
#define expf | ( | x | ) | ((float)exp((double)(x))) |
Referenced by FX::exponent().
#define logf | ( | x | ) | ((float)log((double)(x))) |
Referenced by FX::logarithm().
#define log10f | ( | x | ) | ((float)log10((double)(x))) |
![]() |