Final Platform Layer 0.9.8-beta
Loading...
Searching...
No Matches
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.

Macro Definition Documentation

◆ FPL_NOT_IMPLEMENTED

#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.

◆ fplArrayCount

#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.

◆ fplClearStruct

#define fplClearStruct (   ptr)

Clears the given struct pointer to zero.

Definition at line 2332 of file final_platform_layer.h.

◆ fplCopyStruct

#define fplCopyStruct (   src,
  dst 
)

Copies the given source struct into the destination struct.

Definition at line 2334 of file final_platform_layer.h.

◆ fplGetAlignedSize

#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.

◆ fplGetAlignmentOffset

#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.

◆ fplGigaBytes

#define fplGigaBytes (   value)

Returns the number of bytes for the given gigabytes.

Definition at line 2327 of file final_platform_layer.h.

◆ fplIsAligned

#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.

◆ fplIsBigEndian

#define fplIsBigEndian ( )

Returns true when the given platform is big-endian.

Definition at line 2316 of file final_platform_layer.h.

◆ fplIsBitSet

#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.

◆ fplIsLittleEndian

#define fplIsLittleEndian ( )

Returns true when the given platform is little-endian.

Definition at line 2318 of file final_platform_layer.h.

◆ fplIsPowerOfTwo

#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.

◆ fplKiloBytes

#define fplKiloBytes (   value)

Returns the number of bytes for the given kilobytes.

Definition at line 2323 of file final_platform_layer.h.

◆ fplMax

#define fplMax (   a,
 
)

Returns the biggest value of A and B.

Definition at line 2356 of file final_platform_layer.h.

◆ fplMegaBytes

#define fplMegaBytes (   value)

Returns the number of bytes for the given megabytes.

Definition at line 2325 of file final_platform_layer.h.

◆ fplMin

#define fplMin (   a,
 
)

Returns the smallest value of A and B.

Definition at line 2353 of file final_platform_layer.h.

◆ fplOffsetOf

#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.

◆ fplStackAllocate

#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.

◆ fplStructInit

#define fplStructInit

Initializes a struct by the given type.

Definition at line 2305 of file final_platform_layer.h.

◆ fplStructSet

#define fplStructSet

Sets a struct pointer to the given value.

Definition at line 2303 of file final_platform_layer.h.

◆ fplTeraBytes

#define fplTeraBytes (   value)

Returns the number of bytes for the given terabytes.

Definition at line 2329 of file final_platform_layer.h.

◆ fplZeroInit

#define fplZeroInit

Initializes a struct to zero.

Definition at line 2301 of file final_platform_layer.h.