Final Platform Layer 0.9.8-beta
|
This category contains several useful macro functions. More...
Macros | |
#define | FPL_NOT_IMPLEMENTED |
This will full-on crash when something is not implemented always. | |
#define | fplArrayCount(arr) |
Returns the element count from a static array. This should ideally produce a compile error when passing a pointer to it. | |
#define | fplClearStruct(ptr) |
Clears the given struct pointer to zero. | |
#define | fplCopyStruct(src, dst) |
Copies the given source struct into the destination struct. | |
#define | fplGetAlignedSize(size, alignment) |
Returns the given size, extended to satisfy the given alignment boundary. | |
#define | fplGetAlignmentOffset(value, alignment) |
Returns the offset for the value to satisfy the given alignment boundary. | |
#define | fplGigaBytes(value) |
Returns the number of bytes for the given gigabytes. | |
#define | fplIsAligned(ptr, alignment) |
Returns true when the given pointer address is aligned to the given alignment. | |
#define | fplIsBigEndian() |
Returns true when the given platform is big-endian. | |
#define | fplIsBitSet(value, bit) |
Returns true when the given value has the given bit set. | |
#define | fplIsLittleEndian() |
Returns true when the given platform is little-endian. | |
#define | fplIsPowerOfTwo(value) |
Returns true when the given value is a power of two value. | |
#define | fplKiloBytes(value) |
Returns the number of bytes for the given kilobytes. | |
#define | fplMax(a, b) |
Returns the biggest value of A and B. | |
#define | fplMegaBytes(value) |
Returns the number of bytes for the given megabytes. | |
#define | fplMin(a, b) |
Returns the smallest value of A and B. | |
#define | fplOffsetOf(type, field) |
Returns the offset in bytes for the specified structure type and field name. | |
#define | fplStackAllocate(size) |
Manually allocate the number of specified bytes of memory on the stack. | |
#define | fplStructInit |
Initializes a struct by the given type. | |
#define | fplStructSet |
Sets a struct pointer to the given value. | |
#define | fplTeraBytes(value) |
Returns the number of bytes for the given terabytes. | |
#define | fplZeroInit |
Initializes a struct to zero. | |
This category contains several useful macro functions.
#define FPL_NOT_IMPLEMENTED |
This will full-on crash when something is not implemented always.
Definition at line 2288 of file final_platform_layer.h.
#define fplArrayCount | ( | arr | ) |
Returns the element count from a static array. This should ideally produce a compile error when passing a pointer to it.
Definition at line 2347 of file final_platform_layer.h.
#define fplClearStruct | ( | ptr | ) |
Clears the given struct pointer to zero.
Definition at line 2332 of file final_platform_layer.h.
#define fplCopyStruct | ( | src, | |
dst | |||
) |
Copies the given source struct into the destination struct.
Definition at line 2334 of file final_platform_layer.h.
#define fplGetAlignedSize | ( | size, | |
alignment | |||
) |
Returns the given size, extended to satisfy the given alignment boundary.
Definition at line 2310 of file final_platform_layer.h.
#define fplGetAlignmentOffset | ( | value, | |
alignment | |||
) |
Returns the offset for the value to satisfy the given alignment boundary.
Definition at line 2308 of file final_platform_layer.h.
#define fplGigaBytes | ( | value | ) |
Returns the number of bytes for the given gigabytes.
Definition at line 2327 of file final_platform_layer.h.
#define fplIsAligned | ( | ptr, | |
alignment | |||
) |
Returns true when the given pointer address is aligned to the given alignment.
Definition at line 2312 of file final_platform_layer.h.
#define fplIsBigEndian | ( | ) |
Returns true when the given platform is big-endian.
Definition at line 2316 of file final_platform_layer.h.
#define fplIsBitSet | ( | value, | |
bit | |||
) |
Returns true when the given value has the given bit set.
Definition at line 2320 of file final_platform_layer.h.
#define fplIsLittleEndian | ( | ) |
Returns true when the given platform is little-endian.
Definition at line 2318 of file final_platform_layer.h.
#define fplIsPowerOfTwo | ( | value | ) |
Returns true when the given value is a power of two value.
Definition at line 2314 of file final_platform_layer.h.
#define fplKiloBytes | ( | value | ) |
Returns the number of bytes for the given kilobytes.
Definition at line 2323 of file final_platform_layer.h.
#define fplMax | ( | a, | |
b | |||
) |
Returns the biggest value of A and B.
Definition at line 2356 of file final_platform_layer.h.
#define fplMegaBytes | ( | value | ) |
Returns the number of bytes for the given megabytes.
Definition at line 2325 of file final_platform_layer.h.
#define fplMin | ( | a, | |
b | |||
) |
Returns the smallest value of A and B.
Definition at line 2353 of file final_platform_layer.h.
#define fplOffsetOf | ( | type, | |
field | |||
) |
Returns the offset in bytes for the specified structure type and field name.
Definition at line 2350 of file final_platform_layer.h.
#define fplStackAllocate | ( | size | ) |
Manually allocate the number of specified bytes of memory on the stack.
Definition at line 2365 of file final_platform_layer.h.
#define fplStructInit |
Initializes a struct by the given type.
Definition at line 2305 of file final_platform_layer.h.
#define fplStructSet |
Sets a struct pointer to the given value.
Definition at line 2303 of file final_platform_layer.h.
#define fplTeraBytes | ( | value | ) |
Returns the number of bytes for the given terabytes.
Definition at line 2329 of file final_platform_layer.h.
#define fplZeroInit |
Initializes a struct to zero.
Definition at line 2301 of file final_platform_layer.h.