Final Platform Layer  0.9.6-beta
Macros
Function macros

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.
 

Detailed Description

This category contains several useful macro functions.