Kicking it Olde Sküül! Burgerlib on Github Follow Olde Sküül on Twitter Burgerbecky on LinkedIn Burgerbecky on LinkedIn
Loading...
Searching...
No Matches
Namespaces | Classes | Typedefs | Enumerations | Functions | Variables
Burger Namespace Reference

Namespaces

namespace  Debug
 Group of functions to assist in debugging.
 
namespace  Flash
 Functions and classes to support playing Adobe Flash files.
 
namespace  Linux
 
namespace  MacOS
 Functions specific to MacOS.
 
namespace  MacOSX
 
namespace  MSDos
 Functions specific to MS/DOS.
 
namespace  PS4
 
namespace  Switch
 
namespace  type_traits
 Semi-private template classes for type checking.
 
namespace  Unix
 
namespace  Vulkan
 
namespace  Win32
 Namespace for Windows specific functions and classes.
 
namespace  Xbox360
 

Classes

struct  add_const
 Add the const qualifier to a type. More...
 
struct  add_cv
 Add the const and volatile qualifier to a type. More...
 
struct  add_volatile
 Add the volatile qualifier to a type. More...
 
struct  ADPCMState_t
 
struct  alignment_of
 Determine the alignment of an object. More...
 
class  allocator
 Implementation of std::allocator<> More...
 
class  allocator< const void >
 Implementation of std::allocator<void> More...
 
class  allocator< void >
 Implementation of std::allocator<void> More...
 
class  AllocatorANSI
 ANSI Memory Manager object. More...
 
struct  AllocatorBase
 Base class for memory manager objects. More...
 
class  AllocatorHandle
 
class  ArgumentType
 Container class for passing data to SafePrint. More...
 
struct  ArgumentType_Dispatch
 Intrinsic data type dispatcher. More...
 
struct  ArgumentType_DispatchPtr
 Intrinsic data type dispatcher. More...
 
union  ArgumentType_t
 Base structure for ArgumentType. More...
 
union  ArgumentTypeDataUnion_t
 Data stored in this object. More...
 
struct  Assert_t
 Container structure for Assert support. More...
 
class  AutoreleasePool
 Create an instance of a NSAutoreleasePool. More...
 
class  AutoRepeat
 Autorepeat a joystick. More...
 
class  Base
 Base class for virtual destructor. More...
 
struct  BigEndian
 Loads a 16, 32 or 64 bit value with byte swapping if needed. More...
 
struct  bool_constant
 Wrap a static bool constant. More...
 
class  CaptureStdout
 Class to capture stdout and stderr. More...
 
class  ClassArray
 Template for creating arrays of class objects. More...
 
class  CodeFramework
 Manage MacOSX / iOS Framework library files. More...
 
class  CodeLibrary
 Manage code library files. More...
 
class  CodePage
 Shared constants for code page handlers. More...
 
class  CommandParameter
 Base class for command line parameters. More...
 
class  CommandParameterBooleanTrue
 Class for a boolean command line parameters. More...
 
class  CommandParameterString
 Class for a string command line parameter. More...
 
class  CommandParameterWordPtr
 Class for a numeric string command line parameter. More...
 
class  Compress
 Base class for data compression. More...
 
class  CompressDeflate
 Compress data using Deflate Encoding. More...
 
class  CompressILBMRLE
 Compress data using ILBM Run Length Encoding. More...
 
class  CompressLZSS
 Compress data using LZSS encoding. More...
 
struct  conditional
 Select a type based if the conditional is true or false. More...
 
class  ConditionVariable
 Class for creating a condition variable. More...
 
class  ConsoleApp
 Base class for console applications. More...
 
struct  CPUID_t
 Structure that holds the features of the CPU. More...
 
class  Decompress
 Base class for data decompression. More...
 
class  Decompress16BitBEAudio
 Process 16 bit audio data in Big Endian format. More...
 
class  Decompress16BitLEAudio
 Process 16 bit audio data in Little Endian format. More...
 
class  Decompress32BitBEAudio
 Process 32 bit audio data in Big Endian format. More...
 
class  Decompress32BitLEAudio
 Process 32 bit audio data in Little Endian format. More...
 
class  DecompressALaw
 Process audio data compressed with ALaw. More...
 
class  DecompressAudio
 Base class for audio decompression codec. More...
 
class  DecompressDeflate
 Decompress Deflate format. More...
 
class  DecompressILBMRLE
 Decompress RLE format. More...
 
class  DecompressLZSS
 Decompress LZSS format. More...
 
class  DecompressMace3
 Decompress MACE 3 format. More...
 
class  DecompressMace6
 Decompress MACE 6 format. More...
 
class  DecompressMicrosoftADPCM
 Decompress Microsoft ADPCM format. More...
 
class  DecompressMP3
 Process audio data compressed with MP3. More...
 
class  DecompressSigned8BitAudio
 Process signed 8 bit audio data. More...
 
class  DecompressULaw
 Process audio data compressed with ULaw. More...
 
class  DecompressUnsigned8BitAudio
 Process unsigned 8 bit audio data. More...
 
struct  default_delete_Base
 
struct  default_delete_Free
 
class  DetectMultiLaunch
 Class to detect multiple launches of a desktop application. More...
 
class  DirectoryEntry_t
 A directory entry returned by DirectorySearch. More...
 
class  DirectorySearch
 Directory contents iteration class. More...
 
class  DirectXPerfMarker
 DirectX performance marker. More...
 
struct  disable_if
 Create typedef type if condition is false. More...
 
class  Display
 Base class for instantiating a video display and the API to drive it. More...
 
class  DisplayDIB
 
class  DisplayDIBSoftware8
 DIB startup and teardown class. More...
 
class  DisplayDirectX11
 
class  DisplayDirectX9
 
class  DisplayDirectX9Software8
 
class  DisplayObject
 Class for managing display objects. More...
 
class  DisplayOpenGL
 
class  DisplayOpenGLSoftware8
 
class  DoubleLinkedList
 Simple double linked list manager. More...
 
struct  DoubleLinkedList_t
 Double linked list. More...
 
struct  Dxt1Packet_t
 Data structure for a DXT1 compressed texture block. More...
 
struct  Dxt3Packet_t
 Data structure for a DXT3 compressed texture block. More...
 
struct  Dxt5Packet_t
 Data structure for a DXT5 compressed texture block. More...
 
class  Effect
 Base class for shader effects. More...
 
class  Effect2D
 
class  Effect2DDX9
 
class  Effect2DOpenGL
 
class  EffectPositionColorTexture
 
class  EffectPositionColorTextureDX9
 
class  EffectPositionColorTextureOpenGL
 
class  EffectPositionTexture
 
class  EffectPositionTextureDX9
 
class  EffectPositionTextureOpenGL
 
struct  enable_if
 Create typedef type if condition is true. More...
 
struct  EventHeader_t
 Base structure for events. More...
 
class  File
 System file reference class. More...
 
class  FileAPF
 Reads files. More...
 
class  FileBMP
 Reads and writes BMP files. More...
 
class  FileDDS
 Reads and writes DDS files. More...
 
class  FileGIF
 Reads and writes GIF files. More...
 
class  FileINI
 Reads and writes INI files. More...
 
class  FileLBM
 Reads and writes LBM files. More...
 
class  FileManager
 Global file system manager. More...
 
class  FileManagerSimple
 Initialization class for the global FileManager structure. More...
 
class  FileMP3
 Reads and writes MP3 files. More...
 
class  Filename
 File name container. More...
 
class  FilePCX
 Reads and writes PCX files. More...
 
class  FilePNG
 Reads and writes PNG files. More...
 
class  FileTGA
 Reads and writes TGA files. More...
 
class  FileXML
 Reads and writes XML files. More...
 
struct  FixedMatrix3D_t
 3 dimensional fixed point matrix More...
 
struct  FixedMatrix4D_t
 4x4 Fixed32 matrix. More...
 
struct  FixedVector2D_t
 2 dimensional fixed point vector More...
 
struct  FixedVector3D_t
 3D Fixed32 vector. More...
 
struct  FixedVector4D_t
 4 dimensional fixed point vector More...
 
class  FloatTimer
 Floating point timer. More...
 
class  Font
 Base class for font manager. More...
 
class  Font4Bit
 Class to render a tiny space 4 bit per pixel font. More...
 
class  ForwardLink
 Singly linked list pointer. More...
 
struct  FourCharacterCode_t
 Helper structure to create 4 characters codes. More...
 
class  FPInfo
 Class for analyzing a floating point number. More...
 
class  FPLargeInt
 Class for managing a very large integer for double precision. More...
 
class  FPPrintInfo
 Digit printing class for floating point. More...
 
class  GameApp
 Base class for video game application. More...
 
struct  GfxShape_t
 
class  GIFDecoder
 GIF style LZW decompresser. More...
 
class  GIFEncoder
 GIF style LZW compressor. More...
 
class  GlobalMemoryManager
 Singleton class for global memory allocation. More...
 
struct  Globals
 Global variables shared by all functions in the application. More...
 
struct  GOST_t
 32 byte array to contain a GOST hash More...
 
struct  GOSTHasher_t
 Multi-pass GOST hash generator. More...
 
class  GridIndexBox
 Class for managing a grid with objects on overlapping areas. More...
 
class  GridIndexPoints
 Manager to handle a grid with singly linked lists with values. More...
 
class  Half
 Container for a 16 bit float. More...
 
class  HashMap
 Key / data pair hash for quick lookup and retrieval. More...
 
class  HashMapShared
 Base class for HashMap. More...
 
class  HashMapString
 String key / data pair hash for quick lookup and retrieval. More...
 
class  HashMapStringCase
 String key / data pair hash for quick lookup and retrieval. More...
 
struct  HSL_t
 Hue, Saturation and Intensity 32 bit floating point values. More...
 
struct  ice_and
 Test for all values being true. More...
 
struct  ice_eq
 Test for equality. More...
 
struct  ice_ne
 Test for inequality. More...
 
struct  ice_not
 Reverse boolean input. More...
 
struct  ice_or
 Test for any value being true. More...
 
class  Image
 Class for containing raw images. More...
 
class  InputMemoryStream
 Fast input memory stream. More...
 
class  InputRezStream
 InputMemoryStream for RezFile. More...
 
struct  integral_constant
 Wrap a static constant of specified type. More...
 
struct  is_arithmetic
 Test if a type is an integer or a floating point number. More...
 
struct  is_const
 Test if a type is const. More...
 
struct  is_floating_point
 Test if a type is a float. More...
 
struct  is_fundamental
 Test if a type is arithmetic or void. More...
 
struct  is_integral
 Test if a type is an integer. More...
 
struct  is_lvalue_reference
 Test if a type is an lvalue reference. More...
 
struct  is_pointer
 Test if a type is a pointer. More...
 
struct  is_reference
 Test if a type is a reference. More...
 
struct  is_rvalue_reference
 Test if a type is an rvalue reference. More...
 
struct  is_same
 Determine if two objects are the same type. More...
 
struct  is_signed
 Test if a type is a signed value. More...
 
struct  is_unsigned
 Test if a type is an unsigned value. More...
 
struct  is_void
 Test if a type is void. More...
 
struct  is_volatile
 Test if a type is volatile. More...
 
class  ISOLatin1
 Conversion routines to support the ISOLatin1 text encoding scheme. More...
 
class  Joypad
 
struct  JoypadButtonEvent_t
 Structure for joypad button events. More...
 
class  Keyboard
 Keyboard input manager. More...
 
struct  KeyEvent_t
 Structure holding a keyboard event. More...
 
class  LastInFirstOut
 Class that manages a last in first out singly linked list. More...
 
class  LinkedListObjects
 Linked list object class. More...
 
class  LinkedListPointer
 Double linked list with pointer class. More...
 
struct  LittleEndian
 Loads a 16, 32 or 64 bit value with byte swapping if needed. More...
 
class  Localization
 Localization functions. More...
 
struct  longlong_t
 
struct  LWShape_t
 
struct  LWXShape_t
 
struct  MacAddress_t
 
struct  MACEState_t
 State of MACE compression/decompression. More...
 
struct  MacOSXOld
 Functions exclusive to Apple macOS. More...
 
class  MacRomanUS
 Conversion routines to support the MacRomanUS text encoding scheme. More...
 
struct  Matrix3D_t
 3 dimensional floating point matrix More...
 
struct  Matrix4D_t
 4 dimensional floating point matrix More...
 
struct  MD2_t
 16 byte array to contain an MD2 hash More...
 
struct  MD2Hasher_t
 Multi-pass MD2 hash generator. More...
 
struct  MD4_t
 16 byte array to contain an MD4 hash More...
 
struct  MD4Hasher_t
 Multi-pass MD4 hash generator. More...
 
struct  MD5_t
 16 byte array to contain an MD5 hash More...
 
struct  MD5Hasher_t
 Multi-pass MD5 hash generator. More...
 
struct  MemoryManager
 Base class for memory managers. More...
 
class  MemoryManagerANSI
 ANSI Memory Manager. More...
 
class  MemoryManagerGlobalANSI
 Global ANSI Memory Manager helper class. More...
 
class  MemoryManagerGlobalHandle
 Global Handle Memory Manager helper class. More...
 
class  MemoryManagerHandle
 Handle based Memory Manager. More...
 
class  Mouse
 Class for mouse input. More...
 
struct  MouseButtonEvent_t
 Structure for mouse button events. More...
 
struct  MouseMotionEvent_t
 Structure for mouse motion events. More...
 
struct  MousePositionEvent_t
 Structure for mouse position events. More...
 
struct  MouseWheelEvent_t
 Structure for mouse wheel events. More...
 
class  MPLastInFirstOut
 Thread safe class that manages a last in first out singly linked list. More...
 
class  Mutex
 Class for creating a Mutex for a critical section of data. More...
 
class  MutexLock
 Class for locking and releasing a mutex in a function. More...
 
class  MutexStatic
 Class for creating a Mutex for a statically allocated critical section of data. More...
 
struct  NativeEndian
 Loads a 16, 32 or 64 bit value with no byte swapping. More...
 
struct  NetAddr_t
 Generic structure to contain a network address. More...
 
struct  NetPacket_t
 
class  NetPlay
 Network game manager. More...
 
class  NetworkEndpoint
 Base class for network endpoints. More...
 
class  NetworkEndpointInstance
 Base class for network endpoint instances. More...
 
class  NetworkEndpointInstanceTCP
 
class  NetworkEndpointTCP
 
struct  NetworkEnumPacketTCP_t
 
class  NetworkManager
 
class  NetworkModule
 
struct  NetworkModuleInfo_t
 Structure to obtain information from a NetworkModule. More...
 
class  NetworkModuleSettings
 Abstract class for settings for endpoints. More...
 
class  NetworkModuleSettingsTCP
 
class  NetworkModuleTCP
 
class  NumberString
 Simple "C" string numeric conversion class. More...
 
class  NumberStringHex
 Simple "C" string hexadecimal conversion class. More...
 
class  OSCursor
 Class to handle an operating system cursor. More...
 
class  OSCursorImage
 Class to generate an operating system cursor. More...
 
class  OutputMemoryStream
 Fast output memory stream. More...
 
class  Pair
 Template for creating an object pair. More...
 
class  Palette
 Static functions to manage palettes. More...
 
class  Perforce
 Handle a connection to a perforce server. More...
 
struct  Point2D_t
 Integer 2D coordinate. More...
 
class  ProxyReferenceCounter
 Class to track an object that can be deleted at any time. More...
 
class  Queue
 A simple first in first out queue. More...
 
class  Random
 A simple random number generator. More...
 
class  RandomBase
 A random number generator base class. More...
 
class  RandomMersenneTwist
 Random number generator using Mersenne Twist (MT19937) More...
 
struct  Rect_t
 Structure describing an integer precision 2D rectangle. More...
 
class  ReferenceCounter
 Class to track an object using SmartPointer. More...
 
struct  remove_const
 Remove the const qualifier from a type. More...
 
struct  remove_cv
 Remove the volatile and const qualifier from a type. More...
 
struct  remove_pointer
 Remove the reference qualifier to a type. More...
 
struct  remove_reference
 Remove the reference qualifier to a type. More...
 
struct  remove_volatile
 Remove the volatile qualifier from a type. More...
 
class  Renderer
 Base graphics renderer class. More...
 
class  RendererSoftware16
 16 bit software renderer More...
 
class  RendererSoftware8
 8 bit paletted software renderer More...
 
class  RezFile
 Rez file manager. More...
 
struct  RGBAFloat_t
 Red, Green,Blue and Alpha 32 bit floating point values. More...
 
struct  RGBAWord16_t
 Red, Green,Blue and Alpha 16 bit values. More...
 
struct  RGBAWord8_t
 Red, Green,Blue and Alpha 8 bit values. More...
 
struct  RGBFloat_t
 Red, Green and Blue 32 bit floating point values. More...
 
struct  RGBWord16_t
 Red, Green and Blue 16 bit values. More...
 
struct  RGBWord8_t
 Red, Green and Blue 8 bit values. More...
 
class  RunQueue
 Simple manager of a list of function pointers. More...
 
class  SafePrint
 Container class for SafePrint functions. More...
 
class  Semaphore
 Class for creating a semaphore. More...
 
class  Sequencer
 
struct  SHA1_t
 20 byte array to contain a SHA-1 hash More...
 
struct  SHA1Hasher_t
 Multi-pass SHA1 hash generator. More...
 
class  Shader2DCColor
 
class  Shader2DCColorDX9
 
class  Shader2DCColorOpenGL
 
class  Shader2DColorVertex
 
class  Shader2DColorVertexDX9
 
class  Shader2DColorVertexOpenGL
 
struct  Shape8Bit_t
 
struct  Shape8BitArray_t
 
struct  Shape8BitOffset_t
 
struct  Shape8BitOffsetArray_t
 
class  SimpleArray
 Template for creating arrays of intrinsic objects. More...
 
class  SimpleArrayBase
 Base class for SimpleArray. More...
 
class  SimpleString
 Simple "C" string container. More...
 
class  SmartPointer
 Template for auto reference counting a pointer. More...
 
class  SoundBufferRez
 Convenience class for sound files in resources. More...
 
class  SoundManager
 
struct  StaticRTTI
 Structure to handle simple Run Time Type Identification. More...
 
class  Steam
 
class  String
 UTF 8 bit string class. More...
 
class  String16
 UTF 16 bit string class. More...
 
struct  SwapEndian
 Swap the byte order of 16, 32 and 64 bit values. More...
 
class  Texture
 Class for managing hardware images. More...
 
class  TextureDirectX9
 Class for containing raw images. More...
 
class  TextureOpenGL
 
class  Thread
 Class for creating a thread. More...
 
struct  ThreadLocalStorage_t
 Simple array of ThreadLocalStorageEntry_t records. More...
 
struct  ThreadLocalStorageEntry_t
 Thread local storage for shutdown callback. More...
 
struct  ThreadLocalStorageRecord_t
 Internal record to match ThreadLocalStorage_t to a thread. More...
 
class  Tick
 Low level timer manager. More...
 
struct  TimeDate_t
 Structure to hold a date and time. More...
 
union  uint32_float_t
 Union to create float values with integer constants. More...
 
union  uint64_double_t
 Union to create double values with integer constants. More...
 
struct  ulonglong_t
 
class  Uname
 
struct  unique_ptr
 Simplified implementation of std::unique_ptr. More...
 
struct  unique_ptr_array
 
struct  unique_ptr_Base
 
struct  unique_ptr_Free
 
class  UTF16
 Conversion routines to the UTF8 format. More...
 
class  UTF32
 Conversion routines to the UTF32 format. More...
 
class  UTF8
 Conversion routines to support the UTF8 format. More...
 
struct  Vector2D_t
 2 dimensional floating point vector More...
 
struct  Vector3D_t
 3 dimensional floating point vector More...
 
struct  Vector4D_t
 4 dimensional floating point vector More...
 
struct  Vector_128Float32
 Structure to create a 128 vector with 32 bit floating point constants. More...
 
struct  Vector_128Float64
 Structure to create a 128 vector with 64 bit floating point constants. More...
 
struct  Vector_128Int32
 Structure to create a 128 vector with 32 bit signed integer constants. More...
 
struct  Vector_128Word16
 Structure to create a 128 vector with 16 bit unsigned integer constants. More...
 
struct  Vector_128Word32
 Structure to create a 128 vector with 32 bit unsigned integer constants. More...
 
struct  Vector_128Word64
 Structure to create a 128 vector with 64 bit unsigned integer constants. More...
 
struct  Vector_128Word8
 Structure to create a 128 vector with 8 bit unsigned integer constants. More...
 
class  VertexBuffer
 
class  VertexBufferDirectX9
 
class  VertexBufferOpenGL
 
class  WeakAndStrongBase
 Base class to support WeakPointer and SmartPointer. More...
 
class  WeakPointer
 Template for tracking an object that could self destruct. More...
 
class  WeakPointerAnchor
 Private sub class for use by WeakPointer. More...
 
class  Win1252
 Conversion routines to support the Win1252 text encoding scheme. More...
 
class  Win437
 Conversion routines to support the Win437 text encoding scheme. More...
 
struct  Word32ToVector2D_t
 Structure to create a Vector2D_t with 32 bit unsigned integer constants. More...
 
struct  Word32ToVector3D_t
 Structure to create a Vector3D_t with 32 bit unsigned integer constants. More...
 
struct  XInputGamePad_t
 Persistent state of an XInput gamepad. More...
 

Typedefs

typedef uint8_t Float80Bit[10]
 80 bit float(Extended)
 
typedef bool_constant< true > true_type
 Static bool constant of true.
 
typedef bool_constant< false > false_type
 Static bool constant of false.
 
typedef uint16_t float16_t
 16 bit float
 
typedef uintptr_t ThreadID
 Platform Thread ID.
 
typedef void(* TLSShutdownProc) (void *pThis)
 Callback prototype for TLS shutdown.
 
typedef uintptr_t SocketType
 Cross platform type for a socket.
 
typedef DisplayDirectX9 DisplayDefault
 
typedef Effect2DDX9 Effect2DDefault
 
typedef EffectPositionColorTextureDX9 EffectPositionColorTextureDefault
 
typedef EffectPositionTextureDX9 EffectPositionTextureDefault
 
typedef Shader2DCColorDX9 Shader2DCColorDefault
 
typedef Shader2DColorVertexDX9 Shader2DColorVertexDefault
 
typedef VertexBufferDirectX9 VertexBufferDefault
 

Enumerations

enum  eError {
  kErrorNone , kErrorGeneric = 0x7000 , kErrorInvalidParameter , kErrorInvalidArgument ,
  kErrorNotInitialized , kErrorAlreadyInitialized , kErrorNotSupported , kErrorNotSupportedOnThisPlatform ,
  kErrorVersionMismatch , kErrorItemNotFound , kErrorNotReady , kErrorOutOfEntries ,
  kErrorOutOfBounds , kErrorFailedTest , kErrorDuplicateEntries , kErrorRestartRequired ,
  kErrorFile = 0x7100 , kErrorFileNotFound , kErrorPathNotFound , kErrorVolumeNotFound ,
  kErrorWriteProtected , kErrorNoMoreFileDescriptors , kErrorFileTableOverflow , kErrorDirectoryNotEmpty ,
  kErrorNotAFile , kErrorNotADirectory , kErrorFileExists , kErrorOpenFailure ,
  kErrorReadFailure , kErrorWriteFailure , kErrorSeekFailure , kErrorAccessDenied ,
  kErrorResourceNotFound , kErrorIO , kErrorEndOfFile , kErrorIsLocked ,
  kErrorMemory = 0x7200 , kErrorOutOfMemory , kErrorDataCorruption , kErrorBadAlignment ,
  kErrorNoData , kErrorBufferTooSmall , kErrorBufferTooLarge , kErrorAudio = 0x7300 ,
  kErrorAudioDriverFailure , kErrorAudioFormatNotSupported , kErrorNetwork = 0x7400 , kErrorCancelled ,
  kErrorRefused , kErrorNetworkFailure , kErrorDataStarvation , kErrorSocketFailure ,
  kErrorAcceptFailure , kErrorAddressNotFound , kErrorFlowInterrupted , kErrorVideo = 0x7500 ,
  kErrorColorDepthNotSupported , kErrorResolutionNotSupported , kErrorGPUFailure , kErrorShaderCompile ,
  kErrorShaderIncludeMissing , kErrorOutOfVideoMemory , kErrorPalette , kErrorThread = 0x7600 ,
  kErrorTimeout , kErrorEnumerationInProgress , kErrorNotEnumerating , kErrorCantLock ,
  kErrorCantUnlock , kErrorThreadNotStarted , kErrorThreadAlreadyStarted , kErrorThreadCantStop ,
  kErrorThreadNotFound , kErrorThreadNotModified
}
 Decompression error code. More...
 
enum  eThreadPriority {
  kThreadPriorityInvalid , kThreadPriorityLow , kThreadPriorityNormal , kThreadPriorityHigh ,
  kThreadPriorityRealTime
}
 Thread priority setting. More...
 
enum  e8087Precision { k8087Precision24Bit = 0 , k8087PrecisionInvalid = 1 , k8087Precision56Bit = 2 , k8087Precision64Bit = 3 }
 32 bit Intel floating point precision More...
 
enum  e8087Rounding { k8087RoundingNearest = 0 , k8087RoundingDown = 1 , k8087RoundingUp = 2 , k8087RoundingTruncate = 3 }
 32 bit Intel floating point rounding mode More...
 
enum  ePowerPCRounding { kPPCRoundingNearest = 0 , kPPCRoundingTruncate = 1 , kPPCRoundingUp = 2 , kPPCRoundingDown = 3 }
 PowerPC floating point rounding mode. More...
 
enum  eArgumentType {
  kArgumentTypeInvalid , kArgumentTypeInt8 , kArgumentTypeInt16 , kArgumentTypeInt32 ,
  kArgumentTypeInt64 , kArgumentTypeUInt8 , kArgumentTypeUInt16 , kArgumentTypeUInt32 ,
  kArgumentTypeUInt64 , kArgumentTypeFloat16 , kArgumentTypeFloat32 , kArgumentTypeFloat64 ,
  kArgumentTypeBool , kArgumentTypeVector2 , kArgumentTypeVector4 , kArgumentTypeVector4Int ,
  kArgumentTypeVector4Dbl , kArgumentTypeBurgerStringPtr , kArgumentTypeCharPtr , kArgumentTypeInt8Ptr ,
  kArgumentTypeUInt8Ptr , kArgumentTypeInt16Ptr , kArgumentTypeUInt16Ptr , kArgumentTypeInt32Ptr ,
  kArgumentTypeUInt32Ptr , kArgumentTypeInt64Ptr , kArgumentTypeUInt64Ptr , kArgumentTypeFloat32Ptr ,
  kArgumentTypeFloat64Ptr , kArgumentTypeBoolPtr , kArgumentTypeVector2Ptr , kArgumentTypeVector4Ptr ,
  kArgumentTypeVector4IntPtr , kArgumentTypeVector4DblPtr , kArgumentTypeVoidPtr , kArgumentTypeCount ,
  kArgumentTypeAny , kArgumentTypeFirstInt = kArgumentTypeInt8 , kArgumentTypeLastInt = kArgumentTypeUInt64 , kArgumentTypeFirstSigned = kArgumentTypeInt8 ,
  kArgumentTypeLastSigned = kArgumentTypeInt64 , kArgumentTypeFirstUnsigned = kArgumentTypeUInt8 , kArgumentTypeLastUnsigned = kArgumentTypeUInt64 , kArgumentTypeFirstFloat = kArgumentTypeFloat16 ,
  kArgumentTypeLastFloat = kArgumentTypeFloat64 , kArgumentTypeFirstCString = kArgumentTypeBurgerStringPtr , kArgumentTypeLastCString = kArgumentTypeUInt8Ptr , kArgumentTypeFirstPointer = kArgumentTypeBurgerStringPtr ,
  kArgumentTypeLastPointer = kArgumentTypeVoidPtr , kArgumentTypeFirstVector = kArgumentTypeVector2 , kArgumentTypeLastVector = kArgumentTypeVector4Dbl , kArgumentTypeFirstVectorPointer = kArgumentTypeVector2Ptr ,
  kArgumentTypeLastVectorPointer = kArgumentTypeVector4DblPtr
}
 Type stored in this object. More...
 
enum  eNumericConversionFlags : uint_t { NOENDINGNULL = 0x4000 , LEADINGZEROS = 0x8000 }
 Bit flags to control numeric text generation. More...
 
enum  eASCIITypeFlag : uint8_t {
  ASCII_LOWER = 0x01 , ASCII_UPPER = 0x02 , ASCII_CONTROL = 0x04 , ASCII_SPACE = 0x08 ,
  ASCII_WHITESPACE = 0x10 , ASCII_PUNCTUATION = 0x20 , kASCIITypeFlagHex = 0x40 , ASCII_DIGIT = 0x80
}
 Bit flags to quickly test low ASCII character type. More...
 
enum  eUnixFlavor {
  kUnixUnknown , kUnixNative , kUnixMSYS2 , kUnixWSL ,
  kUnixCygwin , kUnixMacOSX , kUnixiOS , kUnixAndroid ,
  kUnixStadia
}
 Enum describing the actual platform Unix is running on. More...
 
enum  eTraceFlags {
  kTraceFlagMemoryLeak = 1 , kTraceFlagRezLoad = 2 , kTraceFlagFileLoad = 4 , kTraceFlagRaceWarnings = 8 ,
  kTraceFlagNetwork = 0x10 , kTraceFlagMessages = 0x20 , kTraceFlagActiveDebugging = 0x40 , kTraceFlagAll = 0x7F
}
 Flags to enable debugging features. More...
 
enum  eHintFlags { kHintWin32DisableThreadNamingException = 0x01 }
 Flags to enable/disable underlying code. More...
 
enum  { kSleepYield = 0 , kSleepInfinite = 0xFFFFFFFFU }
 
enum  eEvent {
  EVENT_NULL , EVENT_TIMER , EVENT_KEYDOWN , EVENT_KEYUP ,
  EVENT_KEYAUTO , EVENT_MOUSEDOWN , EVENT_MOUSEUP , EVENT_MOUSEMOVE ,
  EVENT_MOUSEPOSITION , EVENT_MOUSEWHEEL , EVENT_JOYPADDOWN , EVENT_JOYPADUP ,
  EVENT_JOYPADAXIS , EVENT_COUNT
}
 Enumeration for input events. More...
 
enum  eXInputDeadZoneType { XINPUTDEADZONE_NONE , XINPUTDEADZONE_CARDINAL , XINPUTDEADZONE_CENTER }
 
enum  eNetworkProtocol {
  kNetworkProtocolAppleTalk , kNetworkProtocolIP , kNetworkProtocolIPX , kNetworkProtocolBonjour ,
  kNetworkProtocolSteam , kNetworkProtocolXBoxLive , kNetworkProtocolUnknown , kNetworkProtocolCount
}
 ID codes for supported Network protocols. More...
 
enum  eSocketIndexes { kSocketIndexDatagram , kSocketIndexStream , kSocketIndexCount }
 Number of types of sockets available. More...
 
enum  eSocketFlags { kSocketFlagDatagram , kSocketFlagStream = (1 << kSocketIndexStream) , kSocketFlagAll , kSocketFlagNone = 0 }
 Flags for socket types. More...
 

Functions

template<class T >
constexpr remove_reference< T >::type && move (T &&t) noexcept
 Upconvert to && for move semantics.
 
const char * error_lookup_string (eError uError) noexcept
 Convert a Burgerlib error code into a string.
 
uintptr_t error_get_string (char *pOutput, uintptr_t uOutputSize, eError uError) noexcept
 Convert error code to a meaningful message.
 
eError platform_convert_to_error (int iNativeError) noexcept
 Convert platform error code to a Burgerlib error code.
 
int Assert (const char *pCondition, const char *pFilename, uint32_t uLineNumber) noexcept
 Redirect an assert to the application's assert function.
 
void invoke_debugger (void) noexcept
 Enter the debugger if present.
 
void GUID_init (GUID *pOutput) noexcept
 Create a new GUID.
 
void GUID_to_string (char *pOutput, const GUID *pInput) noexcept
 Convert a GUID to a string.
 
eError GUID_from_string (GUID *pOutput, const char *pInput) noexcept
 Convert a GUID string into a GUID.
 
uint_t GUID_hash (const GUID *pInput) noexcept
 Return the 16 bit hash of a GUID.
 
uint_t GUID_is_equal (const GUID *pInput1, const GUID *pInput2) noexcept
 Compare two GUID structures for equality.
 
int GUID_compare (const GUID *pInput1, const GUID *pInput2) noexcept
 Test two GUID for equality.
 
void Delete (const Base *pInput) noexcept
 Delete a base class.
 
uint32_t power_of_two (uint32_t uInput) noexcept
 Round up an integer to the nearest power of 2.
 
uint64_t power_of_two (uint64_t uInput) noexcept
 Round up an integer to the nearest power of 2.
 
float power_of_two (float fInput) noexcept
 Round up a 32 bit float to the nearest power of 2.
 
double power_of_two (double dInput) noexcept
 Round up a 64 bit float to the nearest power of 2.
 
template<class T >
power_of_two (T input) noexcept
 Round up an integer to the nearest power of 2.
 
uint32_t convert_from_BCD (uint32_t uInput) noexcept
 Convert a BCD value into a decimal integer.
 
uint32_t convert_to_BCD (uint32_t uInput) noexcept
 Convert a decimal integer into BCD format.
 
uint32_t bit_reverse (uint32_t uInput, uint_t uBitLength) noexcept
 Reverse the bits in a byte.
 
uint64_t bit_reverse (uint64_t uInput, uint_t uBitLength) noexcept
 Reverse the bits in a byte.
 
uint_t count_set_bits (uint32_t uInput) noexcept
 Calculate the number of set bits.
 
uint_t count_set_bits (uint64_t uInput) noexcept
 Calculate the number of set bits.
 
template<class T , class U >
bool operator== (const allocator< T > &, const allocator< U > &) noexcept
 Allocators are always equal.
 
template<class T , class U >
bool operator!= (const allocator< T > &, const allocator< U > &) noexcept
 Allocators are always equal.
 
void * alloc_platform_memory (uintptr_t uSize) noexcept
 Allocate memory from the underlying operating system.
 
void free_platform_memory (const void *pInput) noexcept
 Release memory back to the underlying operating system.
 
void * Alloc (uintptr_t uSize) noexcept
 Allocate memory.
 
void Free (const void *pInput) noexcept
 Release memory.
 
void * Realloc (const void *pInput, uintptr_t uSize) noexcept
 Reallocate previously allocated memory.
 
void * alloc_clear (uintptr_t uSize) noexcept
 Allocate memory that is preinitialized to zero.
 
void * alloc_copy (const void *pInput, uintptr_t uSize) noexcept
 Allocate a buffer and copy data into it.
 
template<class T >
T * New (void) noexcept
 Allocate a class instance.
 
template<class T >
void Delete (const T *pInput) noexcept
 Dispose of a generic class instance.
 
uint32_t translate_from_UTF8 (const char *pInput, const uint8_t pTranslateTable[128][4]) noexcept
 Translate a single UTF8 stream character into a mapped 8 bit char.
 
uintptr_t translate_from_UTF8 (char *pOutput, uintptr_t uOutputSize, const char *pInput, const uint8_t pTranslateTable[128][4]) noexcept
 Convert a UTF8 stream into a ISOLatin1 "C" string.
 
uintptr_t translate_from_UTF8 (char *pOutput, uintptr_t uOutputSize, const char *pInput, uintptr_t uInputSize, const uint8_t pTranslateTable[128][4]) noexcept
 Convert a UTF8 stream into a ISOLatin1 byte array.
 
float16_t convert_to_float16 (float fInput) noexcept
 Convert a 32 bit float into a 16 bit float.
 
float convert_to_float (float16_t uInput) noexcept
 Convert a 16 bit float into a 32 bit float.
 
void separate_integer_fraction (FPLargeInt *pIntegerPart, FPLargeInt *pFractionalPart, const FPInfo *pFPInfo) noexcept
 Separate integer and fractional values from floating point number.
 
ThreadID get_ThreadID (void) noexcept
 Return the ID of the current thread.
 
eThreadPriority get_thread_priority (ThreadID uThreadID) noexcept
 Get the execution priority of a thread.
 
eError set_thread_priority (ThreadID uThreadID, eThreadPriority uThreadPriority) noexcept
 Set the execution priority of a thread.
 
uint32_t tls_new_index (void) noexcept
 Create a unique index for Thread Local Storage.
 
ThreadLocalStorage_ttls_data_get_fallback (void) noexcept
 Scan for Thread Local Storage (Private)
 
eError tls_data_set_fallback (ThreadLocalStorage_t *pInput) noexcept
 Set a Thread Local Storage entry (Private)
 
ThreadLocalStorage_ttls_data_get (void) noexcept
 Get Thread Local Storage.
 
eError tls_data_set (ThreadLocalStorage_t *pInput) noexcept
 Set a Thread Local Storage entry.
 
void * tls_get (uint32_t uIndex) noexcept
 Get thread local storage for current thread.
 
eError tls_set (uint32_t uIndex, const void *pThis, TLSShutdownProc pShutdown=nullptr) noexcept
 Set thread local storage for current thread.
 
void tls_release (void) noexcept
 Release Thread Local Storage for current thread.
 
ForwardLinkreverse_list (ForwardLink *pRoot) noexcept
 Reverse a singly linked list.
 
uint_t calc_adler16 (const void *pInput, uintptr_t uInputLength, uint_t uAdler16=1) noexcept
 Compute the (Mark) Adler-16 checksum.
 
uint32_t calc_adler32 (const void *pInput, uintptr_t uInputLength, uint32_t uAdler32=1) noexcept
 Compute the (Mark) Adler-32 checksum.
 
uint16_t calc_crc16IBM (const void *pInput, uintptr_t uInputLength, uint16_t uCRC=0) noexcept
 Calculate the CRC16-IBM checksum (MP3) for a buffer.
 
void generate_crc_table (uint16_t *pOutput, uint16_t uPolynomial=0x8005U, uint_t bBitReverse=1) noexcept
 Calculate a CRC16 polynomial table.
 
uint32_t calc_crc32b (const void *pInput, uintptr_t uInputLength, uint32_t uCRC=0) noexcept
 Calculate the CRC32B checksum (ZLib) for a buffer.
 
uint32_t calc_crc32 (const void *pInput, uintptr_t uInputLength, uint32_t uCRC=0) noexcept
 Calculate the CRC32 checksum (Ethernet) for a buffer.
 
void generate_crc_table (uint32_t *pOutput, uint32_t uPolynomial=0x04C11DB7U, uint_t bBitReverse=1) noexcept
 Calculate a CRC32 polynomial table.
 
void hash (MD2_t *pOutput, const void *pInput, uintptr_t uLength) noexcept
 Quickly create an MD2 key.
 
void hash (MD4_t *pOutput, const void *pInput, uintptr_t uLength) noexcept
 Quickly create an MD4 key.
 
void hash (MD5_t *pOutput, const void *pInput, uintptr_t uLength) noexcept
 Quickly create an MD5 key.
 
void hash (GOST_t *pOutput, const void *pInput, uintptr_t uLength) noexcept
 Quickly create a GOST key.
 
void generate_GOST_table (uint32_t *pOutput, const uint32_t pSBoxTable[8][16]=GOSTHasher_t::g_TestParmsSBox) noexcept
 Calculate a GOST polynomial table.
 
void hash (SHA1_t *pOutput, const void *pInput, uintptr_t uLength) noexcept
 Quickly create a SHA-1 key.
 
uintptr_t SDBM_hash (const void *pInput, uintptr_t uInputCount, uint32_t uHashSeed=0U) noexcept
 Hash data using the sdbm (Service Data Base Management) algorithm.
 
uintptr_t SDBM_hash_case (const void *pInput, uintptr_t uInputCount, uint32_t uHashSeed=0U) noexcept
 Hash string data using forced lower case with the sdbm (Service Data Base Management) algorithm.
 
uintptr_t DJB2_hash_add (const void *pInput, uintptr_t uInputCount, uint32_t uHashSeed=5381U) noexcept
 Hash data using the djb2 (Daniel Julius Bernstein) algorithm.
 
uintptr_t DJB2_hash_add_case (const void *pInput, uintptr_t uInputCount, uint32_t uHashSeed=5381U) noexcept
 Hash string data using forced lower case using the djb2 (Daniel Julius Bernstein) algorithm.
 
uintptr_t DJB2_hash_xor (const void *pInput, uintptr_t uInputCount, uint32_t uHashSeed=5381U) noexcept
 Hash data using the djb2 (Daniel Julius Bernstein) algorithm.
 
uintptr_t DJB2_hash_xor_case (const void *pInput, uintptr_t uInputCount, uint32_t uHashSeed=5381U) noexcept
 Hash string data using forced lower case using the djb2 (Daniel Julius Bernstein) algorithm.
 
float _swapendianfloat (float fInput) noexcept
 Swap endian of a 32 bit float.
 
double _swapendiandouble (double dInput) noexcept
 Swap endian of a 64 bit float.
 
float _swapendianfloat (const float *pInput) noexcept
 Swap endian of a 32 bit float from a pointer.
 
double _swapendiandouble (const double *pInput) noexcept
 Swap endian of a 64 bit float.
 
uint16_t _load_unaligned (const uint16_t *pInput) noexcept
 Fetch a 16 bit unsigned value from memory with byte alignment.
 
uint32_t _load_unaligned (const uint32_t *pInput) noexcept
 Fetch a 32 bit unsigned value from memory with byte alignment.
 
uint64_t _load_unaligned (const uint64_t *pInput) noexcept
 Fetch a 64 bit unsigned value from memory with byte alignment.
 
float _load_unaligned (const float *pInput) noexcept
 Fetch a float value from memory with byte alignment.
 
double _load_unaligned (const double *pInput) noexcept
 Fetch a double value from memory with byte alignment.
 
void _store_unaligned (uint16_t *pOutput, uint16_t uInput) noexcept
 Store a 16 bit unsigned value to memory with byte alignment.
 
void _store_unaligned (uint32_t *pOutput, uint32_t uInput) noexcept
 Store a 32 bit unsigned value to memory with byte alignment.
 
void _store_unaligned (uint64_t *pOutput, uint64_t uInput) noexcept
 Store a 64 bit unsigned value to memory with byte alignment.
 
void _store_unaligned (float *pOutput, float fInput) noexcept
 Store a float value to memory with byte alignment.
 
void _store_unaligned (double *pOutput, double dInput) noexcept
 Store a double value to memory with byte alignment.
 
uint16_t _load_unaligned_swap (const uint16_t *pInput) noexcept
 Fetch a 16 bit unsigned reverse endian integer from memory with byte alignment.
 
uint32_t _load_unaligned_swap (const uint32_t *pInput) noexcept
 Fetch a 32 bit unsigned reverse endian integer from memory with byte alignment.
 
uint64_t _load_unaligned_swap (const uint64_t *pInput) noexcept
 Fetch a 64 bit unsigned reverse endian integer from memory with byte alignment.
 
float _load_unaligned_swap (const float *pInput) noexcept
 Fetch a 32 bit reverse endian float from memory with byte alignment.
 
double _load_unaligned_swap (const double *pInput) noexcept
 Fetch a 64 bit reverse endian float from memory with byte alignment.
 
void _store_unaligned_swap (uint16_t *pOutput, uint16_t uInput) noexcept
 Store a 16 bit unsigned value with endian swapping to memory with byte alignment.
 
void _store_unaligned_swap (uint32_t *pOutput, uint32_t uInput) noexcept
 Store a 32 bit unsigned value with endian swapping to memory with byte alignment.
 
void _store_unaligned_swap (uint64_t *pOutput, uint64_t uInput) noexcept
 Store a 64 bit unsigned value with endian swapping to memory with byte alignment.
 
void _store_unaligned_swap (float *pOutput, float fInput) noexcept
 Store a float value to memory with endian swapping with byte alignment.
 
void _store_unaligned_swap (double *pOutput, double dInput) noexcept
 Store a double value to memory with endian swapping with byte alignment.
 
void swap_endian (uint16_t *pInput, uintptr_t uElements) noexcept
 Reverse the endian of an array of 16-bit integers.
 
void swap_endian (uint16_t *pOutput, const uint16_t *pInput, uintptr_t uElements) noexcept
 Reverse the endian of a copied array of 16-bit integers.
 
void swap_endian (uint32_t *pInput, uintptr_t uElements) noexcept
 Reverse the endian of an array of 32-bit integers.
 
void swap_endian (uint32_t *pOutput, const uint32_t *pInput, uintptr_t uElements) noexcept
 Reverse the endian of a copied array of 32-bit integers.
 
void swap_endian (uint64_t *pInput, uintptr_t uElements) noexcept
 Reverse the endian of an array of 64-bit integers.
 
void swap_endian (uint64_t *pOutput, const uint64_t *pInput, uintptr_t uElements) noexcept
 Reverse the endian of a copied array of 64-bit integers.
 
void swap_chars_to_bytes (void *pInput, uintptr_t uLength) noexcept
 Add 128 to every byte to convert a char to a byte or vice versa.
 
void swap_chars_to_bytes (void *pOutput, const void *pInput, uintptr_t uLength) noexcept
 Add 128 to every byte to convert a char to a byte or vice versa.
 
e8087Precision get_8087_precision (void) noexcept
 Get the floating point precision.
 
e8087Precision set_8087_precision (e8087Precision uInput) noexcept
 Change the floating point precision.
 
e8087Rounding get_8087_rounding (void) noexcept
 Get the floating point rounding setting.
 
e8087Rounding set_8087_rounding (e8087Rounding uInput) noexcept
 Change the floating point precision.
 
uint32_t set_mxcsr_flags (uint32_t uOrFlags, uint32_t uAndFlags) noexcept
 Change the SSE floating point precision.
 
ePowerPCRounding get_PowerPC_rounding (void)
 Get the floating point rounding setting.
 
ePowerPCRounding set_PowerPC_rounding (ePowerPCRounding uInput)
 Change the floating point precision.
 
float get_sign (float fInput) noexcept
 Return sign constant.
 
double get_sign (double dInput) noexcept
 Return sign constant.
 
constexpr float square (float fInput) noexcept
 Return the square of the input.
 
constexpr double square (double dInput) noexcept
 Return the square of the input.
 
float absolute (float fInput) noexcept
 Get the absolute value of a float.
 
double absolute (double dInput) noexcept
 Get the absolute value of a double.
 
float square_root (float fInput) noexcept
 Get the square root value of a float.
 
double square_root (double dInput) noexcept
 Get the square root value of a double.
 
constexpr float int_to_float (int32_t iInput) noexcept
 32 bit integer to floating point conversion
 
float int_to_float (const int32_t *pInput) noexcept
 32 bit integer to floating point conversion
 
void int_to_float (float *pOutput, int32_t iInput) noexcept
 32 bit integer to floating point conversion
 
constexpr float fixed_to_float (Fixed32 fInput) noexcept
 32 bit 16.16 fixed point integer to floating point conversion
 
float fixed_to_float (const Fixed32 *pInput) noexcept
 32 bit 16.16 fixed point integer to floating point conversion
 
void fixed_to_float (float *pOutput, Fixed32 fInput) noexcept
 32 bit 16.16 fixed point integer to floating point conversion
 
void int_to_float (float *pOutput, const int32_t *pInput) noexcept
 32 bit integer to floating point conversion
 
void fixed_to_float (float *pOutput, const Fixed32 *pInput) noexcept
 32 bit 16.16 fixed point integer to floating point conversion
 
constexpr float interpolate (float fFrom, float fTo, float fFactor) noexcept
 Interpolate between two floating point values.
 
constexpr double interpolate (double dFrom, double dTo, double dFactor) noexcept
 Interpolate between two floating point values.
 
template<typename T >
clamp (T Input, T Min, T Max) noexcept
 Clamp the input between a bounds.
 
uint_t is_NaN (float fInput) noexcept
 Return TRUE if the value is a NaN.
 
uint_t is_NaN (double dInput) noexcept
 Return TRUE if the value is a NaN.
 
uint_t is_infinite (float fInput) noexcept
 Return TRUE if the value is infinity.
 
uint_t is_infinite (double dInput) noexcept
 Return TRUE if the value is infinity.
 
uint_t is_finite (float fInput) noexcept
 Return TRUE if the value is finite.
 
uint_t is_finite (double dInput) noexcept
 Return TRUE if the value is finite.
 
uint_t is_normal (float fInput) noexcept
 Return TRUE if the value is normal.
 
uint_t is_normal (double dInput) noexcept
 Return TRUE if the value is normal.
 
uint_t get_sign_bit (float fInput) noexcept
 Return TRUE if the value is negative.
 
uint_t get_sign_bit (double dInput) noexcept
 Return TRUE if the value is negative.
 
uint_t equal_with_epsilon (float fInput1, float fInput2) noexcept
 Return TRUE if the values are less than epsilon apart.
 
uint_t equal_with_epsilon (double dInput1, double dInput2) noexcept
 Return TRUE if the values are less than epsilon apart.
 
uint_t equal_with_epsilon (float fInput1, float fInput2, float fEpsilon) noexcept
 Return TRUE if the values are less than epsilon apart.
 
uint_t equal_with_epsilon (double dInput1, double dInput2, double dEpsilon) noexcept
 Return TRUE if the values are less than epsilon apart.
 
float get_floor (float fInput) noexcept
 Return a floating point number with the fraction removed.
 
double get_floor (double dInput) noexcept
 Return a floating point number with the fraction removed.
 
float get_ceiling (float fInput) noexcept
 Return a floating point number rounded up.
 
double get_ceiling (double dInput) noexcept
 Return a floating point number rounded up.
 
float get_round (float fInput) noexcept
 Return a floating point number rounded to the nearest integer.
 
double get_round (double dInput) noexcept
 Return a floating point number rounded to the nearest integer.
 
float round_to_zero (float fInput) noexcept
 Return a floating point number rounded to zero.
 
double round_to_zero (double dInput) noexcept
 Return a floating point number rounded to zero.
 
float modulo_radians (float fInput) noexcept
 Modulo the range of the input so that -BURGER_PI <= fInput < BURGER_PI.
 
double modulo_radians (double dInput) noexcept
 Modulo the range of the input so that -BURGER_PI <= fInput < BURGER_PI.
 
float sine_387 (float fInput) noexcept
 Return the sine from radians.
 
double sine_387 (double fInput) noexcept
 Return the sine from radians.
 
float cosine_387 (float fInput) noexcept
 Return the cosine from radians.
 
double cosine_387 (double fInput) noexcept
 Return the cosine from radians.
 
float get_sine_3_digits (float fInput) noexcept
 Return the sine from radians accurate to +-0.000597239.
 
float get_cosine_3_digits (float fInput) noexcept
 Return the cosine from radians accurate to +-0.000597239.
 
float get_sine_5_digits (float fInput) noexcept
 Return the sine from radians accurate to +-7.49199e-06.
 
float get_cosine_5_digits (float fInput) noexcept
 Return the cosine from radians accurate to +- 7.49199e-06.
 
float get_sine_6_digits (float fInput) noexcept
 Return the sine from radians accurate to +-1.03892e-06.
 
float get_cosine_6_digits (float fInput) noexcept
 Return the cosine from radians accurate to +-1.1407e-06.
 
float get_sine (float fInput) noexcept
 Return the sine from radians.
 
float get_cosine (float fInput) noexcept
 Return the cosine from radians.
 
double get_sine_7_digits (double dInput) noexcept
 Return the sine from radians accurate to +-2.05542e-06.
 
double get_cosine_7_digits (double dInput) noexcept
 Return the cosine from radians accurate to +-2.05542e-06.
 
double get_sine_12_digits (double dInput) noexcept
 Return the sine from radians accurate to +-7.48669e-13.
 
double get_cosine_12_digits (double dInput) noexcept
 Return the cosine from radians accurate to +-7.48669e-13.
 
double get_sine_18_digits (double dInput) noexcept
 Return the sine from radians.
 
double get_cosine_18_digits (double dInput) noexcept
 Return the cosine from radians.
 
double get_sine (double dInput) noexcept
 Return the sine from radians accurate to +-1.16573e-15.
 
double get_cosine (double dInput) noexcept
 Return the cosine from radians accurate to +-1.34615e-15.
 
float get_tangent (float fInput) noexcept
 
double get_tangent (double dInput) noexcept
 
float get_arcsine (float fInput) noexcept
 
double get_arcsine (double dInput) noexcept
 
float get_arccosine (float fInput) noexcept
 
double get_arccosine (double dInput) noexcept
 
float get_arctangent (float fInput) noexcept
 
double get_arctangent (double dInput) noexcept
 
float get_arctangent2 (float fSin, float fCos) noexcept
 
double get_arctangent2 (double dSin, double dCos) noexcept
 
float get_power (float fX, float fY) noexcept
 
double get_power (double dX, double dY) noexcept
 
float get_exponent (float fInput) noexcept
 
double get_exponent (double dInput) noexcept
 
float get_logarithm (float fInput) noexcept
 
double get_logarithm (double dInput) noexcept
 
float get_logarithm2 (float fInput) noexcept
 
double get_logarithm2 (double dInput) noexcept
 
float get_logarithm10 (float fInput) noexcept
 
double get_logarithm10 (double dInput) noexcept
 
float get_fraction (float fInput, float *pInteger) noexcept
 
double get_fraction (double dInput, double *pInteger) noexcept
 
float get_modulo (float fInput, float fDivisor) noexcept
 
double get_modulo (double dInput, double dDivisor) noexcept
 
double little_endian_load_extended (const Float80Bit pInput) noexcept
 Load a little endian 80 bit float as a double.
 
double big_endian_load_extended (const Float80Bit pInput) noexcept
 Load a big endian 80 bit float as a double.
 
long convert_to_DirectSound_volume (uint_t uInput) noexcept
 Convert a linear volume to decibels.
 
long convert_to_DirectSound_volume (float fInput) noexcept
 Convert a linear volume to decibels.
 
long convert_to_DirectSound_pan (uint_t uInput) noexcept
 Convert a linear pan to decibels.
 
long convert_to_DirectSound_pan (float fInput) noexcept
 Convert a linear pan to decibels.
 
float convert_to_AudioUnit_volume (uint_t uInput) noexcept
 Convert a linear volume to 0.0f to 1.0f.
 
float convert_to_AudioUnit_pan (uint_t uInput) noexcept
 Convert a linear pan to 0.0f to 1.0f.
 
float decibels_to_amplitude_ratio (float fDecibels) noexcept
 Convert a DirectSound decibel value to an XAudio2 Amplitude multiplier.
 
float amplitude_ratio_to_decibels (float fVolume) noexcept
 Convert a XAudio2 Amplitude multiplier to a DirectSound decibel value.
 
uint_t get_low_word (uint32_t uInput) noexcept
 Retrieves the low-order word from the specified value.
 
uint_t get_high_word (uint32_t uInput) noexcept
 Retrieves the low-order word from the specified value.
 
Fixed32 int_to_fixed (int32_t iInput) noexcept
 Convert an int32_t into a Fixed32 value.
 
Fixed32 int_to_fixed_saturate (int32_t iInput) noexcept
 Convert an int32_t into a Fixed32 value with saturation.
 
int32_t fixed_to_int_floor (Fixed32 fInput) noexcept
 Convert a fixed point value to an integer using round down.
 
int32_t fixed_to_int (Fixed32 fInput) noexcept
 Convert a fixed point value to an integer using round to zero.
 
int32_t fixed_to_int_ceil (Fixed32 fInput) noexcept
 Convert a fixed point value to an integer using round up.
 
int32_t fixed_to_int_nearest (Fixed32 fInput) noexcept
 Convert a fixed point value to an integer using round to nearest.
 
int32_t float_to_int_floor (float fInput) noexcept
 Convert a 32 bit float to an integer using floor().
 
void float_to_int_floor (int32_t *pOutput, float fInput) noexcept
 Convert a 32 bit float to an integer using floor().
 
int32_t float_to_int_ceil (float fInput) noexcept
 Convert a 32 bit float to an integer using ceil().
 
void float_to_int_ceil (int32_t *pOutput, float fInput) noexcept
 Convert a 32 bit float to an integer using ceil().
 
int32_t float_to_int_round (float fInput) noexcept
 Convert a 32 bit float to an integer using round to nearest.
 
void float_to_int_round (int32_t *pOutput, float fInput) noexcept
 Convert a 32 bit float to an integer using round to nearest.
 
int32_t float_to_int_round_to_zero (float fInput) noexcept
 Convert a 32 bit float to an integer using round to zero.
 
void float_to_int_round_to_zero (int32_t *pOutput, float fInput) noexcept
 Convert a 32 bit float to an integer using round to zero.
 
Fixed32 float_to_fixed_floor (float fInput) noexcept
 Convert a 32 bit float to a Fixed32 using floor().
 
void float_to_fixed_floor (Fixed32 *pOutput, float fInput) noexcept
 Convert a 32 bit float to a Fixed32 using floor().
 
Fixed32 float_to_fixed_ceil (float fInput) noexcept
 Convert a 32 bit float to a Fixed32 using ceil().
 
void float_to_fixed_ceil (Fixed32 *pOutput, float fInput) noexcept
 Convert a 32 bit float to a Fixed32 using ceil().
 
Fixed32 float_to_fixed_round (float fInput) noexcept
 Convert a 32 bit float to a Fixed32 using round to nearest.
 
void float_to_fixed_round (Fixed32 *pOutput, float fInput) noexcept
 Convert a 32 bit float to a Fixed32 using round to nearest.
 
Fixed32 float_to_fixed_round_to_zero (float fInput) noexcept
 Convert a 32 bit float to a Fixed32 using round to zero.
 
void float_to_fixed_round_to_zero (Fixed32 *pOutput, float fInput) noexcept
 Convert a 32 bit float to a Fixed32 using round to zero.
 
int8_t absolute (int8_t iInput)
 Get the absolute value of an integer.
 
int16_t absolute (int16_t iInput) noexcept
 Get the absolute value of an integer.
 
int32_t absolute (int32_t iInput) noexcept
 Get the absolute value of an integer.
 
int64_t absolute (int64_t iInput) noexcept
 Get the absolute value of a 64 bit integer.
 
int8_t ClampZero (int8_t iInput) noexcept
 Clamp an integer to 0.
 
int16_t ClampZero (int16_t iInput) noexcept
 Clamp an integer to 0.
 
int32_t ClampZero (int32_t iInput) noexcept
 Clamp an integer to 0.
 
int64_t ClampZero (int64_t iInput) noexcept
 Clamp an integer to 0.
 
constexpr int8_t get_sign (int8_t iInput) noexcept
 Get the sign value of an integer.
 
constexpr int16_t get_sign (int16_t iInput) noexcept
 Get the sign value of an integer.
 
constexpr int32_t get_sign (int32_t iInput) noexcept
 Get the sign value of an integer.
 
constexpr int64_t get_sign (int64_t iInput) noexcept
 Get the sign value of a 64 bit integer.
 
Fixed32 FixedMultiply (Fixed32 fInput1, Fixed32 fInput2)
 Multiply two 16.16 fixed point numbers.
 
Fixed32 FixedDivide (Fixed32 fInputNumerator, Fixed32 fInputDenominator)
 Divide two 16.16 fixed point numbers.
 
Fixed32 FixedReciprocal (Fixed32 fInput)
 Return the reciprocal of a fixed point number.
 
uint32_t square_root (uint32_t uInput)
 Get the square root of an integer.
 
uint32_t SqrtFixedToWord32 (Fixed32 fInput)
 Get the square root of a Fixed32.
 
Fixed32 square_root (Fixed32 uInput)
 Get the square root of a Fixed32.
 
uint32_t RotateLeft (uint32_t uInput, uint_t uShiftCount) noexcept
 Rotate the bits left.
 
uint32_t RotateRight (uint32_t uInput, uint_t uShiftCount) noexcept
 Rotate the bits right.
 
uint64_t RotateLeft (uint64_t uInput, uint_t uShiftCount) noexcept
 Rotate the bits left.
 
uint64_t RotateRight (uint64_t uInput, uint_t uShiftCount) noexcept
 Rotate the bits right.
 
void MemoryCopy (void *pOutput, const void *pInput, uintptr_t uCount) noexcept
 Copy raw memory from one buffer to another.
 
void MemoryMove (void *pOutput, const void *pInput, uintptr_t uCount) noexcept
 Copy raw memory from one buffer to another in any direction.
 
void MemoryClear (void *pOutput, uintptr_t uCount) noexcept
 Set a buffer to all zeros.
 
void MemoryFill (void *pOutput, uint8_t uFill, uintptr_t uCount) noexcept
 Set a buffer to a specific value.
 
void MemoryNot (void *pOutput, uintptr_t uCount) noexcept
 Exclusive or a buffer with 0xFF.
 
void MemoryNot (void *pOutput, const void *pInput, uintptr_t uCount) noexcept
 Copy a buffer that's been exclusive or'd with 0xFF.
 
void MemoryXor (void *pOutput, uint8_t uXor, uintptr_t uCount) noexcept
 Exclusive or a buffer with a value.
 
void MemoryXor (void *pOutput, const void *pInput, uint8_t uXor, uintptr_t uCount) noexcept
 Exclusive or a buffer with a value and store the result in another buffer.
 
void MemoryXor (void *pOutput, const void *pInput, uintptr_t uCount) noexcept
 Exclusive or a buffer with another buffer.
 
void MemoryXor (void *pOutput, const void *pInput1, const void *pInput2, uintptr_t uCount) noexcept
 Exclusive or a buffer with another buffer and store the result in a third buffer.
 
int MemoryCompare (const void *pInput1, const void *pInput2, uintptr_t uCount) noexcept
 Compare two byte buffers for equality.
 
int MemoryCaseCompare (const void *pInput1, const void *pInput2, uintptr_t uCount) noexcept
 Compare two byte buffers for equality, case insensitive.
 
char * MemoryCharacter (const char *pInput, uintptr_t uInputSize, int iChar) noexcept
 Scan for the first occurrence of a specific character in a byte array.
 
uint16_t * MemoryCharacter (const uint16_t *pInput, uintptr_t uInputSize, uint_t uChar) noexcept
 Scan for the first occurrence of a specific character in a short array.
 
char * MemoryCharacterReverse (const char *pInput, uintptr_t uInputSize, int iChar) noexcept
 Scan for the last occurrence of a specific character in a buffer.
 
uint16_t * MemoryCharacterReverse (const uint16_t *pInput, uintptr_t uInputSize, uint_t uChar) noexcept
 Scan for the last occurrence of a specific character in a uint16_t buffer.
 
void OkAlertMessage (const char *pMessage, const char *pTitle=nullptr) noexcept
 Display a dialog box.
 
uint_t OkCancelAlertMessage (const char *pMessage, const char *pTitle=nullptr) noexcept
 Display a dialog to alert the user of a possible error condition or message.
 
uint_t is_debugger_present (void) noexcept
 Detect if a debugger is attached.
 
uint_t is_macsbug_installed (void) noexcept
 Test if macsbug is installed.
 
uint_t is_metronub_installed (void) noexcept
 Test if Metrowerks Metronub is installed.
 
void InitFileInfo (FileInfo *pFileInfo) noexcept
 Initialize a Mac Finder FileInfo.
 
void InitFSRefParam (FSRefParam *pFSRefParam, FSRef *pFSRef, uint32_t uCatInfoBitmap) noexcept
 Initialize a Mac FSRefParam.
 
int GetFilenameFromPathname (uint8_t *pOutput, const uint8_t *pInput) noexcept
 Extract a filename at the end of a MacOS path.
 
int GetFileLocation (short *pVRefNum, long *pDirID, uint8_t *pOutputFilename, short iFileRefNum) noexcept
 Find a file location from a file reference number.
 
int GetFileLocation (FSSpec *pOutput, short iFileRefNum) noexcept
 Find the FSSpec from a file reference number.
 
int GetFileLocation (FSRef *pOutput, short iFileRefNum) noexcept
 Use an open file reference to return the FSRef.
 
int CreateEmptyFile (short svRefNum, long lDirID, const uint8_t *pFilename) noexcept
 Call PBHCreateSync() to create a file.
 
int CreateEmptyFile (const FSSpec *pFSSpec) noexcept
 Call FSpCreate() to create a file.
 
int CreateEmptyFile (FSRef *pOutput, const FSRef *pFSSpec, const char *pName) noexcept
 Call PBCreateFileUnicodeSync() to create a file.
 
int CheckForForks (short svRefNum, long lDirID, const uint8_t *pName, uint_t *pbDataFork, uint_t *pbResourceFork) noexcept
 Test if a file has either a resource or data fork.
 
int CheckForForks (const FSSpec *pFSSpec, uint_t *pbDataFork, uint_t *pbResourceFork) noexcept
 Test if a file has either a resource or data fork.
 
int CheckForForks (const FSRef *pFSRef, uint_t *pbDataFork, uint_t *pbResourceFork) noexcept
 Test if a file has either a resource or data fork.
 
int DoCopyFile (short svRefNumDest, long lDirIDDest, const uint8_t *pFilenameDest, short svRefNumSource, long lDirIDSource, const uint8_t *pFilenameSource) noexcept
 Copy a file using PBHCopyFileSync()
 
int DoCopyFile (const FSSpec *pFSDest, const FSSpec *pFSSource) noexcept
 Copy a file using PBHCopyFileSync()
 
int CopyForkClassic (short iDestRefNum, short iSourceRefNum, uint8_t *pBuffer, uintptr_t uBufferSize) noexcept
 Copy a fork of a file using FSSpec APIs.
 
int CopyForkCarbon (short iDestRefNum, short iSourceRefNum, uint8_t *pBuffer, uintptr_t uBufferSize) noexcept
 Copy a fork of a file using FSRef APIs.
 
int CopyFileMgrAttributes (short svRefNumDest, long lDirIDDest, const uint8_t *pFilenameDest, short svRefNumSource, long lDirIDSource, const uint8_t *pFilenameSource, uint_t bCopyLockBit=1) noexcept
 Copy file manager metadata from one file to another.
 
int CopyFileMgrAttributes (const FSSpec *pDestSpec, const FSSpec *pSourceSpec, uint_t bCopyLockBit=1) noexcept
 Copy file manager metadata from one file to another.
 
int CopyFileMgrAttributes (const FSRef *pDestRef, const FSRef *pSourceRef, uint_t bCopyLockBit=1) noexcept
 Copy file manager metadata from one file to another.
 
int DoPBXGetVolInfoSync (XVolumeParam *pXVolumeParam) noexcept
 Call PBXGetVolInfoSync() on all targets.
 
int GetVolumeInfo (HParamBlockRec *pOutput, short sVRefNum) noexcept
 Obtain information about a volume.
 
int GetVolumeInfo (XVolumeParam *pOutput, short svRefNum) noexcept
 Obtain information about an extended volume.
 
int DetermineVRefNum (short *pOutput, short svRefNum) noexcept
 Find the real volume reference number.
 
int CheckVolLock (short svRefNum) noexcept
 Check if a volume is locked.
 
int DoGetCatInfo (CInfoPBRec *pOutput, uint8_t pOutputName[256], short sVRefNum, long lDirID, const uint8_t *pName) noexcept
 Call PBGetCatInfoSync() quickly.
 
int DoGetCatInfo (CInfoPBRec *pOutput, uint8_t pOutputName[256], const FSSpec *pFSSpec) noexcept
 Call PBGetCatInfoSync() quickly.
 
int DoGetCatInfo (FSCatalogInfo *pOutput, FSRefParam *pRefParam, const FSRef *pFSRef, uint32_t uCatInfoBitmap) noexcept
 Call PBGetCatalogInfoSync() quickly.
 
int DoGetCatInfo (CInfoPBRec *pOutput, short sVRefNum, long lDirID, const uint8_t *pName) noexcept
 Call PBGetCatInfoSync() quickly.
 
int DoGetCatInfo (CInfoPBRec *pOutput, const FSSpec *pFSSpec) noexcept
 Call PBGetCatInfoSync() quickly.
 
int DoGetCatInfo (FSCatalogInfo *pOutput, const FSRef *pFSRef, uint32_t uCatInfoBitmap) noexcept
 Call PBGetCatalogInfoSync() quickly.
 
int GetDirectoryInfo (DInfo *pFinderInfo, short sVRefNum, long lDirID, const uint8_t *pName) noexcept
 Get Finder DInfo for a directory.
 
int GetDirectoryInfo (DInfo *pFinderInfo, const FSSpec *pFSSpec) noexcept
 Get Finder DInfo for a directory using a FSSpec.
 
int GetDirectoryInfo (DInfo *pFinderInfo, const FSRef *pFSRef) noexcept
 Get Finder DInfo for a directory using a FSRef.
 
int GetDestinationDirectoryInfo (short sVRefNum, long lDirID, const uint8_t *pName, long *pDirID, uint_t *pbDirectory, uint_t *pbDropBox) noexcept
 Get common information from a directory.
 
int GetDestinationDirectoryInfo (const FSSpec *pFSSpec, long *pDirID, uint_t *pbDirectory, uint_t *pbDropBox) noexcept
 Get common information from a directory.
 
int GetDestinationDirectoryInfo (const FSRef *pFSRef, long *pDirID, uint_t *pbDirectory, uint_t *pbDropBox) noexcept
 Get common information from a directory.
 
int GetCommentID (short *pCommentID, short sVRefNum, long lDirID, const uint8_t *pName) noexcept
 Get finder comment ID.
 
int GetCommentID (short *pCommentID, const FSSpec *pFSSpec) noexcept
 Get finder comment ID.
 
int GetCommentID (short *pCommentID, const FSRef *pFSRef) noexcept
 Get finder comment ID.
 
int GetDirectoryID (short sVRefNum, long lDirID, const uint8_t *pName, long *pDirID, uint_t *pbDirectory) noexcept
 Get directory ID of a named directory.
 
int GetDirectoryID (const FSSpec *pFSSpec, long *pDirID, uint_t *pbDirectory) noexcept
 Get directory ID of a named directory.
 
int GetDesktopFileName (uint8_t *pDesktopName, short svRefNum) noexcept
 Determine the name of the Finder Desktop Database.
 
int GetCommentFromDesktopFile (char *pComment, short svRefNum, long lDirID, const uint8_t *pFileName) noexcept
 Load in a comment from a Desktop resource file.
 
int DesktopOpen (const uint8_t *pVolumeName, short vRefNum, short *pRefNum, uint_t *pbDatabaseCreated) noexcept
 Open the desktop manager database.
 
int DesktopGetComment (char *pOutput, short svRefNum, long lDirID, const uint8_t *pFilename) noexcept
 Get a comment from the Desktop Manager.
 
int DesktopSetComment (short svRefNum, long lDirID, const uint8_t *pFilename, const char *pComment) noexcept
 Get a comment from the Desktop Manager.
 
int DesktopCopyComment (short svRefNumDest, long lDirIDDest, const uint8_t *pFilenameDest, short svRefNumSource, long lDirIDSource, const uint8_t *pFilenameSource) noexcept
 Copy a comment from one file to another.
 
int DesktopCopyComment (const FSSpec *pFSSpecDest, const FSSpec *pFSSpecSource) noexcept
 Copy a comment from one file to another.
 
int DesktopCopyComment (const FSRef *pFSRefDest, const FSRef *pFSRefSource) noexcept
 Copy a comment from one file to another.
 
int PreflightFileCopySpace (short svRefNumSource, long lDirIDSource, const uint8_t *pFilenameSource, const uint8_t *pVolumenameDest, short svRefNumDest, uint_t *pbSpaceAvailable) noexcept
 Determine if a destination volume has free file space.
 
int OpenAware (short svRefNum, long lDirID, const uint8_t *pFilename, short sDenyModes, short *pRefNum) noexcept
 Open a file with OpenDeny modes.
 
int OpenAware (const FSSpec *pFSSpec, short sDenyModes, short *pRefNum) noexcept
 Open a file with OpenDeny modes.
 
int OpenRFAware (short svRefNum, long lDirID, const uint8_t *pFilename, short sDenyModes, short *pRefNum) noexcept
 Open a resource fork with OpenDeny modes.
 
int OpenRFAware (const FSSpec *pFSSpec, short sDenyModes, short *pRefNum) noexcept
 Open a resource fork with OpenDeny modes.
 
int FileCopy (short svRefNumSource, long lDirIDSource, const uint8_t *pFilenameSource, short svRefNumDest, long lDirIDDest, const uint8_t *pFilenameDest, const uint8_t *pCopyname, void *pBuffer, uintptr_t uBufferSize, uint_t bPreflight) noexcept
 Copy a file, with AppleShare awareness.
 
int FileCopy (const FSSpec *pFSSpecSource, const FSSpec *pFSSpecDestFolder, const uint8_t *pCopyname, void *pBuffer, uintptr_t uBufferSize, uint_t bPreflight) noexcept
 Copy a file, with AppleShare awareness.
 
CodeLibraryGetInterfaceLib (void) noexcept
 Load InterfaceLib for manual linking.
 
CodeLibraryGetDriverLoaderLib (void) noexcept
 Load DriverLoaderLib for manual linking.
 
CodeLibraryGetNameRegistryLib (void) noexcept
 Load NameRegistryLib for manual linking.
 
void PrintHexDigit (uint_t uInput) noexcept
 Print a hex character to standard out.
 
void PrintHex (uint8_t uInput) noexcept
 Print an 8 bit value in hex to standard out.
 
void PrintHex (uint16_t uInput) noexcept
 Print a 16 bit value in hex to standard out.
 
void PrintHex (uint32_t uInput) noexcept
 Print a 32 bit value in hex to standard out.
 
void PrintHex (uint64_t uInput) noexcept
 Print a 64 bit value in hex to standard out.
 
void PrintHex (char iInput) noexcept
 Print a char in hex to standard out.
 
void PrintHex (signed char iInput) noexcept
 Print a signed char in hex to standard out.
 
void PrintHex (short iInput) noexcept
 Print a short in hex to standard out.
 
void PrintHex (int iInput) noexcept
 Print an integer in hex to standard out.
 
void PrintHex (long iInput) noexcept
 Print a long integer in hex to standard out.
 
void PrintHex (long long iInput) noexcept
 Print a long long integer in hex to standard out.
 
void PrintHex (wchar_t uInput) noexcept
 Print a wchar_t in hex to standard out.
 
void PrintHex (unsigned int uInput) noexcept
 Print an unsigned integer in hex to standard out.
 
void PrintHex (unsigned long uInput) noexcept
 Print an unsigned long integer in hex to standard out.
 
void PrintHex (float fInput) noexcept
 Print a 32 bit floating pointer number in hex to standard out.
 
void PrintHex (double dInput) noexcept
 Print a 64 bit floating point number in hex to standard out.
 
void ClearConsole (void) noexcept
 Clear the text console.
 
uint_t has_CPUID (void) noexcept
 Return TRUE if the instruction CPUID is present.
 
void CPUID (CPUID_t *pOutput) noexcept
 Fill in a CPUID_t structure.
 
uint_t has_AltiVec (void) noexcept
 Return TRUE if the AltiVec instruction set is present.
 
uint_t has_PPC_fsqrt (void) noexcept
 Return TRUE if floating point sqrt is supported in hardware.
 
uint_t has_68kFPU (void) noexcept
 Return TRUE if floating point is supported in hardware.
 
uint_t atomic_compare_and_set (volatile uint32_t *pOutput, uint32_t uOld, uint32_t uNew) noexcept
 Atomically swaps a 32 bit value for one in memory.
 
uint32_t atomic_set (volatile uint32_t *pOutput, uint32_t uInput) noexcept
 Atomically sets a 32 bit value to memory.
 
uint32_t atomic_get (volatile uint32_t *pInput) noexcept
 Atomically gets a 32 bit value from memory.
 
uint32_t atomic_add (volatile uint32_t *pOutput, uint32_t uInput) noexcept
 Atomically add a 32 bit value to a variable in memory.
 
uint_t atomic_trylock (volatile uint32_t *pInput) noexcept
 Attempt to lock a spin lock.
 
void atomic_lock (volatile uint32_t *pInput) noexcept
 Lock a spin lock.
 
void atomic_unlock (volatile uint32_t *pInput) noexcept
 Unlock a spin lock.
 
uint_t atomic_compare_and_set (volatile uint64_t *pOutput, uint64_t uOld, uint64_t uNew) noexcept
 Atomically swaps a 64 bit value for one in memory.
 
uint64_t atomic_set (volatile uint64_t *pOutput, uint64_t uInput) noexcept
 Atomically sets a 64 bit value for one in memory.
 
uint64_t atomic_get (volatile uint64_t *pInput) noexcept
 Atomically gets a 64 bit value from memory.
 
uint64_t atomic_add (volatile uint64_t *pOutput, uint64_t uInput) noexcept
 Atomically add a 64 bit value to a variable in memory.
 
uint32_t AsciiToInteger (const char *pInput, const char **pDest=nullptr) noexcept
 Convert an ASCII string into an integer.
 
int_t AsciiToInteger (const char *pInput, int_t iDefault, int_t iMin=INT32_MIN, int_t iMax=INT32_MAX) noexcept
 Return a signed integer value.
 
uint_t AsciiToInteger (uint32_t *pOutput, const char *pInput) noexcept
 Convert a 32 bit integer and signal if successful.
 
uint_t AsciiToWord (const char *pInput, uint_t uDefault, uint_t uMin=0, uint_t uMax=0xFFFFFFFFU) noexcept
 Return an unsigned integer value.
 
uint64_t AsciiToInteger64 (const char *pInput, const char **pDest=nullptr) noexcept
 Convert an ASCII string into a 64 bit integer.
 
int64_t AsciiToInteger64 (const char *pInput, int64_t iDefault, int64_t iMin=INT64_MIN, int64_t iMax=INT64_MAX) noexcept
 Return a signed integer value.
 
uint_t AsciiToInteger64 (uint64_t *pOutput, const char *pInput) noexcept
 Convert a 64 bit integer and signal if successful.
 
uint64_t AsciiToWord64 (const char *pInput, uint64_t uDefault, uint64_t uMin=0, uint64_t uMax=0xFFFFFFFFFFFFFFFFULL) noexcept
 Return an unsigned integer value.
 
float AsciiToFloat (const char *pInput, const char **pDest=nullptr) noexcept
 Convert an ASCII string into a floating point number.
 
double AsciiToDouble (const char *pInput, const char **pDest=nullptr) noexcept
 Convert an ASCII string into a floating point number.
 
uint_t AsciiToBoolean (const char *pInput, const char **pDest=nullptr) noexcept
 Convert an ASCII string into a boolean.
 
uint_t AsciiToBoolean (const char *pInput, uint_t bDefault) noexcept
 Convert an ASCII string into a boolean.
 
uint_t AsciiToBoolean (uint_t *pOutput, const char *pInput) noexcept
 Convert an ASCII string into a boolean and signal if successful.
 
float AsciiToFloat (const char *pInput, float fDefault) noexcept
 Return a floating point value.
 
float AsciiToFloat (const char *pInput, float fDefault, float fMin, float fMax) noexcept
 Return a floating point value.
 
uint_t AsciiToFloat (float *pOutput, const char *pInput) noexcept
 Return a floating point value and signal if successful.
 
double AsciiToDouble (const char *pInput, double dDefault) noexcept
 Return a 64 bit floating point value.
 
double AsciiToDouble (const char *pInput, double dDefault, double dMin, double dMax) noexcept
 Return a 64 bit floating point value.
 
uint_t AsciiToDouble (double *pOutput, const char *pInput) noexcept
 Return a 64 bit floating point value and signal if successful.
 
uint32_t AsciiHexToInteger (const char *pInput, uintptr_t uLength) noexcept
 Convert hex ASCII string to an integer.
 
uint32_t AsciiHexToInteger (const uint16_t *pInput, uintptr_t uLength) noexcept
 Convert hex UTF-16 string to an integer.
 
char * NumberToAsciiHex (char *pOutput, uint8_t uInput) noexcept
 Convert an 8 bit value into a hex string.
 
char * NumberToAsciiHex (char *pOutput, uint16_t uInput) noexcept
 Convert a 16 bit value into a hex string.
 
char * NumberToAsciiHex (char *pOutput, uint32_t uInput) noexcept
 Convert a 32 bit value into a hex string.
 
char * NumberToAsciiHex (char *pOutput, uint64_t uInput) noexcept
 Convert a 64 bit value into a hex string.
 
char * NumberToAsciiHex (char *pOutput, float fInput) noexcept
 Convert a 32 bit floating point value into a hex string.
 
char * NumberToAsciiHex (char *pOutput, double dInput) noexcept
 Convert a 64 bit floating point value into a hex string.
 
template<class T >
char * NumberToAsciiHex (char *pOutput, T input) noexcept
 Convert a integral value into a hex string.
 
char * NumberToAsciiHex (char *pOutput, uint32_t uInput, uint_t uDigits) noexcept
 Convert an unsigned 32 bit integer into hexadecimal ASCII.
 
char * NumberToAsciiHex (char *pOutput, uint64_t uInput, uint_t uDigits) noexcept
 Convert an unsigned 64 bit integer into hexadecimal ASCII.
 
char * NumberToAsciiHex (char *pOutput, float fInput, uint_t uDigits) noexcept
 Convert a 32 bit float into hexadecimal ASCII.
 
char * NumberToAsciiHex (char *pOutput, double dInput, uint_t uDigits) noexcept
 Convert a 64 bit float into hexadecimal ASCII.
 
char * NumberToAsciiHex (char *pOutput, uint8_t uInput, uint_t uDigits) noexcept
 
char * NumberToAsciiHex (char *pOutput, uint16_t uInput, uint_t uDigits) noexcept
 
template<class T >
char * NumberToAsciiHex (char *pOutput, T input, uint_t uDigits) noexcept
 Convert a integral value into a hex string.
 
char * NumberToAscii (char *pOutput, uint32_t uInput, uint_t uDigits) noexcept
 Convert an unsigned 32 bit integer into ASCII.
 
char * NumberToAscii (char *pOutput, int32_t iInput, uint_t uDigits) noexcept
 Convert a signed 32 bit integer into ASCII.
 
char * NumberToAscii (char *pOutput, uint64_t uInput, uint_t uDigits) noexcept
 Convert an unsigned 64 bit integer into ASCII.
 
char * NumberToAscii (char *pOutput, int64_t iInput, uint_t uDigits) noexcept
 Convert a signed 64 bit integer into ASCII.
 
char * NumberToAscii (char *pOutput, float fInput, uint_t uDigits=0) noexcept
 Convert a 32 bit float into ASCII.
 
char * NumberToAscii (char *pOutput, double dInput, uint_t uDigits=0) noexcept
 Convert a 64 bit float into ASCII.
 
template<class T >
char * NumberToAscii (char *pOutput, T input) noexcept
 
template<class T >
char * NumberToAscii (char *pOutput, T input, uint_t uDigits) noexcept
 
uint_t NumberStringLength (uint32_t uInput) noexcept
 Calculate the length of a string that represents this integer.
 
uint_t NumberStringLength (int32_t iInput) noexcept
 Calculate the length of a string that represents this integer.
 
uint_t NumberStringLength (uint64_t uInput) noexcept
 Calculate the length of a string that represents this integer.
 
uint_t NumberStringLength (int64_t iInput) noexcept
 Calculate the length of a string that represents this integer.
 
template<class T >
uint_t NumberStringLength (T input) noexcept
 Calculate the length of a string that represents this integer.
 
uint_t NumberHexStringLength (uint32_t uInput) noexcept
 Calculate the length of a string that represents this hex integer.
 
uint_t NumberHexStringLength (uint64_t uInput) noexcept
 Calculate the length of a string that represents this hex integer.
 
template<class T >
uint_t NumberHexStringLength (T input) noexcept
 Calculate the length of a string that represents this hex integer.
 
uint_t NumberOctalStringLength (uint32_t uInput) noexcept
 Calculate the length of a string that represents this octal integer.
 
uint_t NumberOctalStringLength (uint64_t uInput) noexcept
 Calculate the length of a string that represents this octal integer.
 
template<class T >
uint_t NumberOctalStringLength (T input) noexcept
 Calculate the length of a string that represents this octal integer.
 
constexpr uint32_t ToLower (uint32_t uInput) noexcept
 Convert a character to lower case.
 
constexpr uint32_t ToUpper (uint32_t uInput) noexcept
 Convert a character to upper case.
 
uint_t IsPointerInvalid (const void *pInput) noexcept
 Test if a pointer is invalid.
 
uint_t IsPointerValid (const void *pInput) noexcept
 Test if a pointer is valid.
 
uint_t IsStringEmpty (const char *pInput) noexcept
 Test if a UTF-8 string pointer points to a nullptr string.
 
uint_t IsStringEmpty (const uint16_t *pInput) noexcept
 Test if a UTF-16 string pointer points to a nullptr string.
 
uint_t IsDigit (char iInput) noexcept
 Test if a character is 0-9.
 
uint_t IsHex (char iInput) noexcept
 Test if a character is 0-9, A-F or a-f.
 
uint_t IsWhitespace (char iInput) noexcept
 Test if a character is TAB or SPACE.
 
uint_t IsLowercase (char iInput) noexcept
 Test if a character is a-z.
 
uint_t IsUppercase (char iInput) noexcept
 Test if a character is A-Z.
 
uint_t IsSpace (int iInput) noexcept
 Test if a character is ASCII white space.
 
void CStringToPString (uint8_t *pOutput, const char *pInput) noexcept
 Convert a "C" string into a Pascal string.
 
void PStringToCString (char *pOutput, const uint8_t *pInput) noexcept
 Convert a Pascal string into a "C" string.
 
char * ParseBeyondWhiteSpace (const char *pInput) noexcept
 Parse a "C" string until a non-white space character is found.
 
char * ParseToDelimiter (const char *pInput) noexcept
 Return a pointer to whitespace, CR, LF or zero.
 
char * ParseBeyondEOL (const char *pInput) noexcept
 Parse a "C" string until a zero or EOL.
 
char * ParseBeyondEOL (const char *pInput, uintptr_t uLength) noexcept
 Parse a "C" string until a zero or EOL or out of data.
 
char * ParseQuotedString (char *pOutput, uintptr_t uOutputSize, const char *pInput) noexcept
 Parse out a quoted string.
 
uintptr_t CopyUpToEOL (char *pOutput, uintptr_t uOutputSize, const char *pInput, uintptr_t uInputSize) noexcept
 Read a stream of text chars until a nullptr, LF, CR or CR/LF is found.
 
void StripLeadingSpaces (char *pInput) noexcept
 Remove spaces from the beginning of a string.
 
void StripTrailingSpaces (char *pInput) noexcept
 Remove spaces from the end of a string.
 
void StripLeadingWhiteSpace (char *pInput) noexcept
 Remove whitespace from the beginning of a string.
 
void StripTrailingWhiteSpace (char *pInput) noexcept
 Remove whitespace from the end of a string.
 
void StripLeadingAndTrailingSpaces (char *pInput) noexcept
 Remove spaces from the beginning and end of a string.
 
void StripLeadingAndTrailingWhiteSpace (char *pInput) noexcept
 Remove whitespace from the beginning and end of a string.
 
void StripAllFromList (char *pInput, const char *pList) noexcept
 Remove all characters that match those in a list.
 
void StripAllButList (char *pInput, const char *pList) noexcept
 Remove all characters except those in a list.
 
void StripTrailing (char *pInput, const char *pList) noexcept
 Remove characters from the end of a string.
 
void StripLeading (char *pInput, const char *pList) noexcept
 Remove characters from the beginning of a string.
 
void RemoveTrailingChar (char *pInput, uint_t uRemove) noexcept
 Remove a character from the end of a string if present.
 
void ForceTrailingChar (char *pInput, uint_t uLast) noexcept
 Force a character to be at the end of a string if missing.
 
void SlashesToColons (char *pInput) noexcept
 Convert all forward and back slashes to colons.
 
void SlashesToColons (char *pOutput, const char *pInput) noexcept
 Convert all forward and back slashes to colons.
 
void SlashesToWindowsSlashes (char *pInput) noexcept
 Convert all forward slashes ('/') to back slashes ('\').
 
void SlashesToWindowsSlashes (char *pOutput, const char *pInput) noexcept
 Convert all forward slashes ('/') to back slashes ('\').
 
void EndWithWindowsSlashes (char *pInput) noexcept
 Force the last character of a string to be '\'.
 
void EndWithWindowsSlashes (char *pOutput, const char *pInput) noexcept
 Copy a string and force the last character of a string to be '\'.
 
void SlashesToLinuxSlashes (char *pInput) noexcept
 Convert all back slashes ('\') to forward slashes ('/').
 
void SlashesToLinuxSlashes (char *pOutput, const char *pInput) noexcept
 Convert all back slashes ('\') to forward slashes ('/').
 
void EndWithLinuxSlashes (char *pInput) noexcept
 Force the last character of a string to be '/'.
 
void EndWithLinuxSlashes (char *pOutput, const char *pInput) noexcept
 Copy a string and force the last character of a string to be '/'.
 
void Replace (char *pInput, uint_t uFrom, uint_t uTo) noexcept
 Convert characters in a string from one to another.
 
void Replace (char *pOutput, const char *pInput, uint_t uFrom, uint_t uTo) noexcept
 Convert characters in a string from one to another.
 
char * GetFileExtension (const char *pInput) noexcept
 Get a pointer to the beginning of the file extension.
 
void SetFileExtension (char *pInput, const char *pNewExtension) noexcept
 Replace the text after the last period for filename extensions.
 
uintptr_t StringLength (const char *pInput) noexcept
 Perform an ANSI compatible strlen().
 
uintptr_t StringLength (const uint16_t *pInput) noexcept
 Perform an ANSI compatible strlen() for UTF16 strings..
 
void StringCopy (char *pOutput, const char *pInput) noexcept
 Copy a "C" string.
 
void StringCopy (char *pOutput, uintptr_t uOutputSize, const char *pInput) noexcept
 Copy a "C" string with bounds checking.
 
void StringCopy (char *pOutput, uintptr_t uOutputSize, const char *pInput, uintptr_t uInputSize) noexcept
 Copy a text buffer into a "C" string with bounds checking.
 
void StringCopy (uint16_t *pOutput, const uint16_t *pInput) noexcept
 Copy a 16 bit "C" string.
 
void StringCopy (uint16_t *pOutput, uintptr_t uOutputSize, const uint16_t *pInput) noexcept
 Copy a 16 bit "C" string with bounds checking.
 
void StringCopy (uint16_t *pOutput, uintptr_t uOutputSize, const uint16_t *pInput, uintptr_t uInputSize) noexcept
 Copy a text buffer into a 16 bit "C" string with bounds checking.
 
char * StringDuplicate (const char *pInput) noexcept
 Make a copy of a "C" string.
 
char * StringDuplicate (const char *pInput, uintptr_t uPadding) noexcept
 Make a copy of a "C" string with some padding.
 
void StringDelete (const char *pInput) noexcept
 Delete an allocated string.
 
void StringConcatenate (char *pOutput, const char *pInput) noexcept
 Concatenate a "C" string with another "C" string.
 
void StringConcatenate (char *pOutput, uintptr_t uOutputSize, const char *pInput) noexcept
 Concatenate a "C" string with another "C" string bounds checked.
 
void StringConcatenate (char *pOutput, uintptr_t uOutputSize, const char *pInput, uintptr_t uInputSize) noexcept
 Concatenate a "C" string with a string buffer, bounds checked.
 
void StringConcatenate (uint16_t *pOutput, const uint16_t *pInput) noexcept
 Concatenate a 16 bit "C" string with another 16 bit "C" string.
 
void StringConcatenate (uint16_t *pOutput, uintptr_t uOutputSize, const uint16_t *pInput) noexcept
 Concatenate a 16 bit "C" string with another 16 bit "C" string bounds checked.
 
int StringCompare (const char *pInput1, const char *pInput2) noexcept
 Compare two "C" strings for equality.
 
int StringCompare (const char *pInput1, const char *pInput2, uintptr_t uMaxLength) noexcept
 Compare two "C" strings for equality, case sensitive, length delimited.
 
int StringCompare (const uint16_t *pInput1, const uint16_t *pInput2) noexcept
 Compare two 16 bit "C" strings for equality.
 
int StringCompare (const uint16_t *pInput1, const uint16_t *pInput2, uintptr_t uMaxLength) noexcept
 Compare two 16 bit "C" strings for equality, case sensitive, length delimited.
 
int StringCaseCompare (const char *pInput1, const char *pInput2) noexcept
 Compare two "C" strings for equality, case insensitive.
 
int StringCaseCompare (const char *pInput1, const char *pInput2, uintptr_t uMaxLength) noexcept
 Compare two "C" strings for equality, case insensitive, length delimited.
 
uint_t Wildcardcmp (const char *pInput, const char *pWildcard) noexcept
 Perform a string comparison using the wild card system.
 
uint_t HasWildcard (const char *pInput) noexcept
 Return TRUE if the string contains a wild card character.
 
void StringUppercase (char *pInput) noexcept
 Convert a string to upper case.
 
void StringUppercase (char *pOutput, const char *pInput) noexcept
 Convert a string to upper case into a new buffer.
 
void StringLowercase (char *pInput) noexcept
 Convert a string to lower case.
 
void StringLowercase (char *pOutput, const char *pInput) noexcept
 Convert a string to lower case into a new buffer.
 
char * StringCharacter (const char *pInput, int iChar) noexcept
 Scan for the first occurrence of a specific character.
 
uint16_t * StringCharacter (const uint16_t *pInput, uint_t uChar) noexcept
 Scan for the first occurrence of a specific character.
 
char * StringCharacterReverse (const char *pInput, int iChar) noexcept
 Scan for the last occurrence of a specific character.
 
uint16_t * StringCharacterReverse (const uint16_t *pInput, uint_t uChar) noexcept
 Scan for the last occurrence of a specific character.
 
uint_t StringEndsWith (char *pInput, int iChar) noexcept
 Force the ending character of a string.
 
uint_t StringEndsWith (uint16_t *pInput, uint_t uChar) noexcept
 Force the ending character of a string.
 
uintptr_t StringSkipOver (const char *pInput, const char *pDelimiters) noexcept
 Locate the offset of the first non-delimiter in a string.
 
uintptr_t StringSkipOver (const uint16_t *pInput, const uint16_t *pDelimiters) noexcept
 Locate the offset of the first non-delimiter in a string.
 
uintptr_t StringStopAt (const char *pInput, const char *pDelimiters) noexcept
 Locate the offset of the first delimiter in a string.
 
uintptr_t StringStopAt (const uint16_t *pInput, const uint16_t *pDelimiters) noexcept
 Locate the offset of a delimiter in a string.
 
char * StringString (const char *pInput, const char *pTest) noexcept
 Locate a substring.
 
char * StringString (const char *pInput, const char *pTest, uintptr_t uTestLength) noexcept
 Locate a substring.
 
uint16_t * StringString (const uint16_t *pInput, const uint16_t *pTest) noexcept
 Locate a substring (UTF-16 version)
 
char * StringCaseString (const char *pInput, const char *pTest) noexcept
 Locate a substring, case insensitive.
 
uint16_t * StringCaseString (const uint16_t *pInput, const uint16_t *pTest) noexcept
 Locate a substring, case insensitive (UTF-16 version)
 
char * StringToken (char *pInput, const char *pDelimiters, char **ppSave) noexcept
 Split a string into tokens.
 
uint16_t * StringToken (uint16_t *pInput, const uint16_t *pDelimiters, uint16_t **ppSave) noexcept
 Split a string into tokens.
 
intptr_t GetFormattedLength (const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept
 Reports the size of a formatted output in bytes without actually creating any formatted output.
 
intptr_t SprintfUserAlloc (SafePrint::SprintfCallbackProc pCallback, void *pContext, uint_t bAddNull, const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept
 Print into a buffer that a callback allocates.
 
intptr_t Sprintf (char *pOutput, const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept
 sprintf() clone
 
intptr_t Snprintf (char *pOutput, uintptr_t uOutputSize, const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept
 snprintf() clone
 
intptr_t Printf (const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept
 printf() clone
 
intptr_t Fprintf (FILE *fp, const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept
 printf() clone
 
intptr_t DebugSnprintf (char *pOutput, uintptr_t uOutputSize, const char *pFormat, uintptr_t uArgCount, const ArgumentType **ppArgs) noexcept
 Debug snprintf()
 
float Unpack16ToFloat (int16_t iInput)
 Decompress a packed floating point number.
 
int16_t PackFloatTo16 (float fInput)
 Convert a float in the range of 0.999999 to -0.999999 into a 16 bit packed integer.
 
float Unpack16ToFloat (int16_t iInput, uint32_t uBaseExponent)
 Decompress a packed floating point number with a supplied base exponent.
 
int16_t PackFloatTo16 (float fInput, uint32_t uBaseExponent)
 Convert a float in the range of a supplied exponent into a 16 bit packed integer.
 
uintptr_t UnpackBytes (const uint8_t *pInput, uintptr_t uInputLength, uint8_t **ppOutput, uintptr_t *pOutputLength)
 Decompress data compressed with PackBytes from the Apple IIgs.
 
eUnixFlavor UnixGetFlavor (void) noexcept
 
uint32_t get_traceflags (void) noexcept
 Get the current debug tracing flag.
 
void set_traceflags (uint32_t uTraceFlags) noexcept
 Set the current debug tracing flag.
 
uint32_t get_hintflags (void) noexcept
 Get the current code hint flags.
 
void set_hintflags (uint32_t uHintFlags) noexcept
 Set the current debug tracing flag.
 
const char * GetEnvironmentString (const char *pKey) noexcept
 Retrieve an environment string.
 
eError SetEnvironmentString (const char *pKey, const char *pInput) noexcept
 Set an environment string.
 
uint_t IsElevated (void) noexcept
 Test if the application has elevated privileges.
 
eError GetUserLoginName (String *pOutput) noexcept
 Retrieves the login name of the user associated with the current thread.
 
eError GetUserRealName (String *pOutput) noexcept
 Get the real name of the current user.
 
eError GetMachineName (String *pOutput) noexcept
 Get the name the user has called the computer.
 
eError GetFullPathNameUTF8 (String *pOutput, const char *pInput) noexcept
 
eError GetOSString (String *pOutput, int16_t iStringID) noexcept
 
eError GetOSIndString (String *pOutput, int16_t iStringID, int16_t iIndex) noexcept
 
eError GetMacModelIdentifier (String *pOutput) noexcept
 
void StringCopy (String *pOutput, const __CFString *pInput) noexcept
 Convert an NSString to a Burger::String (MacOSX and Carbon Only)
 
eError get_home_directory (String *pOutput) noexcept
 Return the path of the "home" folder.
 
eError get_abspath (String *pOutput, const char *pInput) noexcept
 Return the absolute path of a pathname.
 
uintptr_t SDBMHashFunctor (const void *pData, uintptr_t uDataSize) noexcept
 SDBM (Service Data Base Management) hash callback for HashMapShared.
 
uintptr_t SDBMHashCaseFunctor (const void *pData, uintptr_t uDataSize) noexcept
 Case insensitive SDBM (Service Data Base Management) hash callback for HashMapShared.
 
uintptr_t DJB2HashAddFunctor (const void *pData, uintptr_t uDataSize) noexcept
 DJB2 Additive hash callback for HashMapShared.
 
uintptr_t DJB2HashAddCaseFunctor (const void *pData, uintptr_t uDataSize) noexcept
 Case insensitive DJB2 Additive hash callback for HashMapShared.
 
uintptr_t DJB2HashXorFunctor (const void *pData, uintptr_t uDataSize) noexcept
 DJB2 Exclusive Or hash callback for HashMapShared.
 
uintptr_t DJB2HashXorCaseFunctor (const void *pData, uintptr_t uDataSize) noexcept
 DJB2 Exclusive Or hash callback for HashMapShared.
 
uintptr_t DJB2StringHashXorFunctor (const void *pData, uintptr_t uDataSize) noexcept
 DJB2 Exclusive Or hash callback for HashMapString.
 
uintptr_t DJB2StringHashXorCaseFunctor (const void *pData, uintptr_t uDataSize) noexcept
 Case insensitive DJB2 Exclusive Or hash callback for HashMapStringCase.
 
uint_t HashMapStringCaseTest (const void *pA, const void *pB) noexcept
 Case insensitive string test for HashMapStringCase.
 
void MP3DCT64 (float *pOutput1, float *pOutput2, const float *pInput)
 MP3 Discrete cosine transform function.
 
void MP3FHT (float *pInput, uintptr_t uCount)
 MP3 Fast Fourier (Hartley) transform.
 
void MP3DCT36 (float *pSideSamples, float *pHybridOutput, float *pOutput, const float *pPrevious, const float *pBlockType)
 36 entry DCT for MP3
 
void MP3DCT12 (float *pSideSamples, float *pHybridOutput, float *pOutput, const float *pPrevious, const float *pBlockType)
 12 entry DCT for MP3
 
void sleep_ms (uint32_t uMilliseconds, uint_t bAlertable=0) noexcept
 Sleep the current thread.
 
uint_t WriteBig (FILE *fp, uint16_t uInput)
 Write a big endian 16-bit integer to a file.
 
uint_t WriteBig (FILE *fp, uint32_t uInput)
 Write a big endian 32-bit integer to a file.
 
uint_t WriteBig (FILE *fp, uint64_t uInput)
 Write a big endian 64-bit integer to a file.
 
uint_t WriteBig (FILE *fp, float fInput)
 Write a big endian 32-bit float to a file.
 
uint_t WriteBig (FILE *fp, double dInput)
 Write a big endian 64-bit float to a file.
 
uint_t WriteLittle (FILE *fp, uint16_t uInput)
 Write a little endian 16-bit integer to a file.
 
uint_t WriteLittle (FILE *fp, uint32_t uInput)
 Write a little endian 32-bit integer to a file.
 
uint_t WriteLittle (FILE *fp, uint64_t uInput)
 Write a little endian 64-bit integer to a file.
 
uint_t WriteLittle (FILE *fp, float fInput)
 Write a little endian 32-bit float to a file.
 
uint_t WriteLittle (FILE *fp, double dInput)
 Write a little endian 64-bit float to a file.
 
uint_t WriteCString (FILE *fp, const char *pInput)
 Write a "C" string with the terminating zero to a file stream.
 
uint16_t read_big_uint16 (FILE *fp)
 Read a big endian 16-bit integer from a file.
 
uint32_t read_big_uint32 (FILE *fp)
 Read a big endian 32-bit integer from a file.
 
uint64_t ReadBigWord64 (FILE *fp)
 Read a big endian 64-bit integer from a file.
 
float ReadBigFloat (FILE *fp)
 Read a big endian 32-bit float from a file.
 
double ReadBigDouble (FILE *fp)
 Read a big endian 64-bit float from a file.
 
uint16_t read_little_uint16 (FILE *fp)
 Read a little endian 16-bit integer from a file.
 
uint32_t read_little_uint32 (FILE *fp)
 Read a little endian 32-bit integer from a file.
 
uint64_t ReadLittleWord64 (FILE *fp)
 Read a little endian 64-bit integer from a file.
 
float ReadLittleFloat (FILE *fp)
 Read a little endian 32-bit float from a file.
 
double ReadLittleDouble (FILE *fp)
 Read a little endian 64-bit float from a file.
 
uint_t read_c_string (FILE *fp, char *pInput, uintptr_t uLength)
 Read a "C" string with the terminating zero to a file stream.
 
uintptr_t GetSize (FILE *fp)
 Return the size of a file.
 
uint64_t GetSize64 (FILE *fp)
 Return the size of a file with 64 bits.
 
eError SaveFile (FILE *fp, const void *pData, uintptr_t uLength)
 Save memory to a file opened with fopen()
 
void * LoadFile (FILE *fp, uintptr_t *uLength)
 Load a file opened with fopen() into memory.
 
void SetBinaryMode (FILE *fp)
 Force an ANSI FILE * to binary mode.
 
eError SimpleDecompressILBMRLE (void *pOutput, uintptr_t uOutputChunkLength, const void *pInput, uintptr_t uInputChunkLength)
 Decompress data using RLE compression.
 
eError SimpleDecompressLZSS (void *pOutput, uintptr_t uOutputChunkLength, const void *pInput, uintptr_t uInputChunkLength)
 
eError SimpleDecompressDeflate (void *pOutput, uintptr_t uOutputChunkLength, const void *pInput, uintptr_t uInputChunkLength)
 Decompress data using Deflate compression.
 
long SetDeviceCursor (IDirect3DDevice9 *pDirect3DDevice9, HICON__ *hCursor)
 Convert a Windows HCURSOR for DirectX9.
 
uint_t GetD3DFORMATColorChannelBits (uint_t uD3DFORMAT)
 Get the number of bits for a single color channel.
 
uint_t GetD3DFORMATAlphaChannelBits (uint_t uD3DFORMAT)
 Get the number of bits for the alpha channel.
 
uint_t GetD3DFORMATDepthBits (uint_t uD3DFORMAT)
 Get the number of bits for the depth channel.
 
uint_t GetD3DFORMATStencilBits (uint_t uD3DFORMAT)
 Get the number of bits for the stencil channel.
 
uint_t GetDXGI_FORMATColorChannelBits (uint_t uDXGI_FORMAT)
 Get the number of bits for a single color channel.
 
void CopyPalette (RGBWord8_t *pOutput, const RGBWord8_t *pInput, uintptr_t uEntries=256)
 Copy an array of RGBWord8_t entries.
 
void CopyPalette (RGBWord8_t *pOutput, const RGBAWord8_t *pInput, uintptr_t uEntries=256)
 Copy an array of RGBWord8_t entries from an array of RGBAWord8_t entries.
 
void CopyPalette (RGBAWord8_t *pOutput, const RGBWord8_t *pInput, uintptr_t uEntries=256)
 Copy an array of RGBAWord8_t entries from an array of RGBWord8_t entries.
 
void CopyPalette (RGBAWord8_t *pOutput, const RGBAWord8_t *pInput, uintptr_t uEntries=256)
 Copy an array of RGBAWord8_t entries from an array of RGBAWord8_t entries.
 
void CopyPalette444 (RGBWord8_t *pOutput, const uint16_t *pInput, uintptr_t uEntries=256)
 Copy an array of RGBWord8_t entries from an array of 16 bit XRGB entries.
 
void CopyPalette444 (RGBAWord8_t *pOutput, const uint16_t *pInput, uintptr_t uEntries=256)
 Copy an array of RGBAWord8_t entries from an array of 16 bit XRGB entries.
 
void CopyPalette4444 (RGBWord8_t *pOutput, const uint16_t *pInput, uintptr_t uEntries=256)
 Copy an array of RGBWord8_t entries from an array of 16 bit ARGB entries.
 
void CopyPalette4444 (RGBAWord8_t *pOutput, const uint16_t *pInput, uintptr_t uEntries=256)
 Copy an array of RGBAWord8_t entries from an array of 16 bit ARGB entries.
 
void Convert (RGBFloat_t *pOutput, const HSL_t *pInput)
 Convert a HSL color to an RGB color.
 
void Convert (HSL_t *pOutput, const RGBFloat_t *pInput)
 Convert an RGB color to HSL color.
 
void CopyPalette256 (RGBWord8_t *pOutput, const RGBWord8_t *pInput, uint_t uStartIndex=0, uint_t uPaletteSize=256)
 Set a range of RGB color entries to a 256 entry palette.
 
void CopyPalette256 (RGBWord8_t *pOutput, const RGBAWord8_t *pInput, uint_t uStartIndex=0, uint_t uPaletteSize=256)
 Set a range of RGB color entries to a 256 entry palette.
 
void CopyPalette256 (RGBAWord8_t *pOutput, const RGBWord8_t *pInput, uint_t uStartIndex=0, uint_t uPaletteSize=256)
 Set a range of RGBA color entries to a 256 entry palette.
 
void CopyPalette256 (RGBAWord8_t *pOutput, const RGBAWord8_t *pInput, uint_t uStartIndex=0, uint_t uPaletteSize=256)
 Set a range of RGBA color entries to a 256 entry palette.
 
void ClearPalette (RGBWord8_t *pOutput, uintptr_t uPaletteSize=256)
 Clear an RGB palette.
 
void ClearPalette (RGBAWord8_t *pOutput, uintptr_t uPaletteSize=256)
 Clear an RGBA palette.
 
void FillPalette (RGBWord8_t *pOutput, const RGBWord8_t *pInput, uintptr_t uPaletteSize=256)
 Fill an RGB palette with a specific color.
 
void FillPalette (RGBAWord8_t *pOutput, const RGBAWord8_t *pInput, uintptr_t uPaletteSize=256)
 Fill an RGBA palette with a specific color.
 
void DecompressImage (RGBAWord8_t *pOutput, uintptr_t uOutputStride, uint_t uWidth, uint_t uHeight, const Dxt1Packet_t *pInput, uintptr_t uInputStride)
 Decompress an array of 4x4 block compressed with DXT1.
 
void DecompressImage (RGBAWord8_t *pOutput, uintptr_t uOutputStride, uint_t uWidth, uint_t uHeight, const Dxt3Packet_t *pInput, uintptr_t uInputStride)
 Decompress an array of 4x4 block compressed with DXT3.
 
void DecompressImage (RGBAWord8_t *pOutput, uintptr_t uOutputStride, uint_t uWidth, uint_t uHeight, const Dxt5Packet_t *pInput, uintptr_t uInputStride)
 Decompress an array of 4x4 block compressed with DXT5.
 
const void * FindAIFFChunk (const void *pInput, uintptr_t uLength, uint32_t uChunkName)
 Scan an AIFF file for a specific chunk.
 
const void * FindRIFFChunk (const void *pInput, uintptr_t uLength, uint32_t uChunkName)
 Scan a RIFF file for a specific chunk.
 
uint32_t GetID3V2TagLength (const void *pInput)
 Parses the ID3V2 tag length.
 
uint_t XInputStopRumbleOnAllControllers (void) noexcept
 Turn off rumbling on XInput managed controllers.
 
uint_t XInputGetGamepadState (uint_t uWhich, XInputGamePad_t *pXInputGamePad, eXInputDeadZoneType uDeadZoneType=XINPUTDEADZONE_NONE) noexcept
 Read a controller using XInput.
 
uint_t IsDeviceXInput (const GUID *pGuid) noexcept
 Test if a device GUID belongs to an XInput device.
 
void CopySoundData (void *pOutput, const void *pInput, uintptr_t uLength, SoundManager::eDataType eType)
 Upload sound data.
 
void ClearSoundData (void *pOutput, uintptr_t uLength, SoundManager::eDataType eType)
 Clear sound data.
 
void CopyStereoInterleaved (void *pOutput, const uint8_t *pLeft, const uint8_t *pRight, uintptr_t uOutputSize)
 Merge a left and right audio channel into a single buffer.
 
void CopyStereoInterleaved (void *pOutput, const uint16_t *pLeft, const uint16_t *pRight, uintptr_t uOutputSize)
 Merge a left and right audio channel into a single buffer.
 
void ComputeReverb (uint8_t *pOutput, const uint8_t *pInput, uintptr_t uCount, uint_t uPercentage)
 Add in an 8 bit reverb.
 
void ComputeReverb (int16_t *pOutput, const int16_t *pInput, uintptr_t uCount, uint_t uPercentage)
 Add in an 16 bit reverb.
 
uint_t Upload (IDirectSoundBuffer *pBuffer, uintptr_t uOffset, const uint8_t *pInput, uintptr_t uInputLength)
 Upload sound data into a DirectSoundBuffer.
 
uint_t Upload (IDirectSoundBuffer *pBuffer, uintptr_t uOffset, SoundManager::BufferDecoder *pBufferDecoder, uintptr_t uInputLength)
 Upload compressed sound data into a DirectSoundBuffer.
 
float AudioDeviceGetMasterVolume (uint32_t uDeviceID)
 
uint_t AudioDeviceSetMasterVolume (uint32_t uDeviceID, float fInput)
 
void MACEExp1to6 (const uint8_t *pInput, uint8_t *pOutput, uintptr_t uPacketCount, MACEState_t *pInputState, MACEState_t *pOutputState, uint_t uNumChannels, uint_t uWhichChannel)
 Decompress audio compressed with MACE 6:1.
 
void MACEExp1to3 (const uint8_t *pInput, uint8_t *pOutput, uintptr_t uPacketCount, MACEState_t *pInputState, MACEState_t *pOutputState, uint_t uNumChannels, uint_t uWhichChannel)
 Decompress audio compressed with MACE 3:1.
 
void ImportS3MEffect (Sequencer::Command_t *pOutput, uint_t uS3MCommand, uint_t uS3MArgument)
 Convert an S3M effect command to a Burgerlib one.
 
uint_t ImportS3M (Sequencer::SongPackage *pOutput, const uint8_t *pInput, uintptr_t uInputLength)
 Import an S3M file.
 
void ImportITEffect (Sequencer::Command_t *pOutput, uint_t uITCommand, uint_t uITArgument)
 Convert an IT effect command to a Burgerlib one.
 
uint_t ImportIT (Sequencer::SongPackage *pOutput, const uint8_t *pInput, uintptr_t uInputLength)
 Import an IT file.
 
const uint8_t * ImportXMEffect (Sequencer::Command_t *pOutput, const uint8_t *pInput)
 Convert an XM effect command to a Burgerlib one.
 
uint_t ImportXM (Sequencer::SongPackage *pOutput, const uint8_t *pInput, uintptr_t uInputLength)
 Import an XM file.
 
uint_t IsSelfAssignedIPv4 (uint32_t uIP) noexcept
 Test if an IPv4 address is self assigned.
 
uint_t IsIPv6Unspecified (const uint8_t *pIP) noexcept
 Test if an IPv6 address is unspecified.
 
uint_t IsIPv6Loopback (const uint8_t *pIP) noexcept
 Test if an IPv6 address is a loop back address.
 
uint_t IsIPv6Multicast (const uint8_t *pIP) noexcept
 Test if an IPv6 address is a multicast address.
 
uint_t IsIPv6LinkLocal (const uint8_t *pIP) noexcept
 Test if an IPv6 address is a link local address.
 
uint_t IsIPv6SiteLocal (const uint8_t *pIP) noexcept
 Test if an IPv6 address is a site local address.
 
uint_t IsIPv6MappedIPv4 (const uint8_t *pIP) noexcept
 Test if an IPv6 address is an IPv4 address in a wrapper.
 
uint_t IsIPv6CompatibleIPv4 (const uint8_t *pIP) noexcept
 Test if an IPv6 address is an IPv4 address in a wrapper.
 
uint_t IsIPv6MulticastNodeLocal (const uint8_t *pIP) noexcept
 Test if an IPv6 multicast address has node local scope.
 
uint_t IsIPv6MulticastLinkLocal (const uint8_t *pIP) noexcept
 Test if an IPv6 multicast address has link local scope.
 
uint_t IsIPv6MulticastSiteLocal (const uint8_t *pIP) noexcept
 Test if an IPv6 multicast address has site local scope.
 
uint_t IsIPv6MulticastOrgLocal (const uint8_t *pIP) noexcept
 Test if an IPv6 multicast address has organization local scope.
 
uint_t IsIPv6MulticastGlobal (const uint8_t *pIP) noexcept
 Test if an IPv6 multicast address has global scope.
 
eError IPv4ToString (String *pOutput, uint32_t uIP, uint_t uPort=0xFFFFFFFFU) noexcept
 Convert an IPv4 address into a string.
 
eError IPv6ToString (String *pOutput, const uint8_t *pIP, uint_t uPort=0xFFFFFFFFU) noexcept
 Convert an IPv6 address into a string.
 
eError StringToIPv4 (const char *pInput, uint32_t *pIP, uint_t *pPort=0) noexcept
 Convert a string into an IPv4 address.
 
eError StringToIPv6 (const char *pInput, uint8_t *pIP, uint_t *pPort=0) noexcept
 Convert a string into an IPv6 address.
 
eError SocketSetBlocking (SocketType uSocket) noexcept
 Set a posix socket to blocking mode.
 
eError SocketSetNonBlocking (SocketType uSocket) noexcept
 Set a posix socket to non-blocking mode.
 
eError SocketTestForReading (SocketType uSocket) noexcept
 Test a posix socket if there's pending data.
 
eError get_default_mac_address (MacAddress_t *pOutput) noexcept
 Get the MAC address.
 
void MakeNetworkEnumQueryPacket (void *pPacket)
 Create a query packet for network server scanning.
 
uint_t IsNetworkEnumQueryPacket (const void *pPacket, uintptr_t uPacketSize)
 Verify a query packet for network server scanning.
 
void ChooseGridSize (uint_t *pXCellCount, uint_t *pYCellCount, const Vector4D_t *pBoundingRect, uintptr_t uItemCountEstimate, float fGridScale=0.707f)
 Determine the optimum size of a grid.
 
void EdgeIntersectTest (float *pEdge1VSEdge2, float *pEdge2VSEdge1, const Vector2D_t *pEdge1V1, const Vector2D_t *pEdge1V2, const Vector2D_t *pEdge2V1, const Vector2D_t *pEdge2V2)
 Test two edges for intersection.
 

Variables

const uint32_float_t g_fZero = {0x00000000U}
 Constant for 0.0f in the float format.
 
const uint32_float_t g_fNegZero = {0x80000000U}
 Constant for -0.0f in the float format.
 
const uint32_float_t g_fOne = {0x3F800000U}
 Constant for 1.0f in the float format.
 
const uint32_float_t g_fNegOne = {0xBF800000U}
 Constant for -1.0f in the float format.
 
const uint32_float_t g_fHalf = {0x3F000000U}
 Constant for 0.5f in the float format.
 
const uint32_float_t g_fNegHalf = {0xBF000000U}
 Constant for -0.5f in the float format.
 
const uint32_float_t g_fInf = {0x7F800000U}
 Constant for Infinity in the float format.
 
const uint32_float_t g_fNegInf = {0xFF800000U}
 Constant for -Infinity in the float format.
 
const uint32_float_t g_fNan = {0x7FBFFFFFU}
 Constant for signaling Not a Number (NaN) in the float format.
 
const uint32_float_t g_fNegNan = {0xFFBFFFFFU}
 Constant for negative signaling Not a Number (NaN) in the float format.
 
const uint32_float_t g_fQNan = {0x7FFFFFFFU}
 Constant for non signaling Not a Number (Nan) in the float format.
 
const uint32_float_t g_fNegQNan = {0xFFFFFFFFU}
 Constant for negative non signaling Not a Number in the float format.
 
const uint32_float_t g_fMin = {0x00800000U}
 Constant for smallest number (Non-zero) in the float format.
 
const uint32_float_t g_fNegMin = {0x80800000U}
 Constant for negative smallest number (Non-zero) in the float format.
 
const uint32_float_t g_fMax = {0x7F7FFFFFU}
 Constant for largest number in the float format.
 
const uint32_float_t g_fNegMax = {0xFF7FFFFFU}
 Constant for negative largest number in the float format.
 
const uint32_float_t g_fMinNoInteger = {0x4B000000}
 Constant for the smallest number that cannot have a fraction 8388608.0f.
 
const uint32_float_t g_fNegMinNoInteger = {0xCB000000}
 Constant for the negative smallest number that cannot have a fraction -8388608.0f.
 
const uint32_float_t g_fEpsilon = {0x34000000U}
 Constant for Epsilon in the float format.
 
const uint32_float_t g_fNegEpsilon = {0xB4000000U}
 Constant for negative Epsilon in the float format.
 
const uint32_float_t g_fQuarterPi = {0x3F490FDB}
 Constant for Pi*0.25f in the float format.
 
const uint32_float_t g_fNegQuarterPi = {0xBF490FDB}
 Constant for -Pi*0.25f in the float format.
 
const uint32_float_t g_fHalfPi = {0x3FC90FDB}
 Constant for Pi*0.5f in the float format.
 
const uint32_float_t g_fNegHalfPi = {0xBFC90FDB}
 Constant for -Pi*0.5f in the float format.
 
const uint32_float_t g_fPi = {0x40490FDB}
 Constant for Pi in the float format.
 
const uint32_float_t g_fNegPi = {0xC0490FDB}
 Constant for -Pi in the float format.
 
const uint32_float_t g_fPi2 = {0x40C90FDB}
 Constant for Pi*2 in the float format.
 
const uint32_float_t g_fNegPi2 = {0xC0C90FDB}
 Constant for -Pi*2 in the float format.
 
const uint32_float_t g_fPi4 = {0x41490FDB}
 Constant for Pi*4 in the float format.
 
const uint32_float_t g_fNegPi4 = {0xC1490FDB}
 Constant for -Pi*4 in the float format.
 
const uint32_float_t g_fCosPiDiv6 = {0x3F5DB3D7}
 Constant for get_cosine(Pi/6.0) in the float format.
 
const uint32_float_t g_fNegCosPiDiv6 = {0xBF5DB3D7}
 Constant for -get_cosine(Pi/6.0) in the float format.
 
const uint32_float_t g_fReciprocalHalfPi = {0x3F22F983}
 Constant for 1/(Pi*0.5f) in the float format.
 
const uint32_float_t g_fNegReciprocalHalfPi = {0xBF22F983}
 Constant for -1/(Pi*0.5f) in the float format.
 
const uint32_float_t g_fReciprocalPi = {0x3EA2F983}
 Constant for 1/Pi in the float format.
 
const uint32_float_t g_fNegReciprocalPi = {0xBEA2F983}
 Constant for -1/Pi in the float format.
 
const uint32_float_t g_fReciprocalPi2 = {0x3E22F983}
 Constant for 1/(Pi*2.0f) in the float format.
 
const uint32_float_t g_fNegReciprocalPi2 = {0xBE22F983}
 Constant for -1/(Pi*2.0f) in the float format.
 
const uint32_float_t g_fRadiansToDegrees = {0x42652EE1}
 Constant for 180/Pi in the float format.
 
const uint32_float_t g_fNegRadiansToDegrees = {0xC2652EE1}
 Constant for -180/Pi in the float format.
 
const uint32_float_t g_fDegreesToRadians = {0x3C8EFA35}
 Constant for Pi/180 in the float format.
 
const uint32_float_t g_fNegDegreesToRadians = {0xBC8EFA35}
 Constant for -Pi/180 in the float format.
 
const uint32_float_t g_fSqrt2 = {0x3FB504F3}
 Constant for sqrt(2) in the float format.
 
const uint32_float_t g_fNegSqrt2 = {0xBFB504F3}
 Constant for -sqrt(2) in the float format.
 
const uint32_float_t g_fLN2 = {0x3F317218}
 Constant for ln(2) in the float format.
 
const uint32_float_t g_fNegLN2 = {0xBF317218}
 Constant for -ln(2) in the float format.
 
const uint32_float_t g_fLN10 = {0x40135D8E}
 Constant for ln(10) in the float format.
 
const uint32_float_t g_fNegLN10 = {0xC0135D8E}
 Constant for -ln(10) in the float format.
 
const uint32_float_t g_f1Div255 = {0x3B808081}
 Constant for 1.0f/255.f in the float format.
 
const uint32_float_t g_f1Div3 = {0x3EAAAAAB}
 Constant for 1.0f/3.f in the float format.
 
const uint32_float_t g_f2Div3 = {0x3F2AAAAB}
 Constant for 2.0f/3.f in the float format.
 
const uint32_float_t g_f65536 = {0x47800000}
 Constant for 65536.f in the float float.
 
const uint64_double_t g_dZero = {0x0000000000000000ULL}
 Constant for 0.0 in the double format.
 
const uint64_double_t g_dNegZero = {0x8000000000000000ULL}
 Constant for -0.0 in the double format.
 
const uint64_double_t g_dOne = {0x3FF0000000000000ULL}
 Constant for 1.0 in the double format.
 
const uint64_double_t g_dNegOne = {0xBFF0000000000000ULL}
 Constant for -1.0 in the double format.
 
const uint64_double_t g_dHalf = {0x3FE0000000000000ULL}
 Constant for 0.5 in the double format.
 
const uint64_double_t g_dNegHalf = {0xBFE0000000000000ULL}
 Constant for -0.5 in the double format.
 
const uint64_double_t g_dInf = {0x7FF0000000000000ULL}
 Constant for Infinity in the double format.
 
const uint64_double_t g_dNegInf = {0xFFF0000000000000ULL}
 Constant for -Infinity in the double format.
 
const uint64_double_t g_dNan = {0x7FF7FFFFFFFFFFFFULL}
 Constant for signaling Not a Number (NaN) in the double format.
 
const uint64_double_t g_dNegNan = {0xFFF7FFFFFFFFFFFFULL}
 Constant for negative signaling Not a Number (NaN) in the double format.
 
const uint64_double_t g_dQNan = {0x7FFFFFFFFFFFFFFFULL}
 Constant for non signaling Not a Number (Nan) in the double format.
 
const uint64_double_t g_dNegQNan = {0xFFFFFFFFFFFFFFFFULL}
 Constant for negative non signaling Not a Number (Nan) in the double format.
 
const uint64_double_t g_dMin = {0x0010000000000000ULL}
 Constant for the smallest number (Non-zero) in the double format.
 
const uint64_double_t g_dNegMin = {0x8010000000000000ULL}
 Constant for the negative smallest number (Non-zero) in the double format.
 
const uint64_double_t g_dMax = {0x7FEFFFFFFFFFFFFFULL}
 Constant for the largest number in the double format.
 
const uint64_double_t g_dNegMax = {0xFFEFFFFFFFFFFFFFULL}
 Constant for the negative largest number in the double format.
 
const uint64_double_t g_dMinNoInteger = {0x4330000000000000ULL}
 Constant for the smallest number that cannot have a fraction 4503599627370496.0.
 
const uint64_double_t g_dNegMinNoInteger
 Constant for the negative smallest number that cannot have a fraction -4503599627370496.0.
 
const uint64_double_t g_dEpsilon = {0x3CB0000000000000ULL}
 Constant for Epsilon in the double format.
 
const uint64_double_t g_dNegEpsilon = {0xBCB0000000000000ULL}
 Constant for negative Epsilon in the double format.
 
const uint64_double_t g_dQuarterPi = {0x3FE921FB54442D18ULL}
 Constant for Pi*0.25 in the double format.
 
const uint64_double_t g_dNegQuarterPi = {0xBFE921FB54442D18ULL}
 Constant for -Pi*0.25 in the double format.
 
const uint64_double_t g_dHalfPi = {0x3FF921FB54442D18ULL}
 Constant for Pi*0.5 in the double format.
 
const uint64_double_t g_dNegHalfPi = {0xBFF921FB54442D18ULL}
 Constant for -Pi*0.5 in the double format.
 
const uint64_double_t g_dPi = {0x400921FB54442D18ULL}
 Constant for Pi in the double format.
 
const uint64_double_t g_dNegPi = {0xC00921FB54442D18ULL}
 Constant for -Pi in the double format.
 
const uint64_double_t g_dPi2 = {0x401921FB54442D18ULL}
 Constant for Pi*2 in the double format.
 
const uint64_double_t g_dNegPi2 = {0xC01921FB54442D18ULL}
 Constant for -Pi*2 in the double format.
 
const uint64_double_t g_dPi4 = {0x402921FB54442D18ULL}
 Constant for Pi*4 in the double format.
 
const uint64_double_t g_dNegPi4 = {0xC02921FB54442D18ULL}
 Constant for -Pi*4 in the double format.
 
const uint64_double_t g_dCosPiDiv6 = {0x3FEBB67AE8584CABULL}
 Constant for get_cosine(Pi/6.0) in the double format.
 
const uint64_double_t g_dNegCosPiDiv6 = {0xBFEBB67AE8584CABULL}
 Constant for -get_cosine(Pi/6.0) in the double format.
 
const uint64_double_t g_dReciprocalHalfPi
 Constant for 1/(Pi*0.5) in the double format.
 
const uint64_double_t g_dNegReciprocalHalfPi
 Constant for -1/(Pi*0.5) in the double format.
 
const uint64_double_t g_dReciprocalPi = {0x3FD45F306DC9C883ULL}
 Constant for 1/Pi in the double format.
 
const uint64_double_t g_dNegReciprocalPi
 Constant for -1/Pi in the double format.
 
const uint64_double_t g_dReciprocalPi2
 Constant for 1/(Pi*2) in the double format.
 
const uint64_double_t g_dNegReciprocalPi2
 Constant for -1/(Pi*2) in the double format.
 
const uint64_double_t g_dRadiansToDegrees
 Constant for 180/Pi in the double format.
 
const uint64_double_t g_dNegRadiansToDegrees
 Constant for -180/Pi in the double format.
 
const uint64_double_t g_dDegreesToRadians
 Constant for Pi/180 in the double format.
 
const uint64_double_t g_dNegDegreesToRadians
 Constant for -Pi/180 in the double format.
 
const uint64_double_t g_dSqrt2 = {0x3FF6A09E667F3BCDULL}
 Constant for sqrt(2) in the double format.
 
const uint64_double_t g_dNegSqrt2 = {0xBFF6A09E667F3BCDULL}
 Constant for -sqrt(2) in the double format.
 
const uint64_double_t g_dLN2 = {0x3FE62E42FEFA39EFULL}
 Constant for ln(2) in the double format.
 
const uint64_double_t g_dNegLN2 = {0xBFE62E42FEFA39EFULL}
 Constant for -ln(2) in the double format.
 
const uint64_double_t g_dLN10 = {0x40026BB1BBB55516ULL}
 Constant for ln(10) in the double format.
 
const uint64_double_t g_dNegLN10 = {0xC0026BB1BBB55516ULL}
 Constant for -ln(10) in the double format.
 
const uint64_double_t g_d1Div255 = {0x3F70101010101010ULL}
 Constant for 1.0/255.0 in the double format.
 
const uint64_double_t g_d1Div3 = {0x3FD5555555555555ULL}
 Constant for 1.0/3.0 in the double format.
 
const uint64_double_t g_d2Div3 = {0x447696695DBD1CC3ULL}
 Constant for 2.0/3.0 in the double format.
 
const uint64_double_t g_d65536 = {0x40f0000000000000ULL}
 Constant for 65536.0 in the double format.
 
const uint16_t g_u8087RoundToZero = 0x0F7F
 8087 control word to set rounding to zero
 
const uint16_t g_u8087RoundToInfinity = 0x0B7F
 8087 control word to set rounding to +infinity
 
const uint16_t g_u8087RoundToNegativeInfinity = 0x077F
 8087 control word to set rounding to -infinity
 
const GUID g_GUID_zero
 Empty GUID.
 
const uint32_float_t g_X86HalfAndNegHalf [2]
 0.5f,-0.5f for roundup / rounddown
 
constexpr const Frac32 kMinFrac32 = (-0x7FFFFFFF) - 1
 Minimum value for Frac32.
 
constexpr const Frac32 kMaxFrac32 = 0x7FFFFFFF
 Maximum value for Frac32.
 
constexpr const Fixed32 kMinFixed32 = (-0x7FFFFFFF) - 1
 Minimum value for Fixed32.
 
constexpr const Fixed32 kMaxFixed32 = 0x7FFFFFFF
 Maximum value for Fixed32.
 
constexpr const Fixed32 kPiFixed32 = 0x003243F
 Pi in Fixed32 format (3.141... * 65536 = 205887.416)
 
const char g_EmptyString [1] = {0}
 "" This string is hard coded to be an empty string. It saves space by having a singular occurrence.
 
const char g_CRLFString [3] = {'\r', '\n', 0}
 "\r\n"
 
const char g_CRString [2] = {'\r', 0}
 "\r"
 
const char g_LFString [2] = {'\n', 0}
 "\n"
 
const char g_TokenDelimiters [5] = {' ', '\t', '\r', '\n', 0}
 " \t\r\n"
 
const char g_TrueString [5] = {'t', 'r', 'u', 'e', 0}
 "true"
 
const char g_FalseString [6] = {'f', 'a', 'l', 's', 'e', 0}
 "false"
 
const char g_YesString [4] = {'y', 'e', 's', 0}
 "yes"
 
const char g_NoString [3] = {'n', 'o', 0}
 "no"
 
const char g_NullString [7] = {'(', 'n', 'u', 'l', 'l', ')', 0}
 String to print when a NULL pointer is found.
 
const char * g_WeekDays [7]
 Days of the week.
 
const char * g_Months [12]
 Months of the year.
 
const char * g_pBoolStrings [2]
 Strings to print for a boolean.
 
const uint16_t g_EmptyString16 [1] = {0}
 "" in UTF16
 
const uint16_t g_CRLFString16 [3] = {'\r', '\n', 0}
 "\r\n" in UTF16
 
const uint16_t g_CRString16 [2] = {'\r', 0}
 "\r" in UTF16
 
const uint16_t g_LFString16 [2] = {'\n', 0}
 "\n" in UTF16
 
const uint16_t g_TokenDelimiters16 [5] = {' ', '\t', '\r', '\n', 0}
 " \t\r\n" in UTF16
 
const uint16_t g_TrueString16 [5] = {'t', 'r', 'u', 'e', 0}
 "true" in UTF16
 
const uint16_t g_FalseString16 [6] = {'f', 'a', 'l', 's', 'e', 0}
 "false" in UTF16
 
const uint16_t g_YesString16 [4] = {'y', 'e', 's', 0}
 "yes" in UTF16
 
const uint16_t g_NoString16 [3] = {'n', 'o', 0}
 "no" in UTF16
 
const uint8_t g_AsciiTestTable [256]
 Table to quickly determine the type of low ASCII character.
 
const char g_NibbleToAsciiUppercase [16]
 Table to convert nibbles (0-15) into upper case ASCII characters.
 
const char g_NibbleToAsciiLowercase [16]
 Table to convert nibbles (0-15) into lower case ASCII characters.
 
const uint8_t g_AsciiToWord8Table [256]
 Table to convert ASCII characters into nibbles (0-15).
 
const uint8_t g_reverse_bits [256]
 Table to reverse the bit order of a byte.
 
const uint32_t g_TensTable32 [10]
 Table used for testing powers of ten for 32 bit integer to ASCII conversion.
 
const uint64_t g_TensTable64 [20]
 Table used for testing powers of ten for 64 bit integer to ASCII conversion.
 
const char * g_VolumePrefixes [kUnixStadia+1]
 Folder for mounted volumes.
 
const Vector2D_t g_Vector2DZero = {0.0f, 0.0f}
 Constant of 0.0f,0.0f.
 
const Vector2D_t g_Vector2DOne = {1.0f, 1.0f}
 Constant of 1.0f,1.0f.
 
const Vector2D_t g_Vector2DOneX = {1.0f, 0.0f}
 Constant of 1.0f,0.0f.
 
const Vector2D_t g_Vector2DOneY = {0.0f, 1.0f}
 Constant of 0.0f,1.0f.
 
const Word32ToVector2D_t g_Vector2DMax
 Constant of Burger::g_fMax,Burger::g_fMax.
 
const Word32ToVector2D_t g_Vector2DInfinity
 Constant of Burger::g_fInf,Burger::g_fInf.
 
const Vector3D_t g_Vector3DZero = {0.0f, 0.0f, 0.0f}
 Constant of 0.0f,0.0f,0.0f.
 
const Vector3D_t g_Vector3DOne = {1.0f, 1.0f, 1.0f}
 Constant of 1.0f,1.0f,1.0f.
 
const Vector3D_t g_Vector3DOneX = {1.0f, 0.0f, 0.0f}
 Constant of 1.0f,0.0f,0.0f.
 
const Vector3D_t g_Vector3DOneY = {0.0f, 1.0f, 0.0f}
 Constant of 0.0f,1.0f,0.0f.
 
const Vector3D_t g_Vector3DOneZ = {0.0f, 0.0f, 1.0f}
 Constant of 0.0f,0.0f,1.0f.
 
const Word32ToVector3D_t g_Vector3DMax
 Constant of Burger::g_fMax,Burger::g_fMax,Burger::g_fMax.
 
const Word32ToVector3D_t g_Vector3DInfinity
 Constant of Burger::g_fInf,Burger::g_fInf,Burger::g_fInf.
 
const Vector4D_t g_Vector4DZero = {0.0f,0.0f,0.0f,0.0f}
 Constant of 0.0f,0.0f,0.0f,0.0f.
 
const Vector4D_t g_Vector4DOne = {1.0f,1.0f,1.0f,1.0f}
 Constant of 1.0f,1.0f,1.0f,1.0f.
 
const Vector4D_t g_Vector4DOneX = {1.0f,0.0f,0.0f,0.0f}
 Constant of 1.0f,0.0f,0.0f,0.0f.
 
const Vector4D_t g_Vector4DOneY = {0.0f,1.0f,0.0f,0.0f}
 Constant of 0.0f,1.0f,0.0f,0.0f.
 
const Vector4D_t g_Vector4DOneZ = {0.0f,0.0f,1.0f,0.0f}
 Constant of 0.0f,0.0f,1.0f,0.0f.
 
const Vector4D_t g_Vector4DOneW = {0.0f,0.0f,0.0f,1.0f}
 Constant of 0.0f,0.0f,0.0f,1.0f.
 
const FixedVector3D_t s_FixedVector3DZero = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
 Constant of 0.0f,0.0f,0.0f in fixed point.
 
const FixedVector3D_t s_FixedVector3DOne = {BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f)}
 Constant of 1.0f,1.0f,1.0f in fixed point.
 
const FixedVector3D_t s_FixedVector3DOneX = {BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
 Constant of 1.0f,0.0f,0.0f in fixed point.
 
const FixedVector3D_t s_FixedVector3DOneY = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
 Constant of 0.0f,1.0f,0.0f in fixed point.
 
const FixedVector3D_t s_FixedVector3DOneZ = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f)}
 Constant of 0.0f,0.0f,1.0f in fixed point.
 
const FixedVector4D_t s_FixedVector4DZero = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
 Constant of 0.0f,0.0f,0.0f,0.0f in fixed point.
 
const FixedVector4D_t s_FixedVector4DOne = {BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f)}
 Constant of 1.0f,1.0f,1.0f,1.0f in fixed point.
 
const FixedVector4D_t s_FixedVector4DOneX = {BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
 Constant of 1.0f,0.0f,0.0f,0.0f in fixed point.
 
const FixedVector4D_t s_FixedVector4DOneY = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
 Constant of 0.0f,1.0f,0.0f,0.0f in fixed point.
 
const FixedVector4D_t s_FixedVector4DOneZ = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
 Constant of 0.0f,0.0f,1.0f,0.0f in fixed point.
 
const FixedVector4D_t s_FixedVector4DOneW = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f)}
 Constant of 0.0f,0.0f,0.0f,1.0f in fixed point.
 
const Matrix3D_t g_Matrix3DIdentity
 Constant 3x3 identity matrix.
 
const Matrix4D_t s_Matrix4DIdentity
 Constant 4x4 identity matrix.
 
const FixedMatrix3D_t s_FixedMatrix3DIdentity
 Constant 3x3 fixed point identity matrix.
 
const FixedMatrix4D_t s_FixedMatrix4DIdentity
 Constant 4x4 fixed point identity matrix.
 
const uint32_float_tg_pMP3CosinePoints [5] = { g_MP3Cosine64, g_MP3Cosine32, g_MP3Cosine16, g_MP3Cosine8, g_MP3Cosine4 }
 Array of cosine points.
 
const uint32_float_t g_MP3FHTCosines [4][2]
 4 pairs of FHT cosine/sine values for MP3 encoding
 
const uint32_float_t g_MP3DCT36Constants [18]
 MP3 Layer 3 table for MP3DCT36.
 
const uint32_float_t g_MP3DCT12Constants [3]
 MP3 Layer 3 table for 0.5 / cos((Burger::g_dPi * (i*2+1)) / 12.0)
 
const uint8_t g_pscclr4dx9 []
 
const uint8_t g_pstex2clr4dx9 []
 
const uint8_t g_pstexturedx9 []
 
const uint8_t g_pstexturecolordx9 []
 
const uint8_t g_vs20pos22ddx9 []
 
const uint8_t g_vs20pos2tex2clr42ddx9 []
 
const uint8_t g_vs20sprite2ddx9 []
 
const uint8_t g_vsstaticpositiondx9 []
 
const char g_glDiffuseTexture [15]
 (OpenGL only) "DiffuseTexture"
 
const char g_glPosition [9]
 (OpenGL only) "Position"
 
const char g_glTexcoord [9]
 (OpenGL only) "Texcoord"
 
const char g_glColor [6]
 (OpenGL only) "Color"
 
const char g_glViewProjectionMatrix [21]
 (OpenGL only) "ViewProjectionMatrix"
 
const char g_glXYWidthHeight [14]
 (OpenGL only) "XYWidthHeight"
 
const char g_pscclr4gl []
 
const char g_pstex2clr4gl []
 
const char g_pstexturegl []
 
const char g_pstexturecolorgl []
 
const char g_vs20pos22dgl []
 
const char g_vs20pos2tex2clr42dgl []
 
const char g_vs20sprite2dgl []
 
const char g_vsstaticpositiongl []
 
const uint32_t g_pscclr4360 []
 
const uint32_t g_pstex2clr4360 []
 
const uint32_t g_pstexture360 []
 
const uint32_t g_pstexturecolor360 []
 
const uint32_t g_vs20pos22d360 []
 
const uint32_t g_vs20pos2tex2clr42d360 []
 
const uint32_t g_vs20sprite2d360 []
 
const uint32_t g_vsstaticposition360 []
 
const uint8_t g_pstexturevitaimage []
 
const uint8_t g_pstexturecolorvitaimage []
 
const uint8_t g_vs20sprite2dvitaimage []
 
const uint8_t g_vsstaticpositionvitaimage []
 
const uint_t g_Effect2DMemberDescription []
 Vertex description for Effect2D 2 entries for position 2 entries for UV.
 
const VertexBuffer::VertexAoS_t g_Effect2DDefaultVertexBufferDescription
 Describe the location for Effect2D.
 
const uint_t g_Shader2DColorVertexMemberDescription []
 Vertex description for Shader2DColorVertex 2 entries for position 2 entries for UV 4 entries for color.
 
const VertexBuffer::VertexAoS_t g_Shader2DColorVertexDefaultVertexBufferDescription
 Describe the location for Shader2DColorVertex.
 
const uint_t g_Shader2DCColorMemberDescription []
 Vertex description for Shader2DCColor 2 entries for position.
 
const VertexBuffer::VertexAoS_t g_Shader2DCColorDefaultVertexBufferDescription
 Describe the location for Shader2DCColor.
 

Typedef Documentation

◆ DisplayDefault

◆ Effect2DDefault

◆ EffectPositionColorTextureDefault

◆ EffectPositionTextureDefault

◆ false_type

Static bool constant of false.


A bool_constant set to false.

See also
bool_constant or true_type

◆ float16_t

16 bit float


Typedef that directly maps to a uint16_t to hold in a register, a 16 bit floating point number.

See also
Half

◆ Float80Bit

Burger::Float80Bit

80 bit float(Extended)


This is a type to abstract the 80-bit floating point data type found in the x8087 and 680x0 math co-processors. Currently, this type is hardly used anymore with the exception of the audio frame rate used in AIFF files.

Burgerlib only has functions to read and write this format into double and float.

Note
Use of this data type for runtime math is discouraged and only used for x86 code and AIFF audio file support.

◆ Shader2DCColorDefault

◆ Shader2DColorVertexDefault

◆ SocketType

Cross platform type for a socket.


BSD sockets are either int for most platforms or an unsigned integer the size of a void * for Microsoft Windows. This type is used to handle this platform difference.

◆ ThreadID

Platform Thread ID.


Every thread has a thread identification number. The number itself is not important, and if 0 it means it's invalid. If non-zero, it's a value that is used by the platform to identify a thread. This ID is not a pointer, but an integer value used by the operating system.

See also
Burger::Thread

◆ TLSShutdownProc

Burger::TLSShutdownProc

Callback prototype for TLS shutdown.


typedef void(BURGER_API* TLSShutdownProc)(void *pThis);

When ttls_set(uint32_t, const void*, TLSShutdownProc) is called, the passed pointer can be cleaned up using a callback function that matches this prototype. The data pointer is passed as the pThis parameter to the callback when tls_release() is called.

See also
tls_set(uint32_t, const void*, TLSShutdownProc) or, tls_release()

◆ true_type

Static bool constant of true.


A bool_constant set to true.

See also
bool_constant or false_type

◆ VertexBufferDefault

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
kSleepYield 

Used by sleep_ms(uint32_t) to yield the current time quantum.

kSleepInfinite 

Used by sleep_ms(uint32_t) for an infinite time delay.

◆ e8087Precision

32 bit Intel floating point precision


On Intel 32 bit processors, there's a special floating point register to control the precision of the 80387 compatible FPU

Note
This enumeration only exists on 32 bit Intel compatible CPU targets
See also
set_8087_precision(e8087Precision), get_8087_precision()
Enumerator
k8087Precision24Bit 

Use 24 bit / float precision (DirectX default)

k8087PrecisionInvalid 

Invalid value, do not use.

k8087Precision56Bit 

Use 56 bit / double precision.

k8087Precision64Bit 

Use 64 bit / long double precision (Power up default)

◆ e8087Rounding

32 bit Intel floating point rounding mode


On Intel 32 bit processors, there's a special floating point register to control the rounding mode from float to integer conversions in the 80387 compatible FPU

Note
This enumeration only exists on 32 bit Intel compatible CPU targets
See also
set_8087_rounding(e8087Rounding)
Enumerator
k8087RoundingNearest 

Use round to nearest integer (Banker's rounding)

k8087RoundingDown 

Use get_floor() rounding (-Infinity)

k8087RoundingUp 

Use get_ceiling() rounding (+Infinity)

k8087RoundingTruncate 

Use fraction truncation rounding (To Zero)

◆ eArgumentType

Type stored in this object.


When a ArgumentType object is created, it contains intrinsic data of a specific type. This enumeration lists the type it could be.

Enumerator
kArgumentTypeInvalid 

Invalid argument type.

kArgumentTypeInt8 

Signed 1 byte integer.

kArgumentTypeInt16 

Signed 2 byte integer.

kArgumentTypeInt32 

Signed 4 byte integer.

kArgumentTypeInt64 

Signed 8 byte integer.

kArgumentTypeUInt8 

Unsigned 1 byte integer.

kArgumentTypeUInt16 

Unsigned 2 byte integer.

kArgumentTypeUInt32 

Unsigned 4 byte integer.

kArgumentTypeUInt64 

Unsigned 8 byte integer.

kArgumentTypeFloat16 

16-bit IEEE 754-2008 float, aka binary16

kArgumentTypeFloat32 

32-bit IEEE 754 float

kArgumentTypeFloat64 

64-bit IEEE 754 float

kArgumentTypeBool 

bool C++ built in boolean type

kArgumentTypeVector2 

64-bit SIMD structure

kArgumentTypeVector4 

128-bit SIMD structure

kArgumentTypeVector4Int 

128-bit SIMD structure, integer only

kArgumentTypeVector4Dbl 

128-bit SIMD structure, 2 doubles only

kArgumentTypeBurgerStringPtr 

Burgerlib String.

kArgumentTypeCharPtr 

const char* for a "C" string

kArgumentTypeInt8Ptr 

const signed char* for a "C" string

kArgumentTypeUInt8Ptr 

const unsigned char* for a "C" string

kArgumentTypeInt16Ptr 

Pointer to an int16_t.

kArgumentTypeUInt16Ptr 

Pointer to a uint16_t.

kArgumentTypeInt32Ptr 

Pointer to an int32_t.

kArgumentTypeUInt32Ptr 

Pointer to a uint32_t.

kArgumentTypeInt64Ptr 

Pointer to an int64_t.

kArgumentTypeUInt64Ptr 

Pointer to a uint64_t.

kArgumentTypeFloat32Ptr 

Pointer to a float.

kArgumentTypeFloat64Ptr 

Pointer to a double.

kArgumentTypeBoolPtr 

Pointer to a bool.

kArgumentTypeVector2Ptr 

Pointer to a 64-bit SIMD structure.

kArgumentTypeVector4Ptr 

Pointer to a 128-bit SIMD structure, 4 floats only.

kArgumentTypeVector4IntPtr 

Pointer to a 128-bit SIMD structure, 4 32-bit integers.

kArgumentTypeVector4DblPtr 

Pointer to a 128-bit SIMD structure, 2 doubles only.

kArgumentTypeVoidPtr 

void * for a catchall

kArgumentTypeCount 

Auto list counter, all valid types must appear above this.

kArgumentTypeAny 

Used to indicate 'any valid arg'.

kArgumentTypeFirstInt 

First integer entry.

kArgumentTypeLastInt 

Last integer entry.

kArgumentTypeFirstSigned 

First signed integer entry.

kArgumentTypeLastSigned 

Last signed integer entry.

kArgumentTypeFirstUnsigned 

First unsigned integer entry.

kArgumentTypeLastUnsigned 

Last unsigned integer entry.

kArgumentTypeFirstFloat 

First floating point entry.

kArgumentTypeLastFloat 

Last floating point entry.

kArgumentTypeFirstCString 

First "C" string pointer entry.

kArgumentTypeLastCString 

Last "C" string pointer entry.

kArgumentTypeFirstPointer 

First pointer type entry.

kArgumentTypeLastPointer 

Last pointer type entry.

kArgumentTypeFirstVector 

First SIMD entry.

kArgumentTypeLastVector 

Last SIMD entry.

kArgumentTypeFirstVectorPointer 

First SIMD pointer type entry.

kArgumentTypeLastVectorPointer 

Last SIMD pointer type entry.

◆ eASCIITypeFlag

enum Burger::eASCIITypeFlag : uint8_t

Bit flags to quickly test low ASCII character type.


When g_AsciiTestTable[256] is indexed with a low ASCII character in the range of 0 through 127 inclusive, the value will contain one or more flags to quickly determine the type of ASCII character.

See also
g_AsciiTestTable[256]
Enumerator
ASCII_LOWER 

Lower case character.

ASCII_UPPER 

Upper case character.

ASCII_CONTROL 

Control character.

ASCII_SPACE 

Space character (Tab/CR/LF/FF)

ASCII_WHITESPACE 

Whitespace (Space/Tab only)

ASCII_PUNCTUATION 

Punctuation character.

kASCIITypeFlagHex 

Base 16 numeric character.

ASCII_DIGIT 

Base 10 numeric character.

◆ eError

Decompression error code.

Global error codes.



When a Burgerlib function fails, it will return one of these error codes. If the code returned by the operating system can't be mapped to these codes, it will be returned unmodified instead.

Enumerator
kErrorNone 

No error (Always zero).

kErrorGeneric 

General error.

kErrorInvalidParameter 

Input parameter is invalid.

kErrorInvalidArgument 

Invalid argument in function call.

kErrorNotInitialized 

Class or subsystem not initialized.

kErrorAlreadyInitialized 

Class or subsystem already initialized.

kErrorNotSupported 

Command not supported.

kErrorNotSupportedOnThisPlatform 

Function not supported on this platform.

kErrorVersionMismatch 

Version not supported.

kErrorItemNotFound 

Item searched for was not found.

kErrorNotReady 

Not ready yet.

kErrorOutOfEntries 

Fixed array is out of entries.

kErrorOutOfBounds 

Index is beyond the allowed range.

kErrorFailedTest 

Failed unit test.

kErrorDuplicateEntries 

Data was found more than once.

kErrorRestartRequired 

Restart is required.

kErrorFile 

File system errors.

kErrorFileNotFound 

File not found.

kErrorPathNotFound 

Directory to file not found.

kErrorVolumeNotFound 

Volume not found.

kErrorWriteProtected 

Write access was not granted.

kErrorNoMoreFileDescriptors 

No more file descriptors are available.

kErrorFileTableOverflow 

System file table overflow.

kErrorDirectoryNotEmpty 

Files are present in the directory.

kErrorNotAFile 

Operation attempted on an object that wasn't a file.

kErrorNotADirectory 

Operation attempted on an object that wasn't a directory.

kErrorFileExists 

File already exists.

kErrorOpenFailure 

Failed on opening.

kErrorReadFailure 

Failed on reading data.

kErrorWriteFailure 

Failed on writing data.

kErrorSeekFailure 

File or stream seek operation failed.

kErrorAccessDenied 

Permission not granted to perform operation.

kErrorResourceNotFound 

Data resource not found.

kErrorIO 

IO Error.

kErrorEndOfFile 

End of file.

kErrorIsLocked 

File object is locked.

kErrorMemory 

Memory system errors.

kErrorOutOfMemory 

Not enough memory to perform operation.

kErrorDataCorruption 

Data isn't valid or memory overrun detected.

kErrorBadAlignment 

Data wasn't aligned on a proper byte boundary.

kErrorNoData 

No data remaining.

kErrorBufferTooSmall 

Buffer not large enough for operation.

kErrorBufferTooLarge 

Buffer is too large for this operation.

kErrorAudio 

Sound system errors.

kErrorAudioDriverFailure 

Audio driver failed.

kErrorAudioFormatNotSupported 

Audio data format is not supported by the driver.

kErrorNetwork 

Network errors.

kErrorCancelled 

User cancelled.

kErrorRefused 

Operation was refused.

kErrorNetworkFailure 

Network hardware or software failure.

kErrorDataStarvation 

Data required for stream was not available in time.

kErrorSocketFailure 

Network socket failure.

kErrorAcceptFailure 

Failed on accepting a connection.

kErrorAddressNotFound 

Network address not found.

kErrorFlowInterrupted 

Network flow interrupted (Or blocked)

kErrorVideo 

Video and shader errors.

kErrorColorDepthNotSupported 

Color depth requested is not available on current hardware.

kErrorResolutionNotSupported 

Requested display resolution is not available on current hardware.

kErrorGPUFailure 

GPU hardware fault.

kErrorShaderCompile 

Shader didn't compile.

kErrorShaderIncludeMissing 

Shader has a bad include.

kErrorOutOfVideoMemory 

Out of video memory.

kErrorPalette 

Palette upload failure.

kErrorThread 

Thread and process errors.

kErrorTimeout 

Operation timed out.

kErrorEnumerationInProgress 

Enumeration operation is in progress.

kErrorNotEnumerating 

Enumeration operation isn't running.

kErrorCantLock 

Thread lock failure.

kErrorCantUnlock 

Thread unlock failure.

kErrorThreadNotStarted 

Thread couldn't start.

kErrorThreadAlreadyStarted 

Thread already in progress.

kErrorThreadCantStop 

Thread won't stop.

kErrorThreadNotFound 

Thread not found.

kErrorThreadNotModified 

Thread not modified.

◆ eEvent

Enumeration for input events.


Enumerator
EVENT_NULL 

Keyboard null event.

EVENT_TIMER 

Keyboard timer event.

EVENT_KEYDOWN 

Keyboard keypress event.

EVENT_KEYUP 

Keyboard key up event.

EVENT_KEYAUTO 

Keyboard repeated key event.

EVENT_MOUSEDOWN 

Mouse button down event.

EVENT_MOUSEUP 

Mouse button up event.

EVENT_MOUSEMOVE 

Mouse motion event.

EVENT_MOUSEPOSITION 

Mouse position event.

EVENT_MOUSEWHEEL 

Mouse wheel event.

EVENT_JOYPADDOWN 

Joypad button press.

EVENT_JOYPADUP 

Joypad button release.

EVENT_JOYPADAXIS 

Joypad axis motion.

EVENT_COUNT 

Maximum event code.

◆ eHintFlags

Flags to enable/disable underlying code.


Some underlying code in Burgerlib may or may not cause issues with higher level code, such as throwing exception, debugger integration which can cause issues. These flags will enable or disable these underlying features.

See also
get_hintflags(), set_hintflags(uint32_t), or Win32::throw_thread_naming_exception(uint32_t, const char*)
Enumerator
kHintWin32DisableThreadNamingException 

Disable the throwing of an exception to name a thread.

◆ eNetworkProtocol

ID codes for supported Network protocols.


For each NetworkModule class, there is a unique ID code for that protocol. Not all protocols are supported on all platforms.

TCP/IP is the only protocol supported by a majority of platforms.

See also
NetworkModule
Enumerator
kNetworkProtocolAppleTalk 

Module is AppleTalk.

kNetworkProtocolIP 

Module is TCP/IP (Both IPv4 and IPv6)

kNetworkProtocolIPX 

Module is IPX/SPX.

kNetworkProtocolBonjour 

Module is TCP/IP using Bonjour.

kNetworkProtocolSteam 

Module is Steam.

kNetworkProtocolXBoxLive 

Module is Xbox Live.

kNetworkProtocolUnknown 

Module is not loaded or defined.

kNetworkProtocolCount 

Number of valid module types.

◆ eNumericConversionFlags

Bit flags to control numeric text generation.


The functions that convert a float or integer into an ASCII string use these flags to suppress the output of the terminating zero and/or leading zeros. The default behavior is that a zero is output as the last character so that the string is a valid "C" string and no leading ASCII zeros.

See also
NumberToAscii(char *,uint32_t,uint_t)
Enumerator
NOENDINGNULL 

Pass this flag to disable storing a terminating zero.

LEADINGZEROS 

Pass this flag to enable leading ASCII zeros output.

◆ ePowerPCRounding

PowerPC floating point rounding mode.


On PowerPC processors, there's a special floating point register to control the rounding mode when precision is lost.

Note
This enumeration only exists on PowerPC compatible CPU targets
See also
set_PowerPC_rounding(ePowerPCRounding)
Enumerator
kPPCRoundingNearest 

Use round to nearest integer (Banker's rounding)

kPPCRoundingTruncate 

Use fraction truncation rounding (To Zero)

kPPCRoundingUp 

Use get_ceiling() rounding (+Infinity)

kPPCRoundingDown 

Use get_floor() rounding (-Infinity)

◆ eSocketFlags

Flags for socket types.


Network sockets come in two types, guaranteed in order delivery and out of order. These bit flags are used to determine which types are needed to be connected to a port.

See also
eSocketIndexes, NetworkEndpoint and NetworkModule
Enumerator
kSocketFlagDatagram 

Flag for datagram mode.

kSocketFlagStream 

Flag for stream mode.

kSocketFlagAll 

Flag for all modes.

kSocketFlagNone 

Flag for no modes.

◆ eSocketIndexes

Number of types of sockets available.


Network sockets come in two types, guaranteed in order delivery and out of order. This enum enumerates these types.

See also
eSocketFlags, NetworkEndpoint and NetworkModule
Enumerator
kSocketIndexDatagram 

Index to the socket for datagrams.

kSocketIndexStream 

Index to the socket for streams.

kSocketIndexCount 

Number of sockets allowed for this endpoint.

◆ eThreadPriority

Thread priority setting.


When calling Burger::set_thread_priority(Burger::ThreadID, Burger::eThreadPriority), this is the enumeration used to set the thread priority in a cross platform way.

Note
kThreadPriorityInvalid is used as an error code for functions that fail to retrieve a thread priority.
See also
Burger::Thread, or Burger::set_thread_priority(Burger::ThreadID, Burger::eThreadPriority)
Enumerator
kThreadPriorityInvalid 

Invalid thread priority.

kThreadPriorityLow 

Set thread to only execute when main thread is sleepin.

kThreadPriorityNormal 

Set thread to equal priority to main game thread.

kThreadPriorityHigh 

Set thread priority to higher than main game thread.

kThreadPriorityRealTime 

Set thread priority over everything.

◆ eTraceFlags

Flags to enable debugging features.


Many burgerlib functions allow for logging of information at runtime, and the behavior is enabled by setting these flags. Normally, the default is all flags clear.

See also
get_traceflags(), or set_traceflags(uint32_t)
Enumerator
kTraceFlagMemoryLeak 

Test and display memory leaks.

kTraceFlagRezLoad 

Print the name of a resource file being loaded.

kTraceFlagFileLoad 

Print the name of a file being loaded.

kTraceFlagRaceWarnings 

Print possible errors.

kTraceFlagNetwork 

Print the network commands.

kTraceFlagMessages 

Print operating system messages.

kTraceFlagActiveDebugging 

Actively debugging the code (NEVER SET THIS for applications sent to testers or release)

kTraceFlagAll 

GIVE ME everything!

◆ eUnixFlavor

Enum describing the actual platform Unix is running on.


Enumerator
kUnixUnknown 

Unknown flavor of Linux.

kUnixNative 

Native Linux distribution.

kUnixMSYS2 

Linux running under MSYS2.

kUnixWSL 

Linux running under Windows Subsystem for Linux.

kUnixCygwin 

Linux running under Cygwin.

kUnixMacOSX 

Unix running as MacOSX.

kUnixiOS 

Unix running as iOS.

kUnixAndroid 

Linux running under Android.

kUnixStadia 

Linux running under Google Stadia.

◆ eXInputDeadZoneType

Enumerator
XINPUTDEADZONE_NONE 

Don't apply a dead zone.

XINPUTDEADZONE_CARDINAL 

Apply an axis based dead zone.

XINPUTDEADZONE_CENTER 

Apply an x/y based dead zone.

Function Documentation

◆ _load_unaligned() [1/5]

double BURGER_API Burger::_load_unaligned ( const double * pInput)
externnoexcept

Fetch a double value from memory with byte alignment.


Assuming the data is unaligned, it will grab data a byte at a time and reconstruct it into a double value in native endian.

Parameters
pInputPointer to a double value.
Returns
The double value.
See also
_load_unaligned_swap(const double*), or _load_unaligned(const uint64_t*)

◆ _load_unaligned() [2/5]

float BURGER_API Burger::_load_unaligned ( const float * pInput)
externnoexcept

Fetch a float value from memory with byte alignment.


Assuming the data is unaligned, it will grab data a byte at a time and reconstruct it into a float value in native endian.

Parameters
pInputPointer to a float value.
Returns
The float value.
See also
_load_unaligned_swap(const float*), or _load_unaligned(const uint32_t*)

◆ _load_unaligned() [3/5]

uint16_t BURGER_API Burger::_load_unaligned ( const uint16_t * pInput)
externnoexcept

Fetch a 16 bit unsigned value from memory with byte alignment.


Assuming the data is unaligned, it will grab data a byte at a time and reconstruct it into a 16 bit value in native endian.

Parameters
pInputPointer to a 16 bit value.
Returns
The 16 bit unsigned value.
See also
_load_unaligned_swap(const uint16_t*)

◆ _load_unaligned() [4/5]

uint32_t BURGER_API Burger::_load_unaligned ( const uint32_t * pInput)
externnoexcept

Fetch a 32 bit unsigned value from memory with byte alignment.


Assuming the data is unaligned, it will grab data a byte at a time and reconstruct it into a 32 bit value in native endian.

Parameters
pInputPointer to a 32 bit value.
Returns
The 32 bit unsigned value.
See also
_load_unaligned_swap(const uint32_t*)

◆ _load_unaligned() [5/5]

uint64_t BURGER_API Burger::_load_unaligned ( const uint64_t * pInput)
externnoexcept

Fetch a 64 bit unsigned value from memory with byte alignment.


Assuming the data is unaligned, it will grab data a byte at a time and reconstruct it into a 64 bit value in native endian.

Parameters
pInputPointer to a 64 bit value.
Returns
The 64 bit unsigned value.
See also
_load_unaligned_swap(const uint64_t*)

◆ _load_unaligned_swap() [1/5]

double BURGER_API Burger::_load_unaligned_swap ( const double * pInput)
externnoexcept

Fetch a 64 bit reverse endian float from memory with byte alignment.


Given a pointer to a 64-bit floating point value, load it and swap the bytes so that 0x123456789ABCDEF0 becomes 0xF0DEBC9A78563412. The pointer does not have to be 64-bit aligned. uint8_t alignment is acceptable.

Parameters
pInputPointer to the value to endian convert
Returns
The value with the bytes swapped.
Note
nullptr pointers are illegal and will page fault.
See also
_load_unaligned(const double *)

◆ _load_unaligned_swap() [2/5]

float BURGER_API Burger::_load_unaligned_swap ( const float * pInput)
externnoexcept

Fetch a 32 bit reverse endian float from memory with byte alignment.


Given a pointer to a 32-bit floating point value, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 32-bit aligned. uint8_t alignment is acceptable.

Parameters
pInputPointer to the value to endian convert
Returns
The value with the bytes swapped.
Note
nullptr pointers are illegal and will page fault.
See also
_load_unaligned(const float *)

◆ _load_unaligned_swap() [3/5]

uint16_t BURGER_API Burger::_load_unaligned_swap ( const uint16_t * pInput)
externnoexcept

Fetch a 16 bit unsigned reverse endian integer from memory with byte alignment.


Given a pointer to a 16 bit value, load it and swap the bytes so that 0x1234 becomes 0x3412. The pointer does not have to be 16-bit aligned. uint8_t alignment is acceptable.

Parameters
pInputPointer to a value to endian convert
Returns
The value with the bytes swapped.
Note
nullptr pointers are illegal and will page fault.
See also
_load_unaligned(const uint16_t *)

◆ _load_unaligned_swap() [4/5]

uint32_t BURGER_API Burger::_load_unaligned_swap ( const uint32_t * pInput)
externnoexcept

Fetch a 32 bit unsigned reverse endian integer from memory with byte alignment.


Given a pointer to a 32 bit value, load it and swap the bytes so that 0x12345678 becomes 0x78563412. The pointer does not have to be 32-bit aligned. uint8_t alignment is acceptable.

Parameters
pInputPointer to value to endian convert
Returns
The value with the bytes swapped.
Note
nullptr pointers are illegal and will page fault.
See also
_load_unaligned(const uint32_t *)

◆ _load_unaligned_swap() [5/5]

uint64_t BURGER_API Burger::_load_unaligned_swap ( const uint64_t * pInput)
externnoexcept

Fetch a 64 bit unsigned reverse endian integer from memory with byte alignment.


Assuming the data is unaligned, it will grab data a byte at a time and reconstruct it into a 64 bit value in reverse endian. The pointer does not have to be 64-bit aligned. uint8_t alignment is acceptable.

Parameters
pInputPointer to a 64 bit value.
Returns
The value with the bytes swapped.
Note
nullptr pointers are illegal and will page fault.
See also
_load_unaligned(const uint64_t*)

◆ _store_unaligned() [1/5]

void BURGER_API Burger::_store_unaligned ( double * pOutput,
double dInput )
externnoexcept

Store a double value to memory with byte alignment.


Assuming the output pointer is unaligned, it will store data a byte at a time into a 64 bit float value in native endian.

Parameters
pOutputPointer to a double value.
dInputThe double value.
See also
_store_unaligned_swap(double*,double).

◆ _store_unaligned() [2/5]

void BURGER_API Burger::_store_unaligned ( float * pOutput,
float fInput )
externnoexcept

Store a float value to memory with byte alignment.


Assuming the output pointer is unaligned, it will store data a byte at a time into a 32 bit float value in native endian.

Parameters
pOutputPointer to a float value.
fInputThe float value.
See also
_store_unaligned_swap(float*,float)

◆ _store_unaligned() [3/5]

void BURGER_API Burger::_store_unaligned ( uint16_t * pOutput,
uint16_t uInput )
externnoexcept

Store a 16 bit unsigned value to memory with byte alignment.


Assuming the output pointer is unaligned, it will store data a byte at a time into a 16 bit value in native endian.

Parameters
pOutputPointer to a 16 bit value.
uInputThe 16 bit unsigned value.
See also
_store_unaligned_swap(uint16_t*,uint16_t)

◆ _store_unaligned() [4/5]

void BURGER_API Burger::_store_unaligned ( uint32_t * pOutput,
uint32_t uInput )
externnoexcept

Store a 32 bit unsigned value to memory with byte alignment.


Assuming the output pointer is unaligned, it will store data a byte at a time into a 32 bit value in native endian.

Parameters
pOutputPointer to a 32 bit value.
uInputThe 32 bit unsigned value.
See also
_store_unaligned_swap(uint32_t*,uint32_t)

◆ _store_unaligned() [5/5]

void BURGER_API Burger::_store_unaligned ( uint64_t * pOutput,
uint64_t uInput )
externnoexcept

Store a 64 bit unsigned value to memory with byte alignment.


Assuming the output pointer is unaligned, it will store data a byte at a time into a 64 bit value in native endian.

Parameters
pOutputPointer to a 64 bit value.
uInputThe 64 bit unsigned value.
See also
_store_unaligned_swap(uint64_t*,uint64_t)

◆ _store_unaligned_swap() [1/5]

void BURGER_API Burger::_store_unaligned_swap ( double * pOutput,
double dInput )
externnoexcept

Store a double value to memory with endian swapping with byte alignment.


Assuming the output pointer is unaligned, it will store data a byte at a time into a 64 bit float value in reversed endian.

Parameters
pOutputPointer to a double value.
dInputThe double value.
See also
_store_unaligned(double*,double)

◆ _store_unaligned_swap() [2/5]

void BURGER_API Burger::_store_unaligned_swap ( float * pOutput,
float fInput )
externnoexcept

Store a float value to memory with endian swapping with byte alignment.


Assuming the output pointer is unaligned, it will store data a byte at a time into a 32 bit float value in reversed endian.

Parameters
pOutputPointer to a float value.
fInputThe float value.
See also
_store_unaligned(float*, float)

◆ _store_unaligned_swap() [3/5]

void BURGER_API Burger::_store_unaligned_swap ( uint16_t * pOutput,
uint16_t uInput )
externnoexcept

Store a 16 bit unsigned value with endian swapping to memory with byte alignment.


Assuming the output pointer is unaligned, it will store data a byte at a time into a 16 bit value in reversed endian.

Parameters
pOutputPointer to a 16 bit value.
uInputThe 16 bit unsigned value.
See also
_store_unaligned(uint16_t*,uint16_t)

◆ _store_unaligned_swap() [4/5]

void BURGER_API Burger::_store_unaligned_swap ( uint32_t * pOutput,
uint32_t uInput )
externnoexcept

Store a 32 bit unsigned value with endian swapping to memory with byte alignment.


Assuming the output pointer is unaligned, it will store data a byte at a time into a 32 bit value in reversed endian.

Parameters
pOutputPointer to a 32 bit value.
uInputThe 32 bit unsigned value.
See also
_store_unaligned(uint32_t*, uint32_t)

◆ _store_unaligned_swap() [5/5]

void BURGER_API Burger::_store_unaligned_swap ( uint64_t * pOutput,
uint64_t uInput )
externnoexcept

Store a 64 bit unsigned value with endian swapping to memory with byte alignment.


Assuming the output pointer is unaligned, it will store data a byte at a time into a 64 bit value in reversed endian.

Parameters
pOutputPointer to a 64 bit value.
uInputThe 64 bit unsigned value.
See also
_store_unaligned(uint64_t*,uint64_t)

◆ _swapendiandouble() [1/2]

double BURGER_API Burger::_swapendiandouble ( const double * pInput)
externnoexcept

Swap endian of a 64 bit float.


Reverse the endian of a 64 bit float. Implemented in assembly on some platforms.

Parameters
pInputPointer to the value to return endian swapped
Returns
Input endian swapped
See also
_swapendiandouble(double), SwapEndian::load(T)

◆ _swapendiandouble() [2/2]

double BURGER_API Burger::_swapendiandouble ( double dInput)
externnoexcept

Swap endian of a 64 bit float.


Reverse the endian of a 64 bit float. Implemented in assembly on some platforms.

Note
It's recommended to use the pointer versions of this function because they guarantee bit accurate endian swaps. Some CPUs will modify floating point values if endian swapped if they convert to a NaN.
Parameters
dInputThe value to return endian swapped
Returns
Input endian swapped
See also
_swapendiandouble(const double*), SwapEndian::load(T)

◆ _swapendianfloat() [1/2]

float BURGER_API Burger::_swapendianfloat ( const float * pInput)
externnoexcept

Swap endian of a 32 bit float from a pointer.


Reverse the endian of a 32 bit float. Implemented in assembly on some platforms.

Parameters
pInputPointer to the value to return endian swapped
Returns
Input endian swapped
See also
_swapendianfloat(float), SwapEndian::load(T)

◆ _swapendianfloat() [2/2]

float BURGER_API Burger::_swapendianfloat ( float fInput)
externnoexcept

Swap endian of a 32 bit float.


Reverse the endian of a 32 bit float. Implemented in assembly on some platforms.

Note
It's recommended to use the pointer versions of this function because they guarantee bit accurate endian swaps. Some CPUs will modify floating point values if endian swapped if they convert to a NaN.
Parameters
fInputThe value to return endian swapped
Returns
Input endian swapped
See also
_swapendianfloat(const float*), SwapEndian::load(T)

◆ absolute() [1/6]

double BURGER_API Burger::absolute ( double dInput)
externnoexcept

Get the absolute value of a double.


Return the absolute value of the floating point input. This is usually done by inline assembly.

Note
-Inf will return +Inf. NaN is undefined
Parameters
dInputA valid double precision floating point number.
Returns
The absolute value of the input.
See also
absolute(int32_t), absolute(int64_t) and absolute(float)

◆ absolute() [2/6]

float BURGER_API Burger::absolute ( float fInput)
externnoexcept

Get the absolute value of a float.


Return the absolute value of the floating point input. This is usually done by inline assembly.

Note
-Inf will return +Inf. NaN is undefined
Parameters
fInputA valid single precision floating point number.
Returns
The absolute value of the input.
See also
absolute(int32_t), absolute(int64_t) and absolute(double)

◆ absolute() [3/6]

int16_t Burger::absolute ( int16_t iInput)
inlinenoexcept

Get the absolute value of an integer.


Without branching, calculate the absolute value of an integer.

Parameters
iInputValue to get the absolute value of.
Returns
The absolute value of iInput.
See also
absolute(int8_t), absolute(int32_t), absolute(int64_t), absolute(float) and absolute(double)

◆ absolute() [4/6]

int32_t Burger::absolute ( int32_t iInput)
inlinenoexcept

Get the absolute value of an integer.


Without branching, calculate the absolute value of an integer.

Parameters
iInputValue to get the absolute value of.
Returns
The absolute value of iInput.
See also
absolute(int8_t), absolute(int16_t), absolute(int64_t), absolute(float) and absolute(double)

◆ absolute() [5/6]

int64_t Burger::absolute ( int64_t iInput)
inlinenoexcept

Get the absolute value of a 64 bit integer.


Without branching, calculate the absolute value of an integer.

Parameters
iInputValue to get the absolute value of.
Returns
The absolute value of iInput.
See also
absolute(int8_t), absolute(int16_t), absolute(int32_t), absolute(float) and absolute(double)

◆ absolute() [6/6]

int8_t Burger::absolute ( int8_t iInput)
inline

Get the absolute value of an integer.


Without branching, calculate the absolute value of an integer.

Parameters
iInputValue to get the absolute value of.
Returns
The absolute value of iInput.
See also
absolute(int16_t), absolute(int32_t), absolute(int64_t), absolute(float) and absolute(double)

◆ Alloc()

void *BURGER_API Burger::Alloc ( uintptr_t uSize)
externnoexcept

Allocate memory.


Allocate memory using the GlobalMemoryManager

Parameters
uSizeNumber of bytes requested to allocate
Returns
nullptr if no bytes are requested or an out of memory condition exists.
See also
Burger::alloc_clear() or Burger::Free()

◆ alloc_clear()

void *BURGER_API Burger::alloc_clear ( uintptr_t uSize)
externnoexcept

Allocate memory that is preinitialized to zero.


Allocate memory using the Burger::GlobalMemoryManager. If the allocation was successful, initialize all the memory to zero.

Parameters
uSizeNumber of bytes requested to allocate
Returns
nullptr if no bytes are requested or of an out of memory condition exists.
See also
Burger::Alloc() or Burger::Free()

◆ alloc_copy()

void *BURGER_API Burger::alloc_copy ( const void * pInput,
uintptr_t uSize )
externnoexcept

Allocate a buffer and copy data into it.


Allocate memory and copy the contents of the pointer to the new memory

Parameters
pInputPointer to the data to copy. nullptr will leave the data uninitialized
uSizeSize of the buffer to allocate.
Returns
nullptr on failure, a pointer with the data on success
See also
Burger::Alloc() or Burger::Realloc()

◆ alloc_platform_memory()

void *BURGER_API Burger::alloc_platform_memory ( uintptr_t uSize)
externnoexcept

Allocate memory from the underlying operating system.


The handle based memory manager obtains the memory it controls from the operating system. Generic systems call malloc(), other systems call the low level functions directly

On MacOS, this calls NewPtr(), Windows calls HeapAlloc(), etc...

Parameters
uSizeNumber of bytes requested from the operating system
Returns
Pointer to memory allocated from the operating system
See also
free_platform_memory(const void *)

◆ amplitude_ratio_to_decibels()

float BURGER_API Burger::amplitude_ratio_to_decibels ( float fVolume)
externnoexcept

Convert a XAudio2 Amplitude multiplier to a DirectSound decibel value.


Convert the volume of 0.0f to 1.0f into decibels from -10000 to 0

Parameters
fVolumein the form of 0.0f to 1.0f in the scale needed for XAudio2 GetVolume()
Returns
DirectSound decibels from -10000 to 0.
See also
decibels_to_amplitude_ratio(float)

◆ AsciiHexToInteger() [1/2]

uint32_t BURGER_API Burger::AsciiHexToInteger ( const char * pInput,
uintptr_t uLength )
externnoexcept

Convert hex ASCII string to an integer.


Scan a hex string and return a 32 bit unsigned integer

Parsing ends either when characters are exhausted of if a non-ASCII character is found. Overflow returns BURGER_MAXUINT

Parameters
pInputPointer to the ASCII string
uLengthLength of the string in bytes
Returns
0 if the string is invalid, or the hex value
See also
AsciiHexToInteger(const uint16_t *,uintptr_t)

◆ AsciiHexToInteger() [2/2]

uint32_t BURGER_API Burger::AsciiHexToInteger ( const uint16_t * pInput,
uintptr_t uLength )
externnoexcept

Convert hex UTF-16 string to an integer.


Scan a hex string and return a 32 bit unsigned integer

Parsing ends either when characters are exhausted of if a non-ASCII character is found. Overflow returns BURGER_MAXUINT

Parameters
pInputPointer to the UTF-16 string
uLengthLength of the string in bytes
Returns
0 if the string is invalid, or the hex value
See also
AsciiHexToInteger(const char *,uintptr_t)

◆ AsciiToBoolean() [1/3]

uint_t BURGER_API Burger::AsciiToBoolean ( const char * pInput,
const char ** pDest = nullptr )
externnoexcept

Convert an ASCII string into a boolean.


If the case insensitive string matches yes, no, true or false, return 1,0,1,0 in that order. Otherwise, parse it as a number and return 1 if it's non-zero and 0 if it's zero or invalid.

String matching does not look for ending whitespace, so true and true value will both match as "true" and return 1. The pDest return value will be moved forward by four characters in both cases.

Parameters
pInputPointer to the string to convert. nullptr will page fault.
pDestPointer to a const char * that will either be given pInput (Error) of pInput moved ahead until a non-numeric character was found. This can be nullptr if the application doesn't require the location of the string after the integer was parsed.
Returns
0 if no, false, ASCII 0 or invalid input. 1 if yes, true or a non-zero numeric value.
See also
AsciiToInteger(const char *,const char **) or AsciiToBoolean(const char ,uint_t)

◆ AsciiToBoolean() [2/3]

uint_t BURGER_API Burger::AsciiToBoolean ( const char * pInput,
uint_t bDefault )
externnoexcept

Convert an ASCII string into a boolean.


Convert the string to a TRUE or a FALSE. If the input is nullptr or invalid, return the default value.

"true" and "yes" are considered TRUE while "false" and "no" are considered FALSE. The comparison is case insensitive.

Parameters
pInputPointer to the string to convert. nullptr will force the default
bDefaultDefault boolean to return in the event of a parsing error.
Returns
TRUE or FALSE
See also
AsciiToBoolean(const char *,const char **)

◆ AsciiToBoolean() [3/3]

uint_t BURGER_API Burger::AsciiToBoolean ( uint_t * pOutput,
const char * pInput )
externnoexcept

Convert an ASCII string into a boolean and signal if successful.


Convert the string to a TRUE or a FALSE. If the input is nullptr or invalid, return FALSE.

"true" and "yes" are considered TRUE while "false" and "no" are considered FALSE. The comparison is case insensitive.

Parameters
pOutputPointer to the value to return
pInputPointer to the string to convert. nullptr will force the default
Returns
TRUE if a value was parsed, FALSE if the ASCII string was not a boolean
See also
AsciiToBoolean(const char *,const char **) or AsciiToBoolean(const char ,uint_t)

◆ AsciiToDouble() [1/4]

double BURGER_API Burger::AsciiToDouble ( const char * pInput,
const char ** pDest = nullptr )
externnoexcept

Convert an ASCII string into a floating point number.


Take a floating point number of the format (+/-)303.030e(+/-)1 and turn it into a double that is the equivalent.

If a number is parsed, the character at the end of the string after whitespace is removed is the one pointed by pDest.

Examples:
1.0
1.666
1666.4
1e3 -> 1000
NAN -> NAN
INF -> INF

Note
A 64 bit floating point number is of the range 1.797693134862316e+308 (Max) to 2.225073858507201e-308 (min).
This function is not recommended for use on the PlayStation 2 due to its heavy use of double operations. Use Burger::AsciiToFloat(const char ,const char **) instead.
Parameters
pInputPointer to the ASCII string with the number to parse.
pDestPointer to receive the character beyond the last character parsed. Will equal pInput on error.
Returns
The number as a double.
See also
Burger::AsciiToFloat(const char *,const char **) or Burger::AsciiToInteger(const char *,const char **)

◆ AsciiToDouble() [2/4]

double BURGER_API Burger::AsciiToDouble ( const char * pInput,
double dDefault )
externnoexcept

Return a 64 bit floating point value.


Scan the value string as a 64 bit floating point numeric value and if successful, return it. If it's not a number, return the default.

If NaN or Inf is detected, it will be converted to a zero to prevent floating point issues.

Parameters
pInputPointer to the string to convert. nullptr will force the default
dDefaultValue to return on error
Returns
Value or dDefault
See also
AsciiToDouble(const char *,const char **) or AsciiToFloat(const char ,float)

◆ AsciiToDouble() [3/4]

double BURGER_API Burger::AsciiToDouble ( const char * pInput,
double dDefault,
double dMin,
double dMax )
externnoexcept

Return a 64 bit floating point value.


Scan the value string as a 64 bit floating point numeric value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.

If NaN or Inf is detected, it will be converted to a zero to prevent floating point issues.

Parameters
pInputPointer to the string to convert. nullptr will force the default
dDefaultValue to return on error
dMinMinimum acceptable value
dMaxMaximum acceptable value
Returns
Value in between dMin and dMax or dDefault
See also
AsciiToDouble(const char *,const char **) or AsciiToFloat(const char ,float,float,float)

◆ AsciiToDouble() [4/4]

uint_t BURGER_API Burger::AsciiToDouble ( double * pOutput,
const char * pInput )
externnoexcept

Return a 64 bit floating point value and signal if successful.


Scan the value string as a 64 bit floating point numeric value and if successful, return TRUE. If it's not a number, return FALSE.

Parameters
pOutputPointer to the value to return
pInputPointer to the string to convert. nullptr will force the default
Returns
TRUE if a value was parsed, FALSE if the ASCII string was not a 64 bit float
See also
AsciiToDouble(const char *,const char **) or AsciiToFloat(float *,const char *)

◆ AsciiToFloat() [1/4]

float BURGER_API Burger::AsciiToFloat ( const char * pInput,
const char ** pDest = nullptr )
externnoexcept

Convert an ASCII string into a floating point number.


Take a floating point number of the format (+/-)303.030e(+/-)1 and turn it into a float that is the equivalent.

If a number is parsed, the character at the end of the string after whitespace is removed is the one pointed by pDest.

Examples:
1.0
1.666
1666.4
1e3 -> 1000
NAN -> NAN
INF -> INF

Note
A 32 bit floating point number is of the range 3.402823e+38 (Max) to 1.175494e-38 (min).
Parameters
pInputPointer to the ASCII string with the number to parse.
pDestPointer to receive the character beyond the last character parsed. Will equal pInput on error.
Returns
The number as a float.
See also
Burger::AsciiToDouble(const char *,const char **) or Burger::AsciiToInteger(const char *,const char **)

◆ AsciiToFloat() [2/4]

float BURGER_API Burger::AsciiToFloat ( const char * pInput,
float fDefault )
externnoexcept

Return a floating point value.


Scan the value string as a 32 bit floating point numeric value and if successful, return it. If it's not a number, return the default.

If NaN or Inf is detected, it will be converted to a zero to prevent floating point issues.

Parameters
pInputPointer to the string to convert. nullptr will force the default
fDefaultValue to return on error
Returns
Value parsed or fDefault
See also
AsciiToFloat(const char *,const char **) or AsciiToDouble(const char ,double)

◆ AsciiToFloat() [3/4]

float BURGER_API Burger::AsciiToFloat ( const char * pInput,
float fDefault,
float fMin,
float fMax )
externnoexcept

Return a floating point value.


Scan the value string as a 32 bit floating point numeric value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.

If NaN or Inf is detected, it will be converted to a zero to prevent floating point issues.

Parameters
pInputPointer to the string to convert. nullptr will force the default
fDefaultValue to return on error
fMinMinimum acceptable value
fMaxMaximum acceptable value
Returns
Value in between fMin and fMax or fDefault
See also
AsciiToFloat(const char *,const char **) or AsciiToDouble(const char ,double,double,double)

◆ AsciiToFloat() [4/4]

uint_t BURGER_API Burger::AsciiToFloat ( float * pOutput,
const char * pInput )
externnoexcept

Return a floating point value and signal if successful.


Scan the value string as a 32 bit floating point numeric value and if successful, return TRUE. If it's not a number, return FALSE.

Parameters
pOutputPointer to the value to return
pInputPointer to the string to convert. nullptr will force the default
Returns
TRUE if a value was parsed, FALSE if the ASCII string was not a 32 bit float
See also
AsciiToFloat(const char *,const char **) or AsciiToDouble(double *,const char *)

◆ AsciiToInteger() [1/3]

uint32_t BURGER_API Burger::AsciiToInteger ( const char * pInput,
const char ** pDest = nullptr )
externnoexcept

Convert an ASCII string into an integer.


Take a string formatted as a simple integer number a hex number of the form $5123 or 0x1234 with or without a preceding '-' sign and convert it into a 32 bit integer value.

Overflow is detected and is considered an error condition. 0xFFFFFFFFU will be returned in this case.

Parameters
pInputPointer to the string to convert. nullptr will page fault.
pDestPointer to a const char * that will either be given pInput (Error) of pInput moved ahead until a non-numeric character was found. This can be nullptr if the application doesn't require the location of the string after the integer was parsed.
Returns
A 32 bit integer that represents the ASCII string. Will be 0xFFFFFFFF if an overflow occurred and 0 if nothing could be parsed.
See also
Burger::AsciiToFloat(const char *,const char **) or Burger::AsciiToDouble(const char *,const char **)

◆ AsciiToInteger() [2/3]

int_t BURGER_API Burger::AsciiToInteger ( const char * pInput,
int_t iDefault,
int_t iMin = INT32_MIN,
int_t iMax = INT32_MAX )
externnoexcept

Return a signed integer value.


Scan the value string as a 32 bit signed integer or hex value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.

Hex strings are acceptable input in the form of $1234 and 0x1234. 0xFFFFFFFF will be converted to -1.

Parameters
pInputPointer to the string to convert. nullptr will force the default
iDefaultValue to return on error
iMinMinimum acceptable value
iMaxMaximum acceptable value
Returns
Value in between iMin and iMax or iDefault
See also
AsciiToInteger(const char *,const char **) or AsciiToWord(const char ,uint_t,uint_t,uint_t)

◆ AsciiToInteger() [3/3]

uint_t BURGER_API Burger::AsciiToInteger ( uint32_t * pOutput,
const char * pInput )
externnoexcept

Convert a 32 bit integer and signal if successful.


Scan the value string as a 32 bit integer or hex value and if successful, return TRUE.

Hex strings are acceptable input in the form of $1234 and 0x1234. 0xFFFFFFFF will be converted to -1.

Parameters
pOutputPointer to the value to return
pInputPointer to the string to convert. nullptr will force the default
Returns
TRUE if a value was parsed, FALSE if the ASCII string was not a number
See also
AsciiToInteger(const char *,const char **) or AsciiToInteger(const char *,int_t,int_t,int_t)

◆ AsciiToInteger64() [1/3]

uint64_t BURGER_API Burger::AsciiToInteger64 ( const char * pInput,
const char ** pDest = nullptr )
externnoexcept

Convert an ASCII string into a 64 bit integer.


Take a string formatted as a simple integer number, a hex number of the form $5123 or 0x1234 with or without a preceding '-' sign and convert it into a 64 bit integer value.

Overflow is detected and is considered an error condition. 0xFFFFFFFFFFFFFFFFU will be returned in this case.

Parameters
pInputPointer to the string to convert. nullptr will page fault.
pDestPointer to a const char * that will either be given pInput (Error) of pInput moved ahead until a non-numeric character was found. This can be nullptr if the application doesn't require the location of the string after the integer was parsed.
Returns
A 64 bit integer that represents the ASCII string. Will be 0xFFFFFFFF if an overflow occurred and 0 if nothing could be parsed.
See also
Burger::AsciiToFloat(const char *,const char **) or Burger::AsciiToDouble(const char *,const char **)

◆ AsciiToInteger64() [2/3]

int64_t BURGER_API Burger::AsciiToInteger64 ( const char * pInput,
int64_t iDefault,
int64_t iMin = INT64_MIN,
int64_t iMax = INT64_MAX )
externnoexcept

Return a signed integer value.


Scan the value string as a 64 bit signed integer or hex value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.

Hex strings are acceptable input in the form of $1234 and 0x1234. 0xFFFFFFFFFFFFFFFF will be converted to -1.

Parameters
pInputPointer to the string to convert. nullptr will force the default
iDefaultValue to return on error
iMinMinimum acceptable value
iMaxMaximum acceptable value
Returns
Value in between iMin and iMax or iDefault
See also
AsciiToInteger64(const char *,const char **) or AsciiToWord64(const char ,uint64_t,uint64_t,uint64_t)

◆ AsciiToInteger64() [3/3]

uint_t BURGER_API Burger::AsciiToInteger64 ( uint64_t * pOutput,
const char * pInput )
externnoexcept

Convert a 64 bit integer and signal if successful.


Scan the value string as a 64 bit integer or hex value and if successful, return TRUE.

Hex strings are acceptable input in the form of $1234 and 0x1234. 0xFFFFFFFFFFFFFFFF will be converted to -1.

Parameters
pOutputPointer to the value to return
pInputPointer to the string to convert. nullptr will force the default
Returns
TRUE if a value was parsed, FALSE if the ASCII string was not a number
See also
AsciiToInteger64(const char *,const char **) or AsciiToInteger64(const char *,int64_t,int64_t,int64_t)

◆ AsciiToWord()

uint_t BURGER_API Burger::AsciiToWord ( const char * pInput,
uint_t uDefault,
uint_t uMin = 0,
uint_t uMax = 0xFFFFFFFFU )
externnoexcept

Return an unsigned integer value.


Scan the value string as a 32 bit unsigned integer or hex value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.

Hex strings are acceptable input in the form of $1234 and 0x1234

Parameters
pInputPointer to the string to convert. nullptr will force the default
uDefaultValue to return on error
uMinMinimum acceptable value
uMaxMaximum acceptable value
Returns
Value in between uMin and uMax or uDefault
See also
AsciiToInteger(const char *,const char **) or AsciiToInteger(const char ,int_t,int_t,int_t)

◆ AsciiToWord64()

uint64_t BURGER_API Burger::AsciiToWord64 ( const char * pInput,
uint64_t uDefault,
uint64_t uMin = 0,
uint64_t uMax = 0xFFFFFFFFFFFFFFFFULL )
externnoexcept

Return an unsigned integer value.


Scan the value string as a 64 bit unsigned integer or hex value and if successful, test it against the valid range and return the value clamped to that range. If it's not a number, return the default.

Hex strings are acceptable input in the form of $1234 and 0x1234

Parameters
pInputPointer to the string to convert. nullptr will force the default
uDefaultValue to return on error
uMinMinimum acceptable value
uMaxMaximum acceptable value
Returns
Value in between uMin and uMax or uDefault
See also
AsciiToInteger64(const char *,const char **) or AsciiToInteger64(const char *,int64_t,int64_t,int64_t)

◆ Assert()

int BURGER_API Burger::Assert ( const char * pCondition,
const char * pFilename,
uint32_t uLineNumber )
externnoexcept

Redirect an assert to the application's assert function.


When an assert is fired from the use of the macro BURGER_ASSERT this function is called which redirects to the currently logged assert function. It's global by design.

Prints the message "Assertion from \"%s\" in file %s at line %u.\n", pCondition, pFilename, uLineNumber using Debug::Message(), and then calls invoke_debugger(). If execution continues, it will call Debug::Fatal() with the same message and exit the application.

Note
This function normally does not return and calls Debug::Fatal() or some other shutdown function. If the function returns, usually via manual user input, it will return a conditional override which is usually 0 to match the condition that triggered the assert.
Parameters
pCondition"C" string of the test condition that fired off the assert
pFilenameThe value of the "__FILE__" macro at the location of the BURGER_ASSERT macro
uLineNumberThe value of the "__LINE__" macro at the location of the BURGER_ASSERT macro
Returns
Defaults to 0.
See also
Assert_t::DefaultAssert(), BURGER_ASSERT, or BURGER_ASSERTTEST

◆ atomic_add() [1/2]

uint32_t BURGER_API Burger::atomic_add ( volatile uint32_t * pOutput,
uint32_t uInput )
externnoexcept

Atomically add a 32 bit value to a variable in memory.


For multi-CPU machines, this function will atomically add a value to one stored in memory using appropriate locking for all CPUs. It will return the value before the addition was applied.

Parameters
pOutputPointer to a 32 bit aligned memory location to add a value to
uInput32 bit value to add
Returns
Value that was stored in the variable previously

◆ atomic_add() [2/2]

uint64_t BURGER_API Burger::atomic_add ( volatile uint64_t * pOutput,
uint64_t uInput )
externnoexcept

Atomically add a 64 bit value to a variable in memory.


For multi-CPU machines, this function will atomically add a value to one stored in memory using appropriate locking for all CPUs. It will return the value before the addition was applied.

Parameters
pOutputPointer to a 64 bit aligned memory location to add a value to
uInput64 bit value to add
Returns
Value that was stored in the variable previously

◆ atomic_compare_and_set() [1/2]

uint_t BURGER_API Burger::atomic_compare_and_set ( volatile uint32_t * pOutput,
uint32_t uOld,
uint32_t uNew )
externnoexcept

Atomically swaps a 32 bit value for one in memory.


Atomically swap a value in a memory only if the memory matches the previous value.

Parameters
pOutputPointer to a 32 bit aligned memory location to swap with
uOld32 bit value to compare with the memory location
uNew32 bit value to store if the comparison succeeds
Returns
TRUE if successful, FALSE if the memory is unstable

◆ atomic_compare_and_set() [2/2]

uint_t BURGER_API Burger::atomic_compare_and_set ( volatile uint64_t * pOutput,
uint64_t uOld,
uint64_t uNew )
externnoexcept

Atomically swaps a 64 bit value for one in memory.


Atomically swap a value in a memory only if the memory matches the previous value.

Parameters
pOutputPointer to a 64 bit aligned memory location to swap with
uOld64 bit value to compare with the memory location
uNew64 bit value to store if the comparison succeeds
Returns
TRUE if successful, FALSE if the memory is unstable

◆ atomic_get() [1/2]

uint32_t BURGER_API Burger::atomic_get ( volatile uint32_t * pInput)
externnoexcept

Atomically gets a 32 bit value from memory.


For multi-CPU machines, this function will atomically load a value with using appropriate locking for all CPUs

Parameters
pInputPointer to a 32 bit aligned memory location to load from
Returns
Value that was stored in the variable

◆ atomic_get() [2/2]

uint64_t BURGER_API Burger::atomic_get ( volatile uint64_t * pInput)
externnoexcept

Atomically gets a 64 bit value from memory.


For multi-CPU machines, this function will atomically load a value with using appropriate locking for all CPUs

Parameters
pInputPointer to a 64 bit aligned memory location to load from
Returns
Value that was stored in the variable

◆ atomic_lock()

void BURGER_API Burger::atomic_lock ( volatile uint32_t * pInput)
externnoexcept

Lock a spin lock.


Wait until a spin lock is released and then lock it. If the lock is already in possession by another thread, let this thread sleep for a moment to let the other thread do it's job and release the lock for this thread's use.

Note
This is NOT a mutex, it's an atomic value. A thread can lock forever if a thread locks a spin lock twice, since the thread won't exit this function to release the thread.
Parameters
pInputPointer to a 32 bit aligned memory location to lock
See also
Mutex, or atomic_unlock()

◆ atomic_set() [1/2]

uint32_t BURGER_API Burger::atomic_set ( volatile uint32_t * pOutput,
uint32_t uInput )
externnoexcept

Atomically sets a 32 bit value to memory.


For multi-CPU machines, this function will atomically store a value with using appropriate locking for all CPUs

Parameters
pOutputPointer to a 32 bit aligned memory location to set
uInput32 bit value to set in the memory location
Returns
Value that was stored in the variable previously

◆ atomic_set() [2/2]

uint64_t BURGER_API Burger::atomic_set ( volatile uint64_t * pOutput,
uint64_t uInput )
externnoexcept

Atomically sets a 64 bit value for one in memory.


For multi-CPU machines, this function will atomically swap a value with one stored in memory using appropriate locking for all CPUs

Note
This function is only available on systems with a 64 bit CPU
Parameters
pOutputPointer to a 64 bit aligned memory location to set
uInput64 bit value to set in the memory location
Returns
Value that was stored in the variable previously

◆ atomic_trylock()

uint_t BURGER_API Burger::atomic_trylock ( volatile uint32_t * pInput)
externnoexcept

Attempt to lock a spin lock.


Try to atomically set a lock to TRUE. If the lock is already set to TRUE, then return FALSE to not it was not successful. If the lock was FALSE and was successfully set to TRUE, return TRUE

Parameters
pInputPointer to a 32 bit aligned memory location to lock
Returns
TRUE if successful, FALSE if it's already locked

◆ atomic_unlock()

void BURGER_API Burger::atomic_unlock ( volatile uint32_t * pInput)
externnoexcept

Unlock a spin lock.


Set a spin lock to zero, atomically.

Parameters
pInputPointer to a 32 bit aligned memory location to unlock
See also
atomic_lock(), Mutex

◆ AudioDeviceGetMasterVolume()

float Burger::AudioDeviceGetMasterVolume ( uint32_t uDeviceID)
extern

◆ AudioDeviceSetMasterVolume()

uint_t Burger::AudioDeviceSetMasterVolume ( uint32_t uDeviceID,
float fInput )
extern

◆ big_endian_load_extended()

double BURGER_API Burger::big_endian_load_extended ( const Float80Bit pInput)
externnoexcept

Load a big endian 80 bit float as a double.


Convert an 80 bit float stored in memory in big endian format into a double in native endian

Parameters
pInputPointer to the 80 bit floating point number
Returns
Value in the form of a double
See also
little_endian_load_extended(const Float80Bit)

◆ bit_reverse() [1/2]

uint32_t BURGER_API Burger::bit_reverse ( uint32_t uInput,
uint_t uBitLength )
externnoexcept

Reverse the bits in a byte.


Given a bit width (From 1 through 32), reverse the order of the bits within.

Since this version is variable width, if uBitLength is equal to 4, the truth table would look like this...

Input Output
0x00 0x00
0x01 0x02
0x02 0x01
0x03 0x03

Whereas if uBitLength is equal to 8, the truth table would look like this...

Input Output
0x00 0x00
0x01 0x00
0x02 0x40
0x03 0xC0
Note
This function will set the unused bits to zero, so if a 3 bit number is requested, the upper 29 (32-3) bits will be set to zero.
Parameters
uInputValue to bit reverse
uBitLengthWidth of the value to reverse (1 through 32)
Returns
uInput with the bits reversed
See also
bit_reverse(uint64_t,uint_t)

◆ bit_reverse() [2/2]

uint64_t BURGER_API Burger::bit_reverse ( uint64_t uInput,
uint_t uBitLength )
externnoexcept

Reverse the bits in a byte.


Given a bit width (From 1 through 64), reverse the order of the bits within.

Since this version is variable width, if uBitLength is equal to 4, the truth table would look like this...

Input Output
0x00 0x00
0x01 0x02
0x02 0x01
0x03 0x03

Whereas if uBitLength is equal to 8, the truth table would look like this...

Input Output
0x00 0x00
0x01 0x80
0x02 0x40
0x03 0xC0
Note
This function will set the unused bits to zero, so if a 3 bit number is requested, the upper 61 (64-3) bits will be set to zero.
Parameters
uInputValue to bit reverse
uBitLengthWidth of the value to reverse (1 through 64)
Returns
uInput with the bits reversed
See also
bit_reverse(uint32_t,uint_t)

◆ calc_adler16()

uint_t BURGER_API Burger::calc_adler16 ( const void * pInput,
uintptr_t uInputLength,
uint_t uAdler16 = 1 )
externnoexcept

Compute the (Mark) Adler-16 checksum.


Create a 16 bit Alder-16 checksum using a 16 bit version the Alder algorithm.

Implemented following the documentation for the 32 bit version found in http://en.wikipedia.org/wiki/Adler-32

The lower 8 bits is a simple additive checksum with a starting value of 1.

The upper 8 bits is a factorial additive checksum based on the additive checksum with a starting value of 0

Parameters
pInputPointer to a buffer to be checksummed
uInputLengthNumber of bytes in the buffer to be checksummed
uAdler16Alder-16 from previous calculations or one if a new checksum is desired
Returns
16 bit Alder-16 checksum of the data
See also
calc_crc32b(const void *, uintptr_t, uint32_t) or calc_adler32( const void *, uintptr_t, uint32_t)

◆ calc_adler32()

uint32_t BURGER_API Burger::calc_adler32 ( const void * pInput,
uintptr_t uInputLength,
uint32_t uAdler32 = 1 )
externnoexcept

Compute the (Mark) Adler-32 checksum.


Implemented following the documentation found in http://en.wikipedia.org/wiki/Adler-32 and http://tools.ietf.org/html/rfc1950

The lower 16 bits is a simple additive checksum with a starting value of 1.

The upper 16 bits is a factorial additive checksum based on the additive checksum with a starting value of 0

Parameters
pInputPointer to a buffer to be checksummed
uInputLengthNumber of bytes in the buffer to be checksummed
uAdler32Alder-32 from previous calculations or one if a new checksum is desired
Returns
32 bit Alder-32 checksum of the data
See also
calc_crc32b(const void *, uintptr_t, uint32_t) or calc_adler16( const void *, uintptr_t, uint_t)

◆ calc_crc16IBM()

uint16_t BURGER_API Burger::calc_crc16IBM ( const void * pInput,
uintptr_t uInputLength,
uint16_t uCRC = 0 )
externnoexcept

Calculate the CRC16-IBM checksum (MP3) for a buffer.


Calculates a 16-bit CRC, "CRC16-IBM", which is the 16-bit Frame Check Sequence of MP3.

The polynomial format is X^16+X^15+X^2+X^0 or 0x8005

Implemented following the documentation found in http://en.wikipedia.org/wiki/Cyclic_redundancy_check

Parameters
pInputPointer to a buffer to be checksummed
uInputLengthNumber of bytes in the buffer to be checksummed
uCRCCRC from previous calculations or zero if a new checksum is desired
Returns
16 bit CRC16-IBM checksum of the data
See also
calc_crc32(const void *,uintptr_t,uint32_t), calc_adler16(const void *,uintptr_t,uint_t) or calc_adler32(const void *,uintptr_t,uint32_t)

◆ calc_crc32()

uint32_t BURGER_API Burger::calc_crc32 ( const void * pInput,
uintptr_t uInputLength,
uint32_t uCRC = 0 )
externnoexcept

Calculate the CRC32 checksum (Ethernet) for a buffer.


Calculates a 32-bit CRC, "CRC32", which is the 32-bit Frame Check Sequence of ITU V.42. This is the CRC algorithm used for Ethernet

The polynomial format is X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 or 0x04C11DB7

Implemented following the documentation found in http://en.wikipedia.org/wiki/Cyclic_redundancy_check and http://wiki.osdev.org/CRC32

Parameters
pInputPointer to a buffer to be checksummed
uInputLengthNumber of bytes in the buffer to be checksummed
uCRCCRC from previous calculations or zero if a new checksum is desired
Returns
32 bit CRC32 checksum of the data
See also
calc_crc32b(const void *,uintptr_t,uint32_t), calc_adler16(const void *,uintptr_t,uint_t) or calc_adler32(const void *,uintptr_t,uint32_t)

◆ calc_crc32b()

uint32_t BURGER_API Burger::calc_crc32b ( const void * pInput,
uintptr_t uInputLength,
uint32_t uCRC = 0 )
externnoexcept

Calculate the CRC32B checksum (ZLib) for a buffer.


Calculates a 32-bit CRC, "CRC32B", which is the 32-bit Frame Check Sequence of ITU V.42. This is the CRC algorithm used for Zlib, PNG, MPEG-2, Gzip and others

The polynomial format is X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 or 0x04C11DB7

Implemented following the documentation found in http://en.wikipedia.org/wiki/Cyclic_redundancy_check and http://wiki.osdev.org/CRC32

Parameters
pInputPointer to a buffer to be checksummed
uInputLengthNumber of bytes in the buffer to be checksummed
uCRCCRC from previous calculations or zero if a new checksum is desired
Returns
32 bit CRC32B checksum of the data
See also
calc_crc32(const void *,uintptr_t,uint32_t), calc_adler16(const void *,uintptr_t,uint_t) or calc_adler32(const void *,uintptr_t,uint32_t)

◆ CheckForForks() [1/3]

int BURGER_API Burger::CheckForForks ( const FSRef * pFSRef,
uint_t * pbDataFork,
uint_t * pbResourceFork )
externnoexcept

Test if a file has either a resource or data fork.


Before copying a file, check if the source has a resource or data fork, so only the detected forks will be copied. Return two booleans that are either TRUE or FALSE if either fork is detected. FSGetCatalogInfo() is used to check the fork sizes.

This function always returns paramErr if running on MacOS 7 or 8.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pFSRefPointer to the FSRef of the file of interest.
pbDataForkPointer to a boolean to receive the presence of a data fork.
pbResourceForkPointer to a boolean to receive the presence of a resource fork.

◆ CheckForForks() [2/3]

int BURGER_API Burger::CheckForForks ( const FSSpec * pFSSpec,
uint_t * pbDataFork,
uint_t * pbResourceFork )
externnoexcept

Test if a file has either a resource or data fork.


Before copying a file, check if the source has a resource or data fork, so only the detected forks will be copied. Return two booleans that are either TRUE or FALSE if either fork is detected. PBHGetFInfoSync() is used to check the fork sizes.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pFSSpecPointer to the FSSpec of the file of interest.
pbDataForkPointer to a boolean to receive the presence of a data fork.
pbResourceForkPointer to a boolean to receive the presence of a resource fork.
See also
CheckForForks(short, long, const uint8_t *, uint_t *, uint_t *)

◆ CheckForForks() [3/3]

int BURGER_API Burger::CheckForForks ( short svRefNum,
long lDirID,
const uint8_t * pName,
uint_t * pbDataFork,
uint_t * pbResourceFork )
externnoexcept

Test if a file has either a resource or data fork.


Before copying a file, check if the source has a resource or data fork, so only the detected forks will be copied. Return two booleans that are either TRUE or FALSE if either fork is detected. PBHGetFInfoSync() is used to check the fork sizes.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
svRefNumVolume the file resides on
lDirIDDirectory ID the file resides on
pNamePointer to a PASCAL string of the filename
pbDataForkPointer to a boolean to receive the presence of a data fork.
pbResourceForkPointer to a boolean to receive the presence of a resource fork.

◆ CheckVolLock()

int BURGER_API Burger::CheckVolLock ( short svRefNum)
externnoexcept

Check if a volume is locked.


Given a volume reference number, get its information and determine if it is locked. If no error is returned, the volume is not locked. A wPrErr is returned if the lock is by hardware (Write protect tab) or vLckdErr if the volume was locked by a software flag.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
svRefNumVolume reference number
Returns
Zero if no error, or mac error code which shows how it was locked.

◆ ChooseGridSize()

void BURGER_API Burger::ChooseGridSize ( uint_t * pXCellCount,
uint_t * pYCellCount,
const Vector4D_t * pBoundingRect,
uintptr_t uItemCountEstimate,
float fGridScale = 0.707f )
extern

Determine the optimum size of a grid.


Utility to find good values for x width and y height for a grid index, based on the expected number of items to index and the bounding box.

A bias for the values up or down using grid_scale can be applied

Note
The cell count is clamped between 1 and 256 inclusive.
Parameters
pXCellCountPointer to receive the width of the new grid
pYCellCountPointer to receive the height of the new grid
pBoundingRectBounding rect of the grid
uItemCountEstimateNumber of items likely to occupy the grid
fGridScaleScale for precision

◆ clamp()

template<typename T >
T Burger::clamp ( T Input,
T Min,
T Max )
inlinenoexcept

Clamp the input between a bounds.


If the input value is less than the minimum, return the minimum or if the input value is greater than the maximum, return the maximum, otherwise return the input value. No checking is performed to determine if the minimum is less than the maximum.

Template Parameters
TInput data type
Parameters
InputFirst value to test
MinMinimum allowed value
MaxMaximum allowed value
Returns
The value clamped between the bounds

◆ ClampZero() [1/4]

int16_t Burger::ClampZero ( int16_t iInput)
inlinenoexcept

Clamp an integer to 0.


Without branching, if the integer is less than zero, set it to zero.

Parameters
iInputValue to test for less than zero.
Returns
The zero clamped value of iInput.
See also
ClampZero(int8_t), ClampZero(int32_t) or ClampZero(int64_t)

◆ ClampZero() [2/4]

int32_t Burger::ClampZero ( int32_t iInput)
inlinenoexcept

Clamp an integer to 0.


Without branching, if the integer is less than zero, set it to zero.

Parameters
iInputValue to test for less than zero.
Returns
The zero clamped value of iInput.
See also
ClampZero(int8_t), ClampZero(int16_t) or ClampZero(int64_t)

◆ ClampZero() [3/4]

int64_t Burger::ClampZero ( int64_t iInput)
inlinenoexcept

Clamp an integer to 0.


Without branching, if the integer is less than zero, set it to zero.

Parameters
iInputValue to test for less than zero.
Returns
The zero clamped value of iInput.
See also
ClampZero(int8_t), ClampZero(int16_t) or ClampZero(int32_t)

◆ ClampZero() [4/4]

int8_t Burger::ClampZero ( int8_t iInput)
inlinenoexcept

Clamp an integer to 0.


Without branching, if the integer is less than zero, set it to zero.

Parameters
iInputValue to test for less than zero.
Returns
The zero clamped value of iInput.
See also
ClampZero(int16_t), ClampZero(int32_t) or ClampZero(int64_t)

◆ ClearConsole()

void BURGER_API Burger::ClearConsole ( void )
externnoexcept

Clear the text console.


For platforms that support a text console, clear out the text console by sending a line feed or system appropriate set of calls to perform the same action the ends up with a clear text screen and the output cursor set to the upper left corner.

This is an equivalent of the Borland C library function clrscr().

◆ ClearPalette() [1/2]

void BURGER_API Burger::ClearPalette ( RGBAWord8_t * pOutput,
uintptr_t uPaletteSize = 256 )
extern

Clear an RGBA palette.


Set the red, green and blue values to zero and the alpha to 255

Parameters
pOutputPointer to the palette to set to Black
uPaletteSizeNumber of color entries to clear
See also
ClearPalette(RGBWord8_t *,uintptr_t)

◆ ClearPalette() [2/2]

void BURGER_API Burger::ClearPalette ( RGBWord8_t * pOutput,
uintptr_t uPaletteSize = 256 )
extern

Clear an RGB palette.


Set all values to zero

Parameters
pOutputPointer to the palette to set to Black
uPaletteSizeNumber of color entries to clear
See also
ClearPalette(RGBAWord8_t *,uintptr_t)

◆ ClearSoundData()

void BURGER_API Burger::ClearSoundData ( void * pOutput,
uintptr_t uLength,
SoundManager::eDataType eType )
extern

Clear sound data.


Fill the sound buffer with data that represents silence. For unsigned char, fill with 0x80U, all other formats will fill with zero.

Parameters
pOutputPointer to the buffer to receive the converted data
uLengthLength of the sound data in bytes
eTypeType of the input sound data

◆ ComputeReverb() [1/2]

void BURGER_API Burger::ComputeReverb ( int16_t * pOutput,
const int16_t * pInput,
uintptr_t uCount,
uint_t uPercentage )
extern

Add in an 16 bit reverb.


Given a scale in the format of a percentage of 0 to 100, apply the scaled input buffer to the output buffer via addition to generate reverb

Parameters
pOutputPointer to the buffer which will have reverb applied
pInputPointer to the buffer which the reverb comes from
uCountNumber of bytes to process
uPercentageScale of reverb 0 is none, 100 is full volume

◆ ComputeReverb() [2/2]

void BURGER_API Burger::ComputeReverb ( uint8_t * pOutput,
const uint8_t * pInput,
uintptr_t uCount,
uint_t uPercentage )
extern

Add in an 8 bit reverb.


Given a scale in the format of a percentage of 0 to 100, apply the scaled input buffer to the output buffer via addition to generate reverb

Parameters
pOutputPointer to the buffer which will have reverb applied
pInputPointer to the buffer which the reverb comes from
uCountNumber of bytes to process
uPercentageScale of reverb 0 is none, 100 is full volume

◆ Convert() [1/2]

void BURGER_API Burger::Convert ( HSL_t * pOutput,
const RGBFloat_t * pInput )
extern

Convert an RGB color to HSL color.


Perform a conversion of RGB color space to Hue, Saturation and Intensity color space

Parameters
pOutputPointer to the structure to get the converted HSL color
pInputPointer to an RGB color in the range for 0.0f to 1.0f per element
See also
Convert(RGBFloat_t *,const HSL_t*)

◆ Convert() [2/2]

void BURGER_API Burger::Convert ( RGBFloat_t * pOutput,
const HSL_t * pInput )
extern

Convert a HSL color to an RGB color.


Perform a conversion of Hue, Saturation and Intensity color space to Red, Green and Blue color space

Parameters
pOutputPointer to the structure to get the converted RGB color
pInputPointer to a HSL color in the range for 0.0f to 1.0f per element
See also
Convert(HSL_t *,const RGBFloat_t*)

◆ convert_from_BCD()

uint32_t BURGER_API Burger::convert_from_BCD ( uint32_t uInput)
externnoexcept

Convert a BCD value into a decimal integer.


Given an input value of 0x1234, assume it is Binary Coded Decimal (BCD) format and convert it to become the decimal integer 1234.

BCD's encoding rules dictate that only the number 0-9 are valid. Any use of the hex digits A-F are considered illegal.

Note
The returned value is undefined if the input is not in BCD format.
Parameters
uInput32-bit hex value in BCD.
Returns
Value in decimal format.
See also
convert_to_BCD(uint32_t)

◆ convert_to_AudioUnit_pan()

float BURGER_API Burger::convert_to_AudioUnit_pan ( uint_t uInput)
externnoexcept

Convert a linear pan to 0.0f to 1.0f.


Convert the pan from 0-65535 into 0.0f to 1.0f.

Parameters
uInputPan from 0 to 65535. Numbers higher than 65535 will be clamped.
Returns
Value in the form of 0.0f to 1.0f in the scale needed for Mac OSX / iOS AudioUnit
See also
convert_to_AudioUnit_volume(uint_t)

◆ convert_to_AudioUnit_volume()

float BURGER_API Burger::convert_to_AudioUnit_volume ( uint_t uInput)
externnoexcept

Convert a linear volume to 0.0f to 1.0f.


Clamp the volume to 0-255 and then convert the value into floating point.

Parameters
uInputVolume from 0 to 255. Numbers higher than 255 will be clamped.
Returns
Value in the form of 0.0f to 1.0f in the scale needed for Mac OSX / iOS AudioUnit
See also
convert_to_AudioUnit_pan(uint_t)

◆ convert_to_BCD()

uint32_t BURGER_API Burger::convert_to_BCD ( uint32_t uInput)
externnoexcept

Convert a decimal integer into BCD format.


Given a decimal in the range of 0-99999999, convert it into that value into Binary Coded Decimal (BCD) format. Such that 1234 become 0x1234 and 50331 become 0x00050331. If the input value is greater than 99999999 it is clamped to 99999999.

Parameters
uInputInteger value in the range of 0 to 99999999.
Returns
Input encoded in BCD.
See also
convert_from_BCD(uint32_t)

◆ convert_to_DirectSound_pan() [1/2]

long BURGER_API Burger::convert_to_DirectSound_pan ( float fInput)
externnoexcept

Convert a linear pan to decibels.


DirectSound requires pan inputs to be set in decibels from -10000 being full left, 0 being center and 10000 being full right.

Input values lower than -1.0f will return -10000 (Full left) and higher than 1.0f will return 10000 (Full right)

Parameters
fInputPan from -1.0f to 1.0f as a pan value
Returns
Value in the form of -10000 to -10000 in the scale needed for DirectSound
See also
convert_to_DirectSound_pan(uint_t)

◆ convert_to_DirectSound_pan() [2/2]

long BURGER_API Burger::convert_to_DirectSound_pan ( uint_t uInput)
externnoexcept

Convert a linear pan to decibels.


DirectSound requires pan inputs to be set in decibels from -10000 being full left, 0 being center and 10000 being full right.

Input values lower than 2 will return -10000 (Full left) and higher than 0xFFFEU will return 10000 (Full right)

Parameters
uInputPan from 0x0000 to 0xFFFFU as a pan value
Returns
Value in the form of -10000 to -10000 in the scale needed for DirectSound
See also
convert_to_DirectSound_pan(float)

◆ convert_to_DirectSound_volume() [1/2]

long BURGER_API Burger::convert_to_DirectSound_volume ( float fInput)
externnoexcept

Convert a linear volume to decibels.


DirectSound requires volume inputs to be set in decibels from 0 being full volume to -10000 being silent.

Input values lower than 0.0f will return -10000 (Silence) and higher than 1.0f will return 0 (Max volume)

Parameters
fInputVolume from 0.0f to 1.0f as a percentage of volume
Returns
Value in the form of 0 to -10000 in the scale needed for DirectSound
See also
convert_to_DirectSound_volume(uint_t)

◆ convert_to_DirectSound_volume() [2/2]

long BURGER_API Burger::convert_to_DirectSound_volume ( uint_t uInput)
externnoexcept

Convert a linear volume to decibels.


DirectSound requires volume inputs to be set in decibels from 0 being full volume to -10000 being silent.

Input values higher than 255 will return 0 (Max volume)

Parameters
uInputVolume from 0 to 255 as a percentage of volume in 256 steps
Returns
Value in the form of 0 to -10000 in the scale needed for DirectSound
See also
convert_to_DirectSound_volume(float)

◆ convert_to_float()

float BURGER_API Burger::convert_to_float ( float16_t uInput)
externnoexcept

Convert a 16 bit float into a 32 bit float.


The conversion will retain sign, Nan, Inf and perform rounding to nearest even.

Negative zero returns negative zero.

Parameters
uInput16 bit float to convert
Returns
32 bit float
See also
Half, or convert_to_float16(float)

◆ convert_to_float16()

Burger::float16_t BURGER_API Burger::convert_to_float16 ( float fInput)
externnoexcept

Convert a 32 bit float into a 16 bit float.


The conversion will retain sign, Nan, Inf and perform rounding to nearest even.

Small numbers are converted to zero, large numbers to infinity.

Negative zero returns negative zero.

Parameters
fInput32 bit float to convert
Returns
16 bit float as a uint16_t
See also
Half, or convert_to_float(float16_t)

◆ CopyFileMgrAttributes() [1/3]

int BURGER_API Burger::CopyFileMgrAttributes ( const FSRef * pDestRef,
const FSRef * pSourceRef,
uint_t bCopyLockBit = 1 )
externnoexcept

Copy file manager metadata from one file to another.


Given the FSRefs for a source and destination file, read in the file manager metadata, such as the file creator type, file type, and finder location information. If bCopyLockBit is non-zero, the lock bit will also be copied.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pDestRefPointer to the destination file's FSRef
pSourceRefPointer to the source file's FSRef
bCopyLockBitBoolean to enable the copying of the lock status
Returns
Zero if no error, or mac error code

◆ CopyFileMgrAttributes() [2/3]

int BURGER_API Burger::CopyFileMgrAttributes ( const FSSpec * pDestSpec,
const FSSpec * pSourceSpec,
uint_t bCopyLockBit = 1 )
externnoexcept

Copy file manager metadata from one file to another.


Given the FSSpecs for a source and destination file, read in the file manager metadata, such as the file creator type, file type, and finder location information. If bCopyLockBit is non-zero, the lock bit will also be copied.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pDestSpecPointer to the destination file's FSSpec
pSourceSpecPointer to the source file's FSSpec
bCopyLockBitBoolean to enable the copying of the lock status
Returns
Zero if no error, or mac error code

◆ CopyFileMgrAttributes() [3/3]

int BURGER_API Burger::CopyFileMgrAttributes ( short svRefNumDest,
long lDirIDDest,
const uint8_t * pFilenameDest,
short svRefNumSource,
long lDirIDSource,
const uint8_t * pFilenameSource,
uint_t bCopyLockBit = 1 )
externnoexcept

Copy file manager metadata from one file to another.


Given the volume, directory ID and filename for a source and destination file, read in the file manager metadata, such as the file creator type, file type, and finder location information. If bCopyLockBit is non-zero, the lock bit will also be copied.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
svRefNumDestVolume reference number of the destination file
lDirIDDestParent ID of the destination file
pFilenameDestPointer to a Pascal string for the destination file
svRefNumSourceVolume reference number of the source file
lDirIDSourceParent ID of the source file
pFilenameSourcePointer to a Pascal string for the source file
bCopyLockBitBoolean to enable the copying of the lock status
Returns
Zero if no error, or mac error code

◆ CopyForkCarbon()

int BURGER_API Burger::CopyForkCarbon ( short iDestRefNum,
short iSourceRefNum,
uint8_t * pBuffer,
uintptr_t uBufferSize )
externnoexcept

Copy a fork of a file using FSRef APIs.


Given an opened source and destination file fork, and a buffer, perform a complete copy of the data from the source file fork to the destination file fork, replacing the destination file fork with a copy of the source fork. Buffer is assumed to a size that's a minimum of 512 bytes or in a chunk size of 512 bytes. Forks must be opened using the FSRef class of functions using an FSRef, not an FSSpec or volume / directory / name. If the fork was opened with an older API, use CopyForkClassic(short, short, uint8_t*, uintptr_t) instead.

Note
This is the preferred API to copy files due its use of 64 bit file size values.
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
iDestRefNumOpened file reference for the destination file
iSourceRefNumOpened file reference for the source file
pBufferPointer to the buffer to use for data transfer
uBufferSizeSize in bytes of the data transfer buffer
Returns
Zero or Mac OSErr error code (Not Burgerlib)
See also
CopyForkClassic(short, short, uint8_t*, uintptr_t)

◆ CopyForkClassic()

int BURGER_API Burger::CopyForkClassic ( short iDestRefNum,
short iSourceRefNum,
uint8_t * pBuffer,
uintptr_t uBufferSize )
externnoexcept

Copy a fork of a file using FSSpec APIs.


Given an opened source and destination file fork, and a buffer, perform a complete copy of the data from the source file fork to the destination file fork, replacing the destination file fork with a copy of the source fork. Buffer is assumed to a size that's a minimum of 512 bytes or in a chunk size of 512 bytes. Forks must be opened using the PBH class of functions using either an FSSpec or volume / directory / name, not an FSRef. If the fork was opened with an FSRef, use CopyForkCarbon(short, short, uint8_t*, uintptr_t) instead.

Note
Due to a limitation of the classic mac APIs, the maximum file size that can be copied is 4GB.
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
iDestRefNumOpened file reference for the destination file
iSourceRefNumOpened file reference for the source file
pBufferPointer to the buffer to use for data transfer
uBufferSizeSize in bytes of the data transfer buffer
Returns
Zero or Mac OSErr error code (Not Burgerlib)
See also
CopyForkCarbon(short, short, uint8_t*, uintptr_t)

◆ CopyPalette() [1/4]

void Burger::CopyPalette ( RGBAWord8_t * pOutput,
const RGBAWord8_t * pInput,
uintptr_t uEntries = 256 )
inline

Copy an array of RGBAWord8_t entries from an array of RGBAWord8_t entries.


Given a pointer to an array of RGBAWord8_t color entries, copy the colors into another array of RGBAWord8_t entries

Parameters
pOutputPointer to the palette to copy to
pInputPointer to the palette to copy from
uEntriesNumber of color entries in the palette
See also
CopyPalette(RGBAWord8_t *,const RGBWord8_t *,uintptr_t)

◆ CopyPalette() [2/4]

void BURGER_API Burger::CopyPalette ( RGBAWord8_t * pOutput,
const RGBWord8_t * pInput,
uintptr_t uEntries = 256 )
extern

Copy an array of RGBAWord8_t entries from an array of RGBWord8_t entries.


Given a pointer to an array of RGBWord8_t color entries, copy the colors into another array of RGBAWord8_t entries and set the alpha value to zero.

Parameters
pOutputPointer to the palette to copy to
pInputPointer to the palette to copy from
uEntriesNumber of color entries in the palette
See also
CopyPalette(RGBAWord8_t *,const RGBAWord8_t *,uintptr_t)

◆ CopyPalette() [3/4]

void BURGER_API Burger::CopyPalette ( RGBWord8_t * pOutput,
const RGBAWord8_t * pInput,
uintptr_t uEntries = 256 )
extern

Copy an array of RGBWord8_t entries from an array of RGBAWord8_t entries.


Given a pointer to an array of RGBAWord8_t color entries, copy the colors into another array of RGBWord8_t entries while losing the alpha value

Parameters
pOutputPointer to the palette to copy to
pInputPointer to the palette to copy from
uEntriesNumber of color entries in the palette
See also
CopyPalette(RGBWord8_t *,const RGBWord8_t *,uintptr_t)

◆ CopyPalette() [4/4]

void Burger::CopyPalette ( RGBWord8_t * pOutput,
const RGBWord8_t * pInput,
uintptr_t uEntries = 256 )
inline

Copy an array of RGBWord8_t entries.


Given a pointer to an array of RGBWord8_t color entries, copy the colors into another array of RGBWord8_t entries

Parameters
pOutputPointer to the palette to copy to
pInputPointer to the palette to copy from
uEntriesNumber of color entries in the palette
See also
CopyPalette(RGBWord8_t *,const RGBAWord8_t *,uintptr_t)

◆ CopyPalette256() [1/4]

void BURGER_API Burger::CopyPalette256 ( RGBAWord8_t * pOutput,
const RGBAWord8_t * pInput,
uint_t uStartIndex = 0,
uint_t uPaletteSize = 256 )
extern

Set a range of RGBA color entries to a 256 entry palette.


Given a pointer to a 256 color palette, copy the color entries passed in the input array and store them in the output array. Since the output array is assumed to be 256 entries, the starting index must be less than 256 and the number of entries copied will be clamped to prevent a buffer overrun.

Any entries that would result in a buffer overrun will be ignored and if the starting index is greater than 255, this function will do nothing.

Parameters
pOutputPointer to the 256 color palette to store the new colors
pInputPointer to the color entries to copy from
uStartIndexColor index of the 256 color output palette to start modification (Maximum 255)
uPaletteSizeNumber of color entries to copy (Maximum 256)
See also
CopyPalette256(RGBAWord8_t *,const RGBWord8_t *,uint_t,uint_t)

◆ CopyPalette256() [2/4]

void BURGER_API Burger::CopyPalette256 ( RGBAWord8_t * pOutput,
const RGBWord8_t * pInput,
uint_t uStartIndex = 0,
uint_t uPaletteSize = 256 )
extern

Set a range of RGBA color entries to a 256 entry palette.


Given a pointer to a 256 color palette, copy the color entries passed in the input array and store them in the output array. Since the output array is assumed to be 256 entries, the starting index must be less than 256 and the number of entries copied will be clamped to prevent a buffer overrun.

Any entries that would result in a buffer overrun will be ignored and if the starting index is greater than 255, this function will do nothing.

Note
The Alpha of each copied entry will be set to a default of 255 (Maximum / opaque)
Parameters
pOutputPointer to the 256 color palette to store the new colors
pInputPointer to the color entries to copy from
uStartIndexColor index of the 256 color output palette to start modification (Maximum 255)
uPaletteSizeNumber of color entries to copy (Maximum 256)
See also
CopyPalette256(RGBAWord8_t *,const RGBAWord8_t *,uint_t,uint_t)

◆ CopyPalette256() [3/4]

void BURGER_API Burger::CopyPalette256 ( RGBWord8_t * pOutput,
const RGBAWord8_t * pInput,
uint_t uStartIndex = 0,
uint_t uPaletteSize = 256 )
extern

Set a range of RGB color entries to a 256 entry palette.


Given a pointer to a 256 color palette, copy the color entries passed in the input array and store them in the output array. Since the output array is assumed to be 256 entries, the starting index must be less than 256 and the number of entries copied will be clamped to prevent a buffer overrun.

Any entries that would result in a buffer overrun will be ignored and if the starting index is greater than 255, this function will do nothing.

Note
The alpha in the input palette will be ignored.
Parameters
pOutputPointer to the 256 color palette to store the new colors
pInputPointer to the color entries to copy from
uStartIndexColor index of the 256 color output palette to start modification (Maximum 255)
uPaletteSizeNumber of color entries to copy (Maximum 256)
See also
CopyPalette256(RGBWord8_t *,const RGBWord8_t *,uint_t,uint_t)

◆ CopyPalette256() [4/4]

void BURGER_API Burger::CopyPalette256 ( RGBWord8_t * pOutput,
const RGBWord8_t * pInput,
uint_t uStartIndex = 0,
uint_t uPaletteSize = 256 )
extern

Set a range of RGB color entries to a 256 entry palette.


Given a pointer to a 256 color palette, copy the color entries passed in the input array and store them in the output array. Since the output array is assumed to be 256 entries, the starting index must be less than 256 and the number of entries copied will be clamped to prevent a buffer overrun.

Any entries that would result in a buffer overrun will be ignored and if the starting index is greater than 255, this function will do nothing.

Parameters
pOutputPointer to the 256 color palette to store the new colors
pInputPointer to the color entries to copy from
uStartIndexColor index of the 256 color output palette to start modification (Maximum 255)
uPaletteSizeNumber of color entries to copy (Maximum 256)
See also
CopyPalette256(RGBWord8_t *,const RGBAWord8_t *,uint_t,uint_t)

◆ CopyPalette444() [1/2]

void BURGER_API Burger::CopyPalette444 ( RGBAWord8_t * pOutput,
const uint16_t * pInput,
uintptr_t uEntries = 256 )
extern

Copy an array of RGBAWord8_t entries from an array of 16 bit XRGB entries.


Given a pointer to an array of 16 bit XRGB color entries, copy the colors into another array of RGBAWord8_t entries. Set Alpha to 255

Each color is 4 bits, however it's expanded to 8 bits in the output palette

Red = (Color>>8)&0xF Green = (Color>>4)&0xF Blue = Color&0xF

Parameters
pOutputPointer to the palette to copy to
pInputPointer to the palette to copy from
uEntriesNumber of color entries in the palette
See also
CopyPalette444(RGBWord8_t *,const uint16_t *,uintptr_t) or Renderer::RGB4ToRGB8Table

◆ CopyPalette444() [2/2]

void BURGER_API Burger::CopyPalette444 ( RGBWord8_t * pOutput,
const uint16_t * pInput,
uintptr_t uEntries = 256 )
extern

Copy an array of RGBWord8_t entries from an array of 16 bit XRGB entries.


Given a pointer to an array of 16 bit XRGB color entries, copy the colors into another array of RGBWord8_t entries.

Each color is 4 bits, however it's expanded to 8 bits in the output palette

Red = (Color>>8)&0xF Green = (Color>>4)&0xF Blue = Color&0xF

Parameters
pOutputPointer to the palette to copy to
pInputPointer to the palette to copy from
uEntriesNumber of color entries in the palette
See also
CopyPalette444(RGBAWord8_t *,const uint16_t *,uintptr_t) or Renderer::RGB4ToRGB8Table

◆ CopyPalette4444() [1/2]

void BURGER_API Burger::CopyPalette4444 ( RGBAWord8_t * pOutput,
const uint16_t * pInput,
uintptr_t uEntries = 256 )
extern

Copy an array of RGBAWord8_t entries from an array of 16 bit ARGB entries.


Given a pointer to an array of 16 bit ARGB color entries, copy the colors into another array of RGBAWord8_t entries.

Each color is 4 bits, however it's expanded to 8 bits in the output palette

Alpha = (Color>>12)&0xF Red = (Color>>8)&0xF Green = (Color>>4)&0xF Blue = Color&0xF

Parameters
pOutputPointer to the palette to copy to
pInputPointer to the palette to copy from
uEntriesNumber of color entries in the palette
See also
CopyPalette4444(RGBWord8_t *,const uint16_t *,uintptr_t) or Renderer::RGB4ToRGB8Table

◆ CopyPalette4444() [2/2]

void BURGER_API Burger::CopyPalette4444 ( RGBWord8_t * pOutput,
const uint16_t * pInput,
uintptr_t uEntries = 256 )
extern

Copy an array of RGBWord8_t entries from an array of 16 bit ARGB entries.


Given a pointer to an array of 16 bit ARGB color entries, copy the colors into another array of RGBWord8_t entries and discard the alpha

Each color is 4 bits, however it's expanded to 8 bits in the output palette

Alpha = (Color>>12)&0xF Red = (Color>>8)&0xF Green = (Color>>4)&0xF Blue = Color&0xF

Note
Alpha is discarded in this function
Parameters
pOutputPointer to the palette to copy to
pInputPointer to the palette to copy from
uEntriesNumber of color entries in the palette
See also
CopyPalette4444(RGBAWord8_t *,const uint16_t *,uintptr_t) or Renderer::RGB4ToRGB8Table

◆ CopySoundData()

void BURGER_API Burger::CopySoundData ( void * pOutput,
const void * pInput,
uintptr_t uLength,
SoundManager::eDataType eType )
extern

Upload sound data.


This function will take signed 8 bit, unsigned 8 bit, big and little endian signed 16 bit sound data and copy it into either an 8 or 16 bit sound buffer using native endian. This is a helper function for the sound manager.

If the data type is not one of the four types, it will perform a simple memory copy

Parameters
pOutputPointer to the buffer to receive the converted data
pInputPointer to the sound data
uLengthLength of the sound data in bytes
eTypeType of the input sound data

◆ CopyStereoInterleaved() [1/2]

void BURGER_API Burger::CopyStereoInterleaved ( void * pOutput,
const uint16_t * pLeft,
const uint16_t * pRight,
uintptr_t uOutputSize )
extern

Merge a left and right audio channel into a single buffer.


Given two input buffers of equal size, interleave the buffers with the left channel written first and then the right second into a buffer that's twice as large as uOutputSize to contain the merged data.

Parameters
pOutputPointer to receive the interleaved data (Must be uOutputSize*4 bytes in size)
pLeftPointer to the left channel data
pRightPointer to the right channel data
uOutputSizeSize in entries (uint16_t) of the left or right channel (Both must be the same size)
See also
CopyStereoInterleaved(void *,const uint8_t *,const uint8_t *,uintptr_t)

◆ CopyStereoInterleaved() [2/2]

void BURGER_API Burger::CopyStereoInterleaved ( void * pOutput,
const uint8_t * pLeft,
const uint8_t * pRight,
uintptr_t uOutputSize )
extern

Merge a left and right audio channel into a single buffer.


Given two input buffers of equal size, interleave the buffers with the left channel written first and then the right second into a buffer that's twice as large as uOutputSize to contain the merged data.

Parameters
pOutputPointer to receive the interleaved data (Must be uOutputSize*2 bytes in size)
pLeftPointer to the left channel data
pRightPointer to the right channel data
uOutputSizeSize in bytes of the left or right channel (Both must be the same size)
See also
CopyStereoInterleaved(void *,const uint16_t *,const uint16_t *,uintptr_t)

◆ CopyUpToEOL()

uintptr_t BURGER_API Burger::CopyUpToEOL ( char * pOutput,
uintptr_t uOutputSize,
const char * pInput,
uintptr_t uInputSize )
externnoexcept

Read a stream of text chars until a nullptr, LF, CR or CR/LF is found.


Copy from the input stream of text characters until either a zero, a LF (Unix), CR/LF (Windows), or CR (Mac) is found. The output buffer will be zero terminated and will truncate excess data.

The value returned is the number of bytes that was processed. This number is how many bytes from the original input was used.

Parameters
pOutputPointer to the output buffer (Can be nullptr if uOutputSize is zero).
uOutputSizeSize in bytes of the output buffer.
pInputPointer to the input buffer.
uInputSizeSize in bytes of the maximum number of bytes to process.
Returns
The number of input bytes processed.

◆ cosine_387() [1/2]

double BURGER_API Burger::cosine_387 ( double dInput)
externnoexcept

Return the cosine from radians.


Use the fcos instruction to generate sine. Will loop in cases where overflow is detected.

Note
Only available on 32 bit intel CPUs
Parameters
dInputValue in Radians
Returns
Cosine of fInput
See also
cosine_387(float) or sine_387(double)

◆ cosine_387() [2/2]

float BURGER_API Burger::cosine_387 ( float fInput)
externnoexcept

Return the cosine from radians.


Use the fcos instruction to generate sine. Will loop in cases where overflow is detected.

Note
Only available on 32 bit intel CPUs
Parameters
fInputValue in Radians
Returns
Cosine of fInput
See also
cosine_387(double) or sine_387(float)

◆ count_set_bits() [1/2]

uint_t BURGER_API Burger::count_set_bits ( uint32_t uInput)
externnoexcept

Calculate the number of set bits.


Given a 32 bit integer, count the number of bits set and return the value from zero to thirty two.

Parameters
uInputInteger to count the bits from
Returns
0 to 32
See also
count_set_bits(uint64_t)

◆ count_set_bits() [2/2]

uint_t BURGER_API Burger::count_set_bits ( uint64_t uInput)
externnoexcept

Calculate the number of set bits.


Given a 64 bit integer, count the number of bits set and return the value from zero to sixty four.

Parameters
uInputInteger to count the bits from
Returns
0 to 64
See also
count_set_bits(uint32_t)

◆ CPUID()

void BURGER_API Burger::CPUID ( CPUID_t * pOutput)
externnoexcept

Fill in a CPUID_t structure.


On x86 and x64 CPUs, this function will call CPUID several times to extract the most commonly requested data from the CPU and fills in the CPUID_t structure. On non x86/x64 platforms, this function does not exist.

Note
This function only matters on systems with an x86 or x64 CPU
Parameters
pOutputPointer to a CPUID_t to initialize
See also
BURGER_INTEL

◆ CreateEmptyFile() [1/3]

int BURGER_API Burger::CreateEmptyFile ( const FSSpec * pFSSpec)
externnoexcept

Call FSpCreate() to create a file.


Call FSpCreate() to create an empty file with no data or type.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pFSSpecPointer to an FSSpec of the new file
Returns
Zero if no error, or mac error code
See also
CreateEmptyFile(short, long, const uint8_t*)

◆ CreateEmptyFile() [2/3]

int BURGER_API Burger::CreateEmptyFile ( FSRef * pOutput,
const FSRef * pFSRef,
const char * pName )
externnoexcept

Call PBCreateFileUnicodeSync() to create a file.


Call PBCreateFileUnicodeSync() to create an empty file with no data or type.

This function always returns paramErr if running on MacOS 7 or 8.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pOutputPointer to store the new FSRef, can be nullptr
pFSRefPointer to an FSRef of the new file's parent directory
pNamePointer to UTF8 encoded "C" string of the new file name
Returns
Zero if no error, or mac error code
See also
CreateEmptyFile(short, long, const uint8_t*)

◆ CreateEmptyFile() [3/3]

int BURGER_API Burger::CreateEmptyFile ( short svRefNum,
long lDirID,
const uint8_t * pFilename )
externnoexcept

Call PBHCreateSync() to create a file.


Call PBHCreateSync() to create an empty file with no data or type.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
svRefNumVolume reference number of the new file
lDirIDParent ID of the new file
pFilenamePointer to a Pascal string for the new filename
Returns
Zero if no error, or mac error code
See also
CreateEmptyFile(const FSSpec*)

◆ CStringToPString()

void BURGER_API Burger::CStringToPString ( uint8_t * pOutput,
const char * pInput )
externnoexcept

Convert a "C" string into a Pascal string.


Copy a "C" string and convert it into a Pascal style string. A byte will denote the length, followed by the text itself. There will be no terminating zero in the new string.

The destination and the source pointer can contain the same value. This function allows in buffer data conversion.

Note
If the input string is greater than 255 characters in length, it will be truncated at 255 characters.
While the input and output strings can be the same value for in place conversions, they cannot be pointing to overlapping sections of the same buffer. Either the buffers must be independent of each other, or they are pointing to the exact same buffer. Overlap will cause undefined behavior.
Parameters
pOutputPointer to a buffer (max 256 bytes) to receive the new string. nullptr will page fault.
pInputPointer to the "C" string to copy. nullptr will page fault.
\sa Burger::PStringToCString(char *,const uint8_t*);

◆ DebugSnprintf()

intptr_t BURGER_API Burger::DebugSnprintf ( char * pOutput,
uintptr_t uOutputSize,
const char * pFormat,
uintptr_t uArgCount,
const ArgumentType ** ppArgs )
externnoexcept

Debug snprintf()


Parse the parameters and do a printf() dump of the contents, used exclusively for debugging.

  • Step 1) Parse the format string and arguments
  • Step 2) if no issues found in Step 1, execute the list of format & copy output commands.
Parameters
pOutputPointer to a output buffer
uOutputSizeNumber of bytes in the output buffer
pFormatPointer to a "C" format string
uArgCountNumber of arguments in the argument array
ppArgsArgument array, can be NULL if uArgCount is zero
Returns
Always returns zero

◆ decibels_to_amplitude_ratio()

float BURGER_API Burger::decibels_to_amplitude_ratio ( float fDecibels)
externnoexcept

Convert a DirectSound decibel value to an XAudio2 Amplitude multiplier.


Convert the decibels from -10000 to 0 to 0 to 1.0f

Parameters
fDecibelsDirectSound decibels from -10000 to 0.
Returns
Value in the form of 0.0f to 1.0f in the scale needed for XAudio2 SetVolume()
See also
amplitude_ratio_to_decibels(float)

◆ DecompressImage() [1/3]

void BURGER_API Burger::DecompressImage ( RGBAWord8_t * pOutput,
uintptr_t uOutputStride,
uint_t uWidth,
uint_t uHeight,
const Dxt1Packet_t * pInput,
uintptr_t uInputStride )
extern

Decompress an array of 4x4 block compressed with DXT1.


Given an array of 8 byte blocks of DXT1 compressed data, extract the 4x4 RGBA color blocks into a bit map.

Note
This function will handle clipping if the destination bitmap is not divisible by four in the width or height
Parameters
pOutputPointer to the start of a bitmap in the size of uWidth and uHeight RGBAWord8_t encoded 32 bit pixels.
uOutputStrideNumber of bytes per scan line of the output bit map (Usually it's uWidth*4)
uWidthWidth of the output bitmap in pixels
uHeightHeight of the output bitmap in pixels
pInputPointer to a matching bitmap of DXT1 compressed pixels
uInputStrideByte width of each scan line for the block of compressed data. (Usually it's uWidth*4)

◆ DecompressImage() [2/3]

void BURGER_API Burger::DecompressImage ( RGBAWord8_t * pOutput,
uintptr_t uOutputStride,
uint_t uWidth,
uint_t uHeight,
const Dxt3Packet_t * pInput,
uintptr_t uInputStride )
extern

Decompress an array of 4x4 block compressed with DXT3.


Given an array of 16 byte blocks of DXT3 compressed data, extract the 4x4 RGBA color blocks into a bit map.

Note
This function will handle clipping if the destination bitmap is not divisible by four in the width or height
Parameters
pOutputPointer to the start of a bitmap in the size of uWidth and uHeight RGBAWord8_t encoded 32 bit pixels.
uOutputStrideNumber of bytes per scan line of the output bit map (Usually it's uWidth*4)
uWidthWidth of the output bitmap in pixels
uHeightHeight of the output bitmap in pixels
pInputPointer to a matching bitmap of DXT3 compressed pixels
uInputStrideByte width of each scan line for the block of compressed data. (Usually it's uWidth*4)

◆ DecompressImage() [3/3]

void BURGER_API Burger::DecompressImage ( RGBAWord8_t * pOutput,
uintptr_t uOutputStride,
uint_t uWidth,
uint_t uHeight,
const Dxt5Packet_t * pInput,
uintptr_t uInputStride )
extern

Decompress an array of 4x4 block compressed with DXT5.


Given an array of 16 byte blocks of DXT5 compressed data, extract the 4x4 RGBA color blocks into a bit map.

Note
This function will handle clipping if the destination bitmap is not divisible by four in the width or height
Parameters
pOutputPointer to the start of a bitmap in the size of uWidth and uHeight RGBAWord8_t encoded 32 bit pixels.
uOutputStrideNumber of bytes per scan line of the output bit map (Usually it's uWidth*4)
uWidthWidth of the output bitmap in pixels
uHeightHeight of the output bitmap in pixels
pInputPointer to a matching bitmap of DXT5 compressed pixels
uInputStrideByte width of each scan line for the block of compressed data. (Usually it's uWidth*4)

◆ Delete() [1/2]

void BURGER_API Burger::Delete ( const Base * pInput)
externnoexcept

Delete a base class.


If the pointer passed is not nullptr, call the destructor and then dispose of the pointer with a call to Free(const void *)

Parameters
pInputPointer to a base class

◆ Delete() [2/2]

template<class T >
Burger::Delete ( const T * pInput)
noexcept

Dispose of a generic class instance.


When Burger::New<T> is called, release the memory with this call

Parameters
pInputnullptr or a valid pointer to a generic class to dispose of.
See also
Burger::New<T>()

◆ DesktopCopyComment() [1/3]

int BURGER_API Burger::DesktopCopyComment ( const FSRef * pFSRefDest,
const FSRef * pFSRefSource )
externnoexcept

Copy a comment from one file to another.


Given the source FSRef and the destination FSRef, read in the Desktop Manager comment associated with the source file and write a copy of the comment found onto the destination file.

While this code can read comments from both the Desktop Manager and the Desktop resource file, it is limited to only writing to systems with a Desktop Manager. If the destination file resides on a different volume as the source and the destination uses a "Desktop" resource file, this call will always fail. However, if the source and destination reside on the same volume that uses a Desktop file, this call is moot because the resource string already exists in the destination file's resource fork if the destination file is a copy of the source file.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pFSRefDestPointer to the FSSpec of the destination file
pFSRefSourcePointer to the FSSpec of the source file
Returns
Zero if no error, or mac error code
See also
DesktopCopyComment(short, long, const uint8_t*, short, long, const uint8_t*)

◆ DesktopCopyComment() [2/3]

int BURGER_API Burger::DesktopCopyComment ( const FSSpec * pFSSpecDest,
const FSSpec * pFSSpecSource )
externnoexcept

Copy a comment from one file to another.


Given the source FSSpec and the destination FSSpec, read in the Desktop Manager comment associated with the source file and write a copy of the comment found onto the destination file.

While this code can read comments from both the Desktop Manager and the Desktop resource file, it is limited to only writing to systems with a Desktop Manager. If the destination file resides on a different volume as the source and the destination uses a "Desktop" resource file, this call will always fail. However, if the source and destination reside on the same volume that uses a Desktop file, this call is moot because the resource string already exists in the destination file's resource fork if the destination file is a copy of the source file.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pFSSpecDestPointer to the FSSpec of the destination file
pFSSpecSourcePointer to the FSSpec of the source file
Returns
Zero if no error, or mac error code
See also
DesktopCopyComment(short, long, const uint8_t*, short, long, const uint8_t*)

◆ DesktopCopyComment() [3/3]

int BURGER_API Burger::DesktopCopyComment ( short svRefNumDest,
long lDirIDDest,
const uint8_t * pFilenameDest,
short svRefNumSource,
long lDirIDSource,
const uint8_t * pFilenameSource )
externnoexcept

Copy a comment from one file to another.


Given the volume, directory ID and filename for a source and destination file, read in the Desktop Manager comment associated with the source file and write a copy of the comment found onto the destination file.

While this code can read comments from both the Desktop Manager and the Desktop resource file, it is limited to only writing to systems with a Desktop Manager. If the destination file resides on a different volume as the source and the destination uses a "Desktop" resource file, this call will always fail. However, if the source and destination reside on the same volume that uses a Desktop file, this call is moot because the resource string already exists in the destination file's resource fork if the destination file is a copy of the source file.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
svRefNumDestVolume reference number of the destination file
lDirIDDestParent ID of the destination file
pFilenameDestPointer to a Pascal string for the destination file
svRefNumSourceVolume reference number of the source file
lDirIDSourceParent ID of the source file
pFilenameSourcePointer to a Pascal string for the source file
Returns
Zero if no error, or mac error code
See also
DesktopGetComment(char*, short, long, const uint8_t*) or DesktopSetComment(short, long, const uint8_t*, const char*)

◆ DesktopGetComment()

int BURGER_API Burger::DesktopGetComment ( char * pOutput,
short svRefNum,
long lDirID,
const uint8_t * pFilename )
externnoexcept

Get a comment from the Desktop Manager.


Given a file's volume, directory and filename, check the desktop manager if the database is active and query it for any associated comment. If the desktop database is not supported, check for the "Desktop" file found on many network shares and query it for the comment.

If there are no errors and there was a comment, the pOutput buffer will have a "C" string of the comment. It will be set to an empty string on error or if there was no comment found.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pOutputPointer to a 256 byte buffer to receive the comment "C" string
svRefNumVolume reference number of the file to check
lDirIDParent ID of the file to check
pFilenamePointer to a Pascal string for the filename to check
Returns
Zero if no error, or mac error code
See also
DesktopSetComment(short, long, const uint8_t*, const char*)

◆ DesktopOpen()

int BURGER_API Burger::DesktopOpen ( const uint8_t * pVolumeName,
short svRefNum,
short * pRefNum,
uint_t * pbDatabaseCreated )
externnoexcept

Open the desktop manager database.


Given a volume reference number, open the finder database and return a reference to the open file.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pVolumeNamePointer to a Pascal string of the volume name
svRefNumVolume reference number of the file to check
pRefNumPointer to variable to receive the open file reference
pbDatabaseCreatedPointer to receive boolean if the database was created, can be nullptr
Returns
Zero if no error, or mac error code

◆ DesktopSetComment()

int BURGER_API Burger::DesktopSetComment ( short svRefNum,
long lDirID,
const uint8_t * pFilename,
const char * pComment )
externnoexcept

Get a comment from the Desktop Manager.


Given a file's volume, directory and filename, check the desktop manager if the database is active and set the comment to the given file. If the desktop database is not supported, no transfer is performed.

Comments are limited to a maximum of 200 characters. If the comment string is longer than 200 characters, it will be truncated.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
svRefNumVolume reference number of the file to set the comment
lDirIDParent ID of the file
pFilenamePointer to a Pascal string for the filename of the file
pCommentPointer to a "C" string to set as a comment.
Returns
Zero if no error, or mac error code
See also
DesktopGetComment(char*, short, long, const uint8_t*)

◆ DetermineVRefNum()

int BURGER_API Burger::DetermineVRefNum ( short * pOutput,
short svRefNum )
externnoexcept

Find the real volume reference number.


Given a volume reference number, get its information and determine if it is an alias or a real number. This function will call PBHGetVInfoSync and may return a different number that was passed in. This number is the true device number.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pOutputPointer to receive the returned volume reference number
svRefNumVolume reference number
Returns
Zero if no error, or mac error code

◆ DJB2_hash_add()

uintptr_t BURGER_API Burger::DJB2_hash_add ( const void * pInput,
uintptr_t uInputCount,
uint32_t uHashSeed = 5381U )
externnoexcept

Hash data using the djb2 (Daniel Julius Bernstein) algorithm.


This algorithm (k=33) was first reported by Dan Bernstein many years ago in comp.lang.c. This uses hash(i) = hash(i - 1) * 33 + str[i];

The magic of number 33 (why it works better than many other constants, prime or not) has never been adequately explained.

Further reading: http://www.cs.yorku.ca/~oz/hash.html#djb2

Parameters
pInputPointer to the data to hash
uInputCountNumber of bytes of data to hash
uHashSeedValue to seed the hash with.
Returns
32 bit hash value generated by the data.
See also
DJB2_hash_add_case(const void *,uintptr_t,uint32_t), or DJB2_hash_xor(const void *,uintptr_t,uint32_t)

◆ DJB2_hash_add_case()

uintptr_t BURGER_API Burger::DJB2_hash_add_case ( const void * pInput,
uintptr_t uInputCount,
uint32_t uHashSeed = 5381U )
externnoexcept

Hash string data using forced lower case using the djb2 (Daniel Julius Bernstein) algorithm.


This algorithm (k=33) was first reported by Dan Bernstein many years ago in comp.lang.c. This uses hash(i) = hash(i - 1) * 33 + ToLower(str[i]);

The magic of number 33 (why it works better than many other constants, prime or not) has never been adequately explained.

Further reading: http://www.cs.yorku.ca/~oz/hash.html#djb2

Note
This function converts all upper case characters into lower case to yield a case insensitive hash
Parameters
pInputPointer to the data to hash
uInputCountNumber of bytes of data to hash
uHashSeedValue to seed the hash with.
Returns
32 bit hash value generated by the data.
See also
DJB2_hash_add(const void *,uintptr_t,uint32_t), or DJB2_hash_xor_case(const void *,uintptr_t,uint32_t)

◆ DJB2_hash_xor()

uintptr_t BURGER_API Burger::DJB2_hash_xor ( const void * pInput,
uintptr_t uInputCount,
uint32_t uHashSeed = 5381U )
externnoexcept

Hash data using the djb2 (Daniel Julius Bernstein) algorithm.


This algorithm (k=33) was first reported by Dan Bernstein many years ago in comp.lang.c. This uses hash(i) = hash(i - 1) * 33 ^ str[i];

The magic of number 33 (why it works better than many other constants, prime or not) has never been adequately explained.

Further reading: http://www.cs.yorku.ca/~oz/hash.html#djb2

Parameters
pInputPointer to the data to hash
uInputCountNumber of bytes of data to hash
uHashSeedValue to seed the hash with.
Returns
32 bit hash value generated by the data.
See also
DJB2_hash_xor_case(const void *,uintptr_t,uint32_t), or DJB2_hash_add(const void *,uintptr_t,uint32_t)

◆ DJB2_hash_xor_case()

uintptr_t BURGER_API Burger::DJB2_hash_xor_case ( const void * pInput,
uintptr_t uInputCount,
uint32_t uHashSeed = 5381U )
externnoexcept

Hash string data using forced lower case using the djb2 (Daniel Julius Bernstein) algorithm.


This algorithm (k=33) was first reported by Dan Bernstein many years ago in comp.lang.c. This uses hash(i) = hash(i - 1) * 33 ^ ToLower(str[i]);

The magic of number 33 (why it works better than many other constants, prime or not) has never been adequately explained.

Further reading: http://www.cs.yorku.ca/~oz/hash.html#djb2

Note
This function converts all upper case characters into lower case to yield a case insensitive hash
Parameters
pInputPointer to the data to hash
uInputCountNumber of bytes of data to hash
uHashSeedValue to seed the hash with.
Returns
32 bit hash value generated by the data.
See also
DJB2_hash_xor(const void *,uintptr_t,uint32_t), or DJB2_hash_add_case(const void *,uintptr_t,uint32_t)

◆ DJB2HashAddCaseFunctor()

uintptr_t BURGER_API Burger::DJB2HashAddCaseFunctor ( const void * pData,
uintptr_t uDataSize )
externnoexcept

Case insensitive DJB2 Additive hash callback for HashMapShared.


Invoke the DJB2 Additive hashing algorithm on the contents of a class using the default seed value and convert all upper case characters into lower case.

Parameters
pDataPointer to a data chunk to hash
uDataSizeSize of the data chunk in bytes
Returns
32 bit wide hash of the class
See also
DJB2HashAddFunctor(), HashMapShared or DJB2HashAddCase()

◆ DJB2HashAddFunctor()

uintptr_t BURGER_API Burger::DJB2HashAddFunctor ( const void * pData,
uintptr_t uDataSize )
externnoexcept

DJB2 Additive hash callback for HashMapShared.


Invoke the DJB2 Additive hashing algorithm on the contents of a class using the default seed value.

Parameters
pDataPointer to a data chunk to hash
uDataSizeSize of the data chunk in bytes
Returns
32 bit wide hash of the class
See also
DJB2HashAddCaseFunctor(), HashMapShared or DJB2HashAdd()

◆ DJB2HashXorCaseFunctor()

uintptr_t BURGER_API Burger::DJB2HashXorCaseFunctor ( const void * pData,
uintptr_t uDataSize )
externnoexcept

DJB2 Exclusive Or hash callback for HashMapShared.


Invoke the DJB2 Exclusive Or hashing algorithm on the contents of a class using the default seed value.

Parameters
pDataPointer to a data chunk to hash
uDataSizeSize of the data chunk in bytes
Returns
32 bit wide hash of the class
See also
DJB2HashXorFunctor(), HashMapShared or DJB2HashXorCase()

◆ DJB2HashXorFunctor()

uintptr_t BURGER_API Burger::DJB2HashXorFunctor ( const void * pData,
uintptr_t uDataSize )
externnoexcept

DJB2 Exclusive Or hash callback for HashMapShared.


Invoke the DJB2 Exclusive Or hashing algorithm on the contents of a class using the default seed value.

Parameters
pDataPointer to a data chunk to hash
uDataSizeSize of the data chunk in bytes
Returns
32 bit wide hash of the class
See also
DJB2HashXorCaseFunctor(), HashMapShared or DJB2HashXor()

◆ DJB2StringHashXorCaseFunctor()

uintptr_t BURGER_API Burger::DJB2StringHashXorCaseFunctor ( const void * pData,
uintptr_t uDataSize )
externnoexcept

Case insensitive DJB2 Exclusive Or hash callback for HashMapStringCase.


Invoke the case insensitive DJB2 Exclusive Or hashing algorithm on the contents of a String class using the default seed value.

Parameters
pDataPointer to a String to hash with case insensitivity
uDataSizeSize of the data chunk in bytes (Not used)
Returns
32 bit wide hash of the class
See also
DJB2StringHashXorFunctor(), HashMapStringCase or DJB2HashXorCase()

◆ DJB2StringHashXorFunctor()

uintptr_t BURGER_API Burger::DJB2StringHashXorFunctor ( const void * pData,
uintptr_t uDataSize )
externnoexcept

DJB2 Exclusive Or hash callback for HashMapString.


Invoke the DJB2 Exclusive Or hashing algorithm on the contents of a String class using the default seed value.

Parameters
pDataPointer to a String to hash
uDataSizeSize of the data chunk in bytes (Not used)
Returns
32 bit wide hash of the class
See also
DJB2StringHashXorCaseFunctor(), HashMapString or DJB2HashXor()

◆ DoCopyFile() [1/2]

int BURGER_API Burger::DoCopyFile ( const FSSpec * pFSDest,
const FSSpec * pFSSource )
externnoexcept

Copy a file using PBHCopyFileSync()


Use the Mac OS call PBHCopyFileSync() to copy a file from one place to another on the same volume. This call will fail if either the source and destination volumes are different or if the volume doesn't support file copying. Use has_copy_file(const GetVolParmsInfoBuffer*) to test if a volume supports this call before invoking it.

Network drives almost always implement this API

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pFSDestFSSpec for where the file will be copied to
pFSSourceFSSpec of the file being copied
Returns
Zero if no error, or mac error code
See also
DoCopyFile(short, long, const uint8_t* , short, long, const uint8_t*) and has_copy_file(const GetVolParmsInfoBuffer*)

◆ DoCopyFile() [2/2]

int BURGER_API Burger::DoCopyFile ( short svRefNumDest,
long lDirIDDest,
const uint8_t * pFilenameDest,
short svRefNumSource,
long lDirIDSource,
const uint8_t * pFilenameSource )
externnoexcept

Copy a file using PBHCopyFileSync()


Use the Mac OS call PBHCopyFileSync() to copy a file from one place to another on the same volume. This call will fail if either the source and destination volumes are different or if the volume doesn't support file copying. Use has_copy_file(const GetVolParmsInfoBuffer*) to test if a volume supports this call before invoking it.

Network drives almost always implement this API

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
svRefNumDestVolume reference number of the destination file
lDirIDDestParent ID of the destination file
pFilenameDestPointer to a Pascal string for the destination file
svRefNumSourceVolume reference number of the source file
lDirIDSourceParent ID of the source file
pFilenameSourcePointer to a Pascal string for the source file
Returns
Zero if no error, or mac error code
See also
DoCopyFile(const FSSpec*, const FSSpec*) and has_copy_file(const GetVolParmsInfoBuffer*)

◆ DoGetCatInfo() [1/6]

int BURGER_API Burger::DoGetCatInfo ( CInfoPBRec * pOutput,
const FSSpec * pFSSpec )
externnoexcept

Call PBGetCatInfoSync() quickly.


Given information about a file/folder, quickly obtain information about this file object and return the record. An internal buffer for the filename is removed from ioNamePtr before this function exits to prevent dangling pointers.

Parameters
pOutputPointer to empty CInfoPBRec to be filled in.
pFSSpecPointer to FSSpec for the file to be queried.
Returns
Zero if no error, otherwise return MacOS error code.

◆ DoGetCatInfo() [2/6]

int BURGER_API Burger::DoGetCatInfo ( CInfoPBRec * pOutput,
short sVRefNum,
long lDirID,
const uint8_t * pName )
externnoexcept

Call PBGetCatInfoSync() quickly.


Given information about a file/folder, quickly obtain information about this file object and return the record. An internal buffer for the filename is removed from ioNamePtr before this function exits to prevent dangling pointers.

Parameters
pOutputPointer to empty CInfoPBRec to be filled in.
sVRefNumVolume reference number
lDirIDCurrent directory ID
pNamePascal name of the file of interest, can be nullptr.
Returns
Zero if no error, otherwise return MacOS error code.

◆ DoGetCatInfo() [3/6]

int BURGER_API Burger::DoGetCatInfo ( CInfoPBRec * pOutput,
uint8_t pOutputName[256],
const FSSpec * pFSSpec )
externnoexcept

Call PBGetCatInfoSync() quickly.


Given information about a file/folder, quickly obtain information about this file object and return the record and the filename.

Parameters
pOutputPointer to empty CInfoPBRec to be filled in.
pOutputNamePointer to a 256 byte Pascal buffer for the filename.
pFSSpecPointer to the FSSpec of the file to be queried.
Returns
Zero if no error, otherwise return MacOS error code.
See also
DoGetCatInfo(CInfoPBRec*, uint8_t*, short, long, const uint8_t*)

◆ DoGetCatInfo() [4/6]

int BURGER_API Burger::DoGetCatInfo ( CInfoPBRec * pOutput,
uint8_t pOutputName[256],
short sVRefNum,
long lDirID,
const uint8_t * pName )
externnoexcept

Call PBGetCatInfoSync() quickly.


Given information about a file/folder, quickly obtain information about this file object and return the record and the filename.

Parameters
pOutputPointer to empty CInfoPBRec to be filled in.
pOutputNamePointer to a 256 byte Pascal buffer for the filename.
sVRefNumVolume reference number
lDirIDCurrent directory ID
pNamePascal string of the file of interest, can be nullptr.
Returns
Zero if no error, otherwise return MacOS error code.
See also
DoGetCatInfo(CInfoPBRec*, uint8_t*, const FSSpec *)

◆ DoGetCatInfo() [5/6]

int BURGER_API Burger::DoGetCatInfo ( FSCatalogInfo * pOutput,
const FSRef * pFSRef,
uint32_t uCatInfoBitmap )
externnoexcept

Call PBGetCatalogInfoSync() quickly.


Given information about a file/folder, quickly obtain information about this file object and return the record and the filename.

This function will return paramErr if PBGetCatalogInfoSync() is not supported on the version of MacOS

A FSRefParam record is used internally during the scope of this function and will be discarded on exit.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pOutputPointer to empty FSCatalogInfo to be filled in.
pFSRefPointer to the FSRef of the file to be queried.
uCatInfoBitmap32 bit catalog information bitmap
Returns
Zero if no error, otherwise return MacOS error code.
See also
DoGetCatInfo(CInfoPBRec*, uint8_t*, const FSSpec*)

◆ DoGetCatInfo() [6/6]

int BURGER_API Burger::DoGetCatInfo ( FSCatalogInfo * pOutput,
FSRefParam * pRefParam,
const FSRef * pFSRef,
uint32_t uCatInfoBitmap )
externnoexcept

Call PBGetCatalogInfoSync() quickly.


Given information about a file/folder, quickly obtain information about this file object and return the record and the filename.

This function will return paramErr if PBGetCatalogInfoSync() is not supported on the version of MacOS

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pOutputPointer to empty FSCatalogInfo to be filled in.
pRefParamPointer to an unitialized FSRefParam buffer.
pFSRefPointer to the FSRef of the file to be queried.
uCatInfoBitmap32 bit catalog information bitmap
Returns
Zero if no error, otherwise return MacOS error code.
See also
DoGetCatInfo(CInfoPBRec*, uint8_t*, const FSSpec*)

◆ DoPBXGetVolInfoSync()

int BURGER_API Burger::DoPBXGetVolInfoSync ( XVolumeParam * pXVolumeParam)
externnoexcept

Call PBXGetVolInfoSync() on all targets.


On 68K CFM and PPC non-carbon targets, the symbol PBXGetVolInfoSync() was not properly exposed in InterfaceLib until MacOS 8.5. So, for those poor unforunate souls running on MacOS 7.1 - 8.1 have to use a peice of glue code that jumps to 68000 via the trap manager.

For Carbon PPC and 68K classic apps, this function directly calls PBXGetVolInfoSync()

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pXVolumeParamPointer to a XVolumeParam record
Returns
Zero if no error, or mac error code

◆ EdgeIntersectTest()

void BURGER_API Burger::EdgeIntersectTest ( float * pEdge1VSEdge2,
float * pEdge2VSEdge1,
const Vector2D_t * pEdge1V1,
const Vector2D_t * pEdge1V2,
const Vector2D_t * pEdge2V1,
const Vector2D_t * pEdge2V2 )
extern

Test two edges for intersection.


Test two edge line segments and determine if they are on top of each other, crossing or not crossing.

Parameters
pEdge1VSEdge2Return negative if Edge1 crossing Edge2, 0 if touching, positive if not crossing
pEdge2VSEdge1Return negative if Edge2 crossing Edge1, 0 if touching, positive if not crossing
pEdge1V1Pointer to the first vertex of Edge1
pEdge1V2Pointer to the second vertex of Edge1
pEdge2V1Pointer to the first vertex of Edge2
pEdge2V2Pointer to the second vertex of Edge2

◆ EndWithLinuxSlashes() [1/2]

void BURGER_API Burger::EndWithLinuxSlashes ( char * pInput)
externnoexcept

Force the last character of a string to be '/'.


Linux uses forward slashes as directory separators. This function will take Windows style slashes and convert them into Linux slashes. It will also append a '/' character to the end of the string if a slash wasn't already there.

Parameters
pInputPointer to the "C" string to perform the fix up on. nullptr will page fault.
See also
EndWithLinuxSlashes(char *,const char *)

◆ EndWithLinuxSlashes() [2/2]

void BURGER_API Burger::EndWithLinuxSlashes ( char * pOutput,
const char * pInput )
externnoexcept

Copy a string and force the last character of a string to be '/'.


Linux uses forward slashes as directory separators. This function will take Windows style slashes and convert them into Linux slashes. It will also append a '/' character to the end of the string if a slash wasn't already there.

Parameters
pOutputPointer to a buffer large enough to hold the converted "C" string.
pInputPointer to the "C" string to perform the fix up on. nullptr will page fault.
See also
EndWithLinuxSlashes(char *)

◆ EndWithWindowsSlashes() [1/2]

void BURGER_API Burger::EndWithWindowsSlashes ( char * pInput)
externnoexcept

Force the last character of a string to be '\'.


Windows uses backslashes as directory separators. This function will take Linux style slashes and convert them into Windows slashes. It will also append a '\' character to the end of the string if a slash wasn't already there.

Parameters
pInputPointer to the "C" string to perform the fix up on. nullptr will page fault.
See also
EndWithWindowsSlashes(char *,const char *)

◆ EndWithWindowsSlashes() [2/2]

void BURGER_API Burger::EndWithWindowsSlashes ( char * pOutput,
const char * pInput )
externnoexcept

Copy a string and force the last character of a string to be '\'.


Windows uses backslashes as directory separators. This function will take Linux style slashes and convert them into Windows slashes. It will also append a '\' character to the end of the string if a slash wasn't already there.

Parameters
pOutputPointer to a buffer large enough to hold the converted "C" string.
pInputPointer to the "C" string to perform the fix up on. nullptr will page fault.
See also
EndWithWindowsSlashes(char *)

◆ equal_with_epsilon() [1/4]

uint_t BURGER_API Burger::equal_with_epsilon ( double dInput1,
double dInput2 )
externnoexcept

Return TRUE if the values are less than epsilon apart.


Test if two numbers are less than or equal apart than the epsilon of 1e-6.

Note
The epsilon is not a constant, it's multiplied to scale with the magnitude
// Example
double dDelta = absolute(dInput1-dInput2);
dInput1 = absolute(dInput1);
dInput2 = absolute(dInput2);
return (dInput1 > dInput2) ? (dDelta <= (dInput1 * 1e-6)) : (dDelta <=
(dInput2 * 1e-6));
float absolute(float fInput) noexcept
Get the absolute value of a float.
Definition brfloatingpoint.cpp:394
Parameters
dInput1A 64 bit floating point number to test
dInput2Another 64 bit floating point number to test
Returns
TRUE if less than epsilon apart, FALSE if not.
See also
equal_with_epsilon(double,double,double), equal_with_epsilon(float,float)

◆ equal_with_epsilon() [2/4]

uint_t BURGER_API Burger::equal_with_epsilon ( double dInput1,
double dInput2,
double dEpsilon )
externnoexcept

Return TRUE if the values are less than epsilon apart.


Test if two numbers are less than or equal apart than the epsilon of 1e-6.

Note
The epsilon is not a constant, it's multiplied to scale with the magnitude
// Example
double dDelta = absolute(dInput1-dInput2);
dInput1 = absolute(dInput1);
dInput2 = absolute(dInput2);
return (dInput1 > dInput2) ? (dDelta <= (dInput1 * dEpsilon)) : (dDelta <=
(dInput2 * dEpsilon));
Parameters
dInput1A 64 bit floating point number to test
dInput2Another 64 bit floating point number to test
dEpsilonEpsilon to test with
Returns
TRUE if less than epsilon apart, FALSE if not.
See also
equal_with_epsilon(double,double), equal_with_epsilon(float,float,float)

◆ equal_with_epsilon() [3/4]

uint_t BURGER_API Burger::equal_with_epsilon ( float fInput1,
float fInput2 )
externnoexcept

Return TRUE if the values are less than epsilon apart.


Test if two numbers are less than or equal apart than the epsilon of 1e-6f.

Note
The epsilon is not a constant, it's multiplied to scale with the magnitude
// Example
float fDelta = absolute(fInput1-fInput2);
fInput1 = absolute(fInput1);
fInput2 = absolute(fInput2);
return (fInput1 > fInput2) ? (fDelta <= (fInput1 * 1e-6f)) : (fDelta <=
(fInput2 * 1e-6f));
Parameters
fInput1A 32 bit floating point number to test
fInput2Another 32 bit floating point number to test
Returns
TRUE if less than epsilon apart, FALSE if not.
See also
equal_with_epsilon(float,float,float), equal_with_epsilon(double,double)

◆ equal_with_epsilon() [4/4]

uint_t BURGER_API Burger::equal_with_epsilon ( float fInput1,
float fInput2,
float fEpsilon )
externnoexcept

Return TRUE if the values are less than epsilon apart.


Test if two numbers are less than or equal apart than the epsilon of 1e-6f.

Note
The epsilon is not a constant, it's multiplied to scale with the magnitude
// Example
float fDelta = absolute(fInput1-fInput2);
fInput1 = absolute(fInput1);
fInput2 = absolute(fInput2);
return (fInput1 > fInput2) ? (fDelta <= (fInput1 * fEpsilon)) : (fDelta <=
(fInput2 * fEpsilon));
Parameters
fInput1A 32 bit floating point number to test
fInput2Another 32 bit floating point number to test
fEpsilonEpsilon to test with
Returns
TRUE if less than epsilon apart, FALSE if not.
See also
equal_with_epsilon(float,float), equal_with_epsilon(double,double,double)

◆ error_get_string()

uintptr_t BURGER_API Burger::error_get_string ( char * pOutput,
uintptr_t uOutputSize,
eError uError )
externnoexcept

Convert error code to a meaningful message.


Sometimes it's better to get an string explaining the error code. It's implemented in a way that it will never allocate memory, therefore it can safely be called from an error handler.

It the output buffer size is set to zero, it will not attempt to return any string data, just the length of the output in case the caller needs to know the size of the data in advance to allocate a buffer. In a majority of cases, a 256 byte hard coded buffer will suffice.

Parameters
pOutputPointer to the buffer to receive the "C" string
uOutputSizeLength of the output buffer.
uErrorError code to convert to message.
Returns
Length in bytes of the string being returned.
See also
error_lookup_string(eError)

◆ error_lookup_string()

const char *BURGER_API Burger::error_lookup_string ( eError uError)
externnoexcept

Convert a Burgerlib error code into a string.


Look up a Burgerlib error code into an array of error messages and return a pointer to a "C" string with a message in English giving a meaningful message.

Note
A string is always returned, so no need to test for nullptr. The string pointer does not need to be released or freed.
Parameters
uErrorError code to convert to message.
Returns
Pointer to a "C" string with an error.
See also
error_get_string(char *, uintptr_t, eError)

◆ FileCopy() [1/2]

int BURGER_API Burger::FileCopy ( const FSSpec * pFSSpecSource,
const FSSpec * pFSSpecDestFolder,
const uint8_t * pCopyname,
void * pBuffer,
uintptr_t uBufferSize,
uint_t bPreflight )
externnoexcept

Copy a file, with AppleShare awareness.


If the file system supports it, copy with PBHCopyFile(), otherwise, manually copy a file from one volume to another and also copy the finder metadata and comments.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pFSSpecSourceFSSpec of the source file
pFSSpecDestFolderFSSpec of the destination folder
pCopynamePointer to a PASCAL string of the new name for the destination file
pBufferPointer to a buffer to use for data transfer
uBufferSizeSize in bytes of the data transfer buffer
bPreflightSet to TRUE if the destination volume should be checked for free space
Returns
Zero if no error, or mac error code
See also
FileCopy(short, long, const uint8_t, short, long, const uint8_t*, const uint8_t*, void*, uintptr_t, uint_t)

◆ FileCopy() [2/2]

int Burger::FileCopy ( short svRefNumSource,
long lDirIDSource,
const uint8_t * pFilenameSource,
short svRefNumDest,
long lDirIDDest,
const uint8_t * pFilenameDest,
const uint8_t * pCopyname,
void * pBuffer,
uintptr_t uBufferSize,
uint_t bPreflight )
externnoexcept

Copy a file, with AppleShare awareness.


If the file system supports it, copy with PBHCopyFile(), otherwise, manually copy a file from one volume to another and also copy the finder metadata and comments.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
svRefNumSourceVolume of the source file
lDirIDSourceDirectory ID the source file
pFilenameSourcePointer to a PASCAL string of the source file
svRefNumDestVolume of the destination folder
lDirIDDestDirectory ID the destination folder
pFilenameDestPointer to a PASCAL string of the destination folder
pCopynamePointer to a PASCAL string of the new name for the destination file
pBufferPointer to a buffer to use for data transfer
uBufferSizeSize in bytes of the data transfer buffer
bPreflightSet to TRUE if the destination volume should be checked for free space
Returns
Zero if no error, or mac error code
See also
FileCopy(const FSSpec *, const FSSpec*, const uint8_t*, void*, uintptr_t, uint_t)

◆ FillPalette() [1/2]

void BURGER_API Burger::FillPalette ( RGBAWord8_t * pOutput,
const RGBAWord8_t * pInput,
uintptr_t uPaletteSize = 256 )
extern

Fill an RGBA palette with a specific color.


Set all values to a specific color

Parameters
pOutputPointer to the palette to fill
pInputPointer to the color to fill with
uPaletteSizeNumber of color entries to set
See also
FillPalette(RGBWord8_t *,const RGBWord8_t *,uintptr_t)

◆ FillPalette() [2/2]

void BURGER_API Burger::FillPalette ( RGBWord8_t * pOutput,
const RGBWord8_t * pInput,
uintptr_t uPaletteSize = 256 )
extern

Fill an RGB palette with a specific color.


Set all values to a specific color

Parameters
pOutputPointer to the palette to fill
pInputPointer to the color to fill with
uPaletteSizeNumber of color entries to set
See also
FillPalette(RGBAWord8_t *,const RGBAWord8_t *,uintptr_t)

◆ FindAIFFChunk()

const void *BURGER_API Burger::FindAIFFChunk ( const void * pInput,
uintptr_t uLength,
uint32_t uChunkName )
extern

Scan an AIFF file for a specific chunk.


Scan an AIFF file in memory and return pointer to a chunk or NULL if the chunk was not found

Parameters
pInputPointer to the AIFF file in memory
uLengthLength of the AIFF file in memory
uChunkName4 byte code of the chunk to find in ASCII format 'CODE' = 0x434F4445U big endian or 0x45444F43U on little endian machines
Returns
Pointer to the start of the chunk located, or NULL if not found

◆ FindRIFFChunk()

const void *BURGER_API Burger::FindRIFFChunk ( const void * pInput,
uintptr_t uLength,
uint32_t uChunkName )
extern

Scan a RIFF file for a specific chunk.


Scan a RIFF file in memory and return pointer to a chunk or NULL if the chunk was not found

Parameters
pInputPointer to the WAV/RIFF file in memory
uLengthLength of the WAV/RIFF file in memory
uChunkName4 byte code of the chunk to find in ASCII format 'CODE' = 0x434F4445U native endian
Returns
Pointer to the start of the chunk located, or NULL if not found

◆ fixed_to_float() [1/4]

Burger::fixed_to_float ( const Fixed32 * pInput)
inlinenoexcept

32 bit 16.16 fixed point integer to floating point conversion


Parameters
pInputPointer to a 32 bit 16.16 fixed point integer to convert
Returns
Floating point representation of the integer input
See also
fixed_to_float(Fixed32), fixed_to_float(float *,Fixed32) or fixed_to_float(float *,const Fixed32 *)

◆ fixed_to_float() [2/4]

Burger::fixed_to_float ( Fixed32 iInput)
inlineconstexprnoexcept

32 bit 16.16 fixed point integer to floating point conversion


Parameters
iInput32 bit 16.16 fixed point integer to convert
Returns
Floating point representation of the integer input
See also
fixed_to_float(const Fixed32 *), fixed_to_float(float *,Fixed32) or fixed_to_float(float *,const Fixed32 *)

◆ fixed_to_float() [3/4]

Burger::fixed_to_float ( float * pOutput,
const Fixed32 * pInput )
inlinenoexcept

32 bit 16.16 fixed point integer to floating point conversion


Note
This function is fast on the Xbox 360, PS3 and PowerPC64 MacOSX due to direct use of VMX128 instructions
Parameters
pInputPointer to a 32 bit 16.16 fixed point integer to convert
pOutputPointer to a 32 bit float to receive the converted integer
See also
fixed_to_float(Fixed32), fixed_to_float(const Fixed32 *) or fixed_to_float(float *,Fixed32)

◆ fixed_to_float() [4/4]

Burger::fixed_to_float ( float * pOutput,
Fixed32 iInput )
inlinenoexcept

32 bit 16.16 fixed point integer to floating point conversion


Parameters
iInput32 bit 16.16 fixed point integer to convert
pOutputPointer to a 32 bit float to receive the converted integer
See also
fixed_to_float(Fixed32), fixed_to_float(const Fixed32 *) or fixed_to_float(float *,const Fixed32 *)

◆ fixed_to_int()

Burger::fixed_to_int ( Fixed32 fInput)
inlinenoexcept

Convert a fixed point value to an integer using round to zero.


Convert a Fixed32 into an integer using round to zero.

#define BURGER_FLOAT_TO_FIXED(x)
Define to convert a float into a Fixed32.
Definition burger.h:9660
int32_t fixed_to_int(Fixed32 fInput) noexcept
Convert a fixed point value to an integer using round to zero.
Definition burger.h:9705
Parameters
fInputValue to convert to an integer.
Returns
The input converted to an integer using the truth table below.
See also
fixed_to_int_floor(Fixed32), fixed_to_int_ceil(Fixed32), or fixed_to_int_nearest(Fixed32)

◆ fixed_to_int_ceil()

Burger::fixed_to_int_ceil ( Fixed32 fInput)
inlinenoexcept

Convert a fixed point value to an integer using round up.


Convert a Fixed32 into an integer using the same formula as ceil().

int iResult;
int32_t fixed_to_int_ceil(Fixed32 fInput) noexcept
Convert a fixed point value to an integer using round up.
Definition burger.h:9710
Parameters
fInputValue to convert to an integer.
Returns
The input converted to an integer using the truth table below.
See also
get_ceiling(float), get_ceiling(double), fixed_to_int_floor(Fixed32), fixed_to_int(Fixed32), or fixed_to_int_nearest(Fixed32)

◆ fixed_to_int_floor()

Burger::fixed_to_int_floor ( Fixed32 fInput)
inlinenoexcept

Convert a fixed point value to an integer using round down.


Convert a Fixed32 into an integer using the same formula as floor().

int iResult;
int32_t fixed_to_int_floor(Fixed32 fInput) noexcept
Convert a fixed point value to an integer using round down.
Definition burger.h:9700
Parameters
fInputValue to convert to an integer.
Returns
The input converted to an integer using the truth table below.
See also
get_floor(float), get_floor(double), fixed_to_int(Fixed32), fixed_to_int_ceil(Fixed32), or fixed_to_int_nearest(Fixed32)

◆ fixed_to_int_nearest()

Burger::fixed_to_int_nearest ( Fixed32 fInput)
inlinenoexcept

Convert a fixed point value to an integer using round to nearest.


Convert a Fixed32 into an integer using round to nearest.

int iResult;
int32_t fixed_to_int_nearest(Fixed32 fInput) noexcept
Convert a fixed point value to an integer using round to nearest.
Definition burger.h:9715
Note
This can be used to replace FixRound() from MacOS.
Parameters
fInputValue to convert to an integer.
Returns
The input converted to an integer using the truth table below.
See also
get_round(float), get_round(double), fixed_to_int_floor(Fixed32), fixed_to_int(Fixed32), or fixed_to_int_ceil(Fixed32)

◆ FixedDivide()

Fixed32 BURGER_API Burger::FixedDivide ( Fixed32 fInputNumerator,
Fixed32 fInputDenominator )
inline

Divide two 16.16 fixed point numbers.


Divide a 16.16 fixed point number by another 16.16 fixed point number without saturation or checking for division by zero..

Parameters
fInputNumeratorSigned value to divide
fInputDenominatorSigned value to divide with
Returns
Result of fInputNumerator / fInputDenominator without saturation
Note
A divide by zero or an overflow can cause an exception error!
See also
FixedDivideSaturate(Fixed32,Fixed32), FixedReciprocal(Fixed32) or FixedMultiply(Fixed32,Fixed32)

◆ FixedMultiply()

Fixed32 BURGER_API Burger::FixedMultiply ( Fixed32 fInput1,
Fixed32 fInput2 )
inline

Multiply two 16.16 fixed point numbers.


Perform a signed multiplication of two 32-bit fixed point numbers and return the fixed point result. No error checking is performed, so overflow or underflow conditions yield undefined results.

Parameters
fInput1First signed value to multiply
fInput2Second signed value to multiply
Returns
Result of fInput1 * fInput2 without bounds checking
See also
FixedMultiplySaturate(Fixed32,Fixed32) or FixedDivide(Fixed32,Fixed32)

◆ FixedReciprocal()

Fixed32 BURGER_API Burger::FixedReciprocal ( Fixed32 fInput)
inline

Return the reciprocal of a fixed point number.


Divide a 16.16 fixed point number by BURGER_FLOAT_TO_FIXED(1.0f) in fixed point. If the input value is negative epsilon (0xFFFFFFFF), return 0x8000000. If the input is equal to 0 or positive epsilon (0x1), then return 0x7ffffff. This has the effect of saturating the output and leaving no output as undefined.

\param fInput \ref Fixed32 value to convert to a reciprocal.
\return Result of \ref BURGER_FLOAT_TO_FIXED(1.0f) / fInput with saturation

\note It's not recommended to input epsilon or 0 due to
saturation.

\sa FixedDivideSaturate(Fixed32,Fixed32) or FixedDivide(Fixed32,Fixed32)

◆ float_to_fixed_ceil() [1/2]

void BURGER_API Burger::float_to_fixed_ceil ( Fixed32 * pOutput,
float fInput )
externnoexcept

Convert a 32 bit float to a Fixed32 using ceil().


Convert a single precision floating point number to a Fixed32 using the ceil() form of fractional truncation and store it to memory

Parameters
pOutputA valid pointer to a Fixed32 to receive the result.
fInputA valid single precision floating point number.
See also
float_to_fixed_ceil(float), float_to_fixed_floor(Fixed32 *,float), float_to_fixed_round_to_zero(Fixed32 *,float), or float_to_fixed_round(Fixed32 *,float)

◆ float_to_fixed_ceil() [2/2]

Fixed32 BURGER_API Burger::float_to_fixed_ceil ( float fInput)
externnoexcept

Convert a 32 bit float to a Fixed32 using ceil().


Convert a single precision floating point number to a Fixed32 using the ceil() form of fractional truncation

Parameters
fInputA valid single precision floating point number.
Returns
a Fixed32 equivalent value after applying ceil() on the floating point number.
See also
float_to_fixed_ceil(Fixed32 *,float), float_to_fixed_floor(float), float_to_fixed_round_to_zero(float), or float_to_fixed_round(float)

◆ float_to_fixed_floor() [1/2]

void BURGER_API Burger::float_to_fixed_floor ( Fixed32 * pOutput,
float fInput )
externnoexcept

Convert a 32 bit float to a Fixed32 using floor().


Convert a single precision floating point number to a Fixed32 using the floor() form of fractional truncation and store it to memory

Parameters
pOutputA valid pointer to a Fixed32 to receive the result.
fInputA valid single precision floating point number.
See also
float_to_fixed_floor(float), float_to_fixed_round_to_zero(Fixed32*,float), float_to_fixed_ceil(Fixed32 *,float), or float_to_fixed_round(Fixed32*,float)

◆ float_to_fixed_floor() [2/2]

Fixed32 BURGER_API Burger::float_to_fixed_floor ( float fInput)
externnoexcept

Convert a 32 bit float to a Fixed32 using floor().


Convert a single precision floating point number to a Fixed32 using the floor() form of fractional truncation

Parameters
fInputA valid single precision floating point number.
Returns
a Fixed32 equivalent value after applying floor() on the floating point number.
See also
float_to_fixed_floor(Fixed32 *,float), float_to_fixed_round_to_zero(float), float_to_fixed_ceil(float), or float_to_fixed_round(float)

◆ float_to_fixed_round() [1/2]

void BURGER_API Burger::float_to_fixed_round ( Fixed32 * pOutput,
float fInput )
externnoexcept

Convert a 32 bit float to a Fixed32 using round to nearest.


Convert a single precision floating point number to a Fixed32 using the round to nearest fractional truncation and store it to memory

Parameters
pOutputA valid pointer to a Fixed32 to receive the result.
fInputA valid single precision floating point number.
See also
float_to_fixed_round(float), float_to_fixed_floor(Fixed32 *,float), float_to_fixed_round_to_zero(Fixed32 *,float), or float_to_fixed_ceil(Fixed32 *,float)

◆ float_to_fixed_round() [2/2]

Fixed32 BURGER_API Burger::float_to_fixed_round ( float fInput)
externnoexcept

Convert a 32 bit float to a Fixed32 using round to nearest.


Convert a single precision floating point number to a Fixed32 using the round to nearest fractional truncation

Parameters
fInputA valid single precision floating point number.
Returns
a Fixed32 equivalent value after applying round to nearest on the floating point number.
See also
float_to_fixed_round(Fixed32 *,float), float_to_fixed_floor(float), float_to_fixed_round_to_zero(float), or float_to_fixed_ceil(float)

◆ float_to_fixed_round_to_zero() [1/2]

void BURGER_API Burger::float_to_fixed_round_to_zero ( Fixed32 * pOutput,
float fInput )
externnoexcept

Convert a 32 bit float to a Fixed32 using round to zero.


Convert a single precision floating point number to a Fixed32 using the round to zero fractional truncation and store it to memory

Parameters
pOutputA valid pointer to a Fixed32 to receive the result.
fInputA valid single precision floating point number.
See also
float_to_fixed_round_to_zero(float), float_to_fixed_floor(Fixed32*, float), float_to_fixed_ceil(Fixed32*, float), or float_to_fixed_round(Fixed32*, float)

◆ float_to_fixed_round_to_zero() [2/2]

Fixed32 BURGER_API Burger::float_to_fixed_round_to_zero ( float fInput)
externnoexcept

Convert a 32 bit float to a Fixed32 using round to zero.


Convert a single precision floating point number to a Fixed32 using the round to zero fractional truncation

Parameters
fInputA valid single precision floating point number.
Returns
a Fixed32 equivalent value after applying round to zero on the floating point number.
See also
float_to_fixed_round_to_zero(Fixed32 *,float), float_to_fixed_floor(float), float_to_fixed_ceil(float), or float_to_fixed_round(float)

◆ float_to_int_ceil() [1/2]

int32_t BURGER_API Burger::float_to_int_ceil ( float fInput)
externnoexcept

Convert a 32 bit float to an integer using ceil().


Convert a single precision floating point number to an integer using the ceil() form of fractional truncation

floorint = Burger::float_to_int_ceil(1.1f); //2
floorint = Burger::float_to_int_ceil(1.95f); //2
floorint = Burger::float_to_int_ceil(-1.1f); //-1
floorint = Burger::float_to_int_ceil(-1.95f); //-1
floorint = Burger::float_to_int_ceil(0.1f); //1
floorint = Burger::float_to_int_ceil(0.95f); //1
floorint = Burger::float_to_int_ceil(-0.1f); //0
floorint = Burger::float_to_int_ceil(-0.95f); //0
int32_t float_to_int_ceil(float fInput) noexcept
Convert a 32 bit float to an integer using ceil().
Definition brfixedpoint.cpp:493
Parameters
fInputA valid single precision floating point number.
Returns
Signed integer equivalent value after applying ceil() on the floating point number.
See also
float_to_int_ceil(int32_t *,float), float_to_int_floor(float), float_to_int_round_to_zero(float), or float_to_int_round(float)

◆ float_to_int_ceil() [2/2]

void BURGER_API Burger::float_to_int_ceil ( int32_t * pOutput,
float fInput )
externnoexcept

Convert a 32 bit float to an integer using ceil().


Convert a single precision floating point number to an integer using the ceil() form of fractional truncation and store it to memory

Burger::float_to_int_ceil(&floorint,1.1f); //2
Burger::float_to_int_ceil(&floorint,1.95f); //2
Burger::float_to_int_ceil(&floorint,-1.1f); //-1
Burger::float_to_int_ceil(&floorint,-1.95f); //-1
Burger::float_to_int_ceil(&floorint,0.1f); //1
Burger::float_to_int_ceil(&floorint,0.95f); //1
Burger::float_to_int_ceil(&floorint,-0.1f); //0
Burger::float_to_int_ceil(&floorint,-0.95f); //0
Parameters
pOutputA valid pointer to a 32-bit integer to receive the result.
fInputA valid single precision floating point number.
See also
float_to_int_ceil(float), float_to_int_floor(int32_t *,float), float_to_int_round_to_zero(int32_t *,float), or float_to_int_round(int32_t*, float)

◆ float_to_int_floor() [1/2]

int32_t BURGER_API Burger::float_to_int_floor ( float fInput)
externnoexcept

Convert a 32 bit float to an integer using floor().


Convert a single precision floating point number to an integer using the floor() form of fractional truncation (Round down)

floorint = Burger::float_to_int_floor(1.1f); //1
floorint = Burger::float_to_int_floor(1.95f); //1
floorint = Burger::float_to_int_floor(-1.1f); //-2
floorint = Burger::float_to_int_floor(-1.95f); //-2
floorint = Burger::float_to_int_floor(0.1f); //0
floorint = Burger::float_to_int_floor(0.95f); //0
floorint = Burger::float_to_int_floor(-0.1f); //-1
floorint = Burger::float_to_int_floor(-0.95f); //-1
int32_t float_to_int_floor(float fInput) noexcept
Convert a 32 bit float to an integer using floor().
Definition brfixedpoint.cpp:357
Parameters
fInputA valid single precision floating point number.
Returns
Signed integer equivalent value after applying floor() on the floating point number.
See also
float_to_int_floor(int32_t *,float), float_to_int_round_to_zero(float), float_to_int_ceil(float), or float_to_int_round(float)

◆ float_to_int_floor() [2/2]

void BURGER_API Burger::float_to_int_floor ( int32_t * pOutput,
float fInput )
externnoexcept

Convert a 32 bit float to an integer using floor().


Convert a single precision floating point number to an integer using the floor() form of fractional truncation and store it to memory

Burger::float_to_int_floor(&floorint,1.1f); //1
Burger::float_to_int_floor(&floorint,1.95f); //1
Burger::float_to_int_floor(&floorint,-1.1f); //-2
Burger::float_to_int_floor(&floorint,-1.95f); //-2
Burger::float_to_int_floor(&floorint,0.1f); //0
Burger::float_to_int_floor(&floorint,0.95f); //0
Burger::float_to_int_floor(&floorint,-0.1f); //-1
Burger::float_to_int_floor(&floorint,-0.95f); //-1
Parameters
pOutputA valid pointer to a 32-bit integer to receive the result.
fInputA valid single precision floating point number.
See also
float_to_int_floor(float), float_to_int_round_to_zero(int32_t *,float), float_to_int_ceil(int32_t *,float), or float_to_int_round(int32_t ,float)

◆ float_to_int_round() [1/2]

int32_t BURGER_API Burger::float_to_int_round ( float fInput)
externnoexcept

Convert a 32 bit float to an integer using round to nearest.


Convert a single precision floating point number to an integer using the round to nearest fractional truncation

floorint = Burger::float_to_int_round(1.1f); //1
floorint = Burger::float_to_int_round(1.95f); //2
floorint = Burger::float_to_int_round(-1.1f); //-1
floorint = Burger::float_to_int_round(-1.95f); //-2
floorint = Burger::float_to_int_round(0.1f); //0
floorint = Burger::float_to_int_round(0.95f); //1
floorint = Burger::float_to_int_round(-0.1f); //0
floorint = Burger::float_to_int_round(-0.95f); //-1
int32_t float_to_int_round(float fInput) noexcept
Convert a 32 bit float to an integer using round to nearest.
Definition brfixedpoint.cpp:632
Parameters
fInputA valid single precision floating point number.
Returns
Signed integer equivalent value after applying round to nearest on the floating point number.
See also
float_to_int_round(int32_t *,float), float_to_int_floor(float), float_to_int_round_to_zero(float), or float_to_int_ceil(float)

◆ float_to_int_round() [2/2]

void BURGER_API Burger::float_to_int_round ( int32_t * pOutput,
float fInput )
externnoexcept

Convert a 32 bit float to an integer using round to nearest.


Convert a single precision floating point number to an integer using the round to nearest fractional truncation and store it to memory

Burger::float_to_int_round(&floorint,1.1f); //1
Burger::float_to_int_round(&floorint,1.95f); //2
Burger::float_to_int_round(&floorint,-1.1f); //-1
Burger::float_to_int_round(&floorint,-1.95f); //-2
Burger::float_to_int_round(&floorint,0.1f); //0
Burger::float_to_int_round(&floorint,0.95f); //1
Burger::float_to_int_round(&floorint,-0.1f); //0
Burger::float_to_int_round(&floorint,-0.95f); //-1
Parameters
pOutputA valid pointer to a 32-bit integer to receive the result.
fInputA valid single precision floating point number.
See also
float_to_int_round(float), float_to_int_floor(int32_t *,float), float_to_int_round_to_zero(int32_t *,float), or float_to_int_ceil(int32_t *,float)

◆ float_to_int_round_to_zero() [1/2]

int32_t BURGER_API Burger::float_to_int_round_to_zero ( float fInput)
externnoexcept

Convert a 32 bit float to an integer using round to zero.


Convert a single precision floating point number to an integer using the round to zero fractional truncation

floorint = Burger::float_to_int_round_to_zero(1.95f); //1
floorint = Burger::float_to_int_round_to_zero(-1.1f); //-1
floorint = Burger::float_to_int_round_to_zero(-1.95f); //-1
floorint = Burger::float_to_int_round_to_zero(0.95f); //0
floorint = Burger::float_to_int_round_to_zero(-0.1f); //0
floorint = Burger::float_to_int_round_to_zero(-0.95f); //0
int32_t float_to_int_round_to_zero(float fInput) noexcept
Convert a 32 bit float to an integer using round to zero.
Definition brfixedpoint.cpp:816
Parameters
fInputA valid single precision floating point number.
Returns
Signed integer equivalent value after applying round to zero on the floating point number.
See also
float_to_int_round_to_zero(int32_t *,float), float_to_int_floor(float), float_to_int_ceil(float), or float_to_int_round(float)

◆ float_to_int_round_to_zero() [2/2]

void BURGER_API Burger::float_to_int_round_to_zero ( int32_t * pOutput,
float fInput )
externnoexcept

Convert a 32 bit float to an integer using round to zero.


Convert a single precision floating point number to an integer using the round to zero fractional truncation and store it to memory

Burger::float_to_int_round_to_zero(&floorint,-1.1f); //-1
Burger::float_to_int_round_to_zero(&floorint,-1.95f); //-1
Burger::float_to_int_round_to_zero(&floorint,-0.95f); //0
Parameters
pOutputA valid pointer to a 32-bit integer to receive the result.
fInputA valid single precision floating point number.
See also
float_to_int_round_to_zero(float), float_to_int_floor(int32_t *,float), float_to_int_ceil(int32_t *,float), or float_to_int_round(int32_t ,float)

◆ ForceTrailingChar()

void BURGER_API Burger::ForceTrailingChar ( char * pInput,
uint_t uLast )
externnoexcept

Force a character to be at the end of a string if missing.


Parse to the end of the string. If the last character is a match to uLast, then do nothing. Otherwise, append this single character to the end of the string and write a terminating zero after it. This function is a convenience routine used to ensure that a trailing ':' or '/' mark is at the end of a directory path.

Note
This function may grow the string by a single character. It is the caller's responsibility to ensure that the string buffer is large enough to accept a string that grows by 1 byte.
Parameters
pInputPointer to the "C" string to scan. nullptr will page fault.
uLast8 bit character to test the last char with.
See also
Burger::RemoveTrailingChar(char *,uint_t)

◆ Fprintf()

intptr_t BURGER_API Burger::Fprintf ( FILE * fp,
const char * pFormat,
uintptr_t uArgCount,
const ArgumentType ** ppArgs )
externnoexcept

printf() clone


Return value is the number of characters transmitted, or a negative value indicating an error occurred during the attempt.

  • Step 1) Parse the format string and arguments
  • Step 2) if no issues found in Step 1, execute the list of format & copy output commands.
Parameters
fpPointer to a FILE stream
pFormatPointer to a "C" format string
uArgCountNumber of arguments in the argument array
ppArgsArgument array, can be NULL if uArgCount is zero
Returns
Negative number for error, number of bytes processed on success

◆ Free()

void BURGER_API Burger::Free ( const void * pInput)
externnoexcept

Release memory.


Free memory using the Burger::GlobalMemoryManager. nullptr performs no operation.

Parameters
pInputPointer to memory to release.
See also
Burger::Alloc()

◆ free_platform_memory()

void BURGER_API Burger::free_platform_memory ( const void * pInput)
externnoexcept

Release memory back to the underlying operating system.


The handle based memory manager obtained the memory it controls from the operating system. This function releases the memory back. Generic systems call free(), other systems call the low level functions directly

On MacOS, this calls DisposePtr(), Windows calls HeapFree(), etc...

Parameters
pInputPointer to memory previously allocated by alloc_platform_memory(uintptr_t)
See also
alloc_platform_memory(uintptr_t)

◆ generate_crc_table() [1/2]

void BURGER_API Burger::generate_crc_table ( uint16_t * pOutput,
uint16_t uPolynomial = 0x8005U,
uint_t bBitReverse = 1 )
externnoexcept

Calculate a CRC16 polynomial table.


Calculates a 16-bit CRC table

The default polynomial format is X^16+X^15+X^2+X^0 or 0x8005, however any value can be entered

Implemented following the documentation found in http://en.wikipedia.org/wiki/Cyclic_redundancy_check

Note
This function was used to generate an internal table.
Parameters
pOutputPointer to a buffer to be checksummed
uPolynomialPolynomial to use (Default 0x8005)
bBitReverseTRUE if the bits are to be reversed (For CRC16-IBM)
See also
calc_crc16IBM(const void *,uintptr_t,uint16_t)

◆ generate_crc_table() [2/2]

void BURGER_API Burger::generate_crc_table ( uint32_t * pOutput,
uint32_t uPolynomial = 0x04C11DB7U,
uint_t bBitReverse = 1 )
externnoexcept

Calculate a CRC32 polynomial table.


Calculates a 32-bit CRC table

The default polynomial format is X^32+X^26+X^23+X^22+X^16+X^12+X^11+X^10+X^8+X^7+X^5+X^4+X^2+X^1+X^0 or 0x04C11DB7, however any value can be entered

Implemented following the documentation found in http://en.wikipedia.org/wiki/Cyclic_redundancy_check and http://wiki.osdev.org/CRC32

Note
This function was used to generate an internal table.
Parameters
pOutputPointer to a buffer to be checksummed
uPolynomialPolynomial to use (Default 0x04C11DB7U)
bBitReverseTRUE if the bits are to be reversed (For CRC32B)
See also
calc_crc32b(const void *,uintptr_t,uint32_t) or calc_crc32(const void *,uintptr_t,uint32_t)

◆ generate_GOST_table()

void BURGER_API Burger::generate_GOST_table ( uint32_t * pOutput,
const uint32_t pSBoxTable[8][16] = GOSTHasher_t::g_TestParmsSBox )
externnoexcept

Calculate a GOST polynomial table.


Calculates a 1024 entry shift index table

Implemented following the documentation found in https://en.wikipedia.org/wiki/GOST_(hash_function)

Note
This function was used to generate an internal table.
Parameters
pOutputPointer to a buffer to have the generated table store
pSBoxTablePointer to the 4 bit definition table

◆ get_8087_precision()

Burger::e8087Precision BURGER_API Burger::get_8087_precision ( void )
externnoexcept

Get the floating point precision.


On Intel 32 bit processors, there's a special floating point register to control the precision of the 80387 compatible FPU. This function returns the current setting.

Note
This function only exists on 32 bit Intel compatible CPU targets.
Returns
Current precision state
See also
e8087Precision or set_8087_precision(e8087Precision)

◆ get_8087_rounding()

Burger::e8087Rounding BURGER_API Burger::get_8087_rounding ( void )
externnoexcept

Get the floating point rounding setting.


On Intel 32 bit processors, there's a special floating point register to control the rounding behavior of the 80387 compatible FPU. This function returns the current setting.

Note
This function only exists on 32 bit Intel compatible CPU targets.
Returns
Current precision state
See also
e8087Rounding or set_8087_rounding(e8087Rounding)

◆ get_abspath()

Burger::eError BURGER_API Burger::get_abspath ( String * pOutput,
const char * pInput )
externnoexcept

Return the absolute path of a pathname.


On unix style machines, paths can start with ~ or ., whereas a prefix string needs to be inserted to get a full pathname. If there are /./ or /../ entries, they will be resolved.

Note
Unlike realpath(), this function does not look for the existence of the file, all parsing is done internally so files that haven't been created yet will still parse correctly.
Parameters
pOutputPointer to a String to receive the name in UTF-8 encoding
pInputPointer to a "C" string of the native unix pathname.
Returns
Zero on no error, or non zero on failure.

◆ get_arccosine() [1/2]

double BURGER_API Burger::get_arccosine ( double dInput)
externnoexcept

◆ get_arccosine() [2/2]

float BURGER_API Burger::get_arccosine ( float fInput)
externnoexcept

◆ get_arcsine() [1/2]

double BURGER_API Burger::get_arcsine ( double dInput)
externnoexcept

◆ get_arcsine() [2/2]

float BURGER_API Burger::get_arcsine ( float fInput)
externnoexcept

◆ get_arctangent() [1/2]

double BURGER_API Burger::get_arctangent ( double dInput)
externnoexcept

◆ get_arctangent() [2/2]

float BURGER_API Burger::get_arctangent ( float fInput)
externnoexcept

◆ get_arctangent2() [1/2]

double BURGER_API Burger::get_arctangent2 ( double dSin,
double dCos )
externnoexcept

◆ get_arctangent2() [2/2]

float BURGER_API Burger::get_arctangent2 ( float fSin,
float fCos )
externnoexcept

◆ get_ceiling() [1/2]

double BURGER_API Burger::get_ceiling ( double dInput)
externnoexcept

Return a floating point number rounded up.


If there is any fraction, round the value up to the next whole integer.

Parameters
dInput64 bit floating point value to round up to the nearest integer.
Returns
The input converted to a 64 bit floating point value using the truth table below.
double dResult;
dResult = Burger::get_ceiling(1.1); //2
dResult = Burger::get_ceiling(1.95); //2
dResult = Burger::get_ceiling(-1.1); //-1
dResult = Burger::get_ceiling(-1.95); //-1
dResult = Burger::get_ceiling(0.1); //1
dResult = Burger::get_ceiling(0.95); //1
dResult = Burger::get_ceiling(-0.1); //0
dResult = Burger::get_ceiling(-0.95); //0
float get_ceiling(float fInput) noexcept
Return a floating point number rounded up.
Definition brfloatingpoint.cpp:2172
See also
get_ceiling(float), get_floor(double), get_round(double), round_to_zero(double), or fixed_to_int_ceil(Fixed32)

◆ get_ceiling() [2/2]

float BURGER_API Burger::get_ceiling ( float fInput)
externnoexcept

Return a floating point number rounded up.


If there is any fraction, round the value up to the next whole integer.

Parameters
fInput32 bit floating point value to round up to the nearest integer.
Returns
The input converted to a 32 bit floating point value using the truth table below.
float fResult;
fResult = Burger::get_ceiling(1.1f); //2
fResult = Burger::get_ceiling(1.95f); //2
fResult = Burger::get_ceiling(-1.1f); //-1
fResult = Burger::get_ceiling(-1.95f); //-1
fResult = Burger::get_ceiling(0.1f); //1
fResult = Burger::get_ceiling(0.95f); //1
fResult = Burger::get_ceiling(-0.1f); //0
fResult = Burger::get_ceiling(-0.95f); //0
See also
get_ceiling(double), get_floor(float), get_round(float), round_to_zero(float), or fixed_to_int_ceil(Fixed32)

◆ get_cosine() [1/2]

double BURGER_API Burger::get_cosine ( double dInput)
externnoexcept

Return the cosine from radians accurate to +-1.34615e-15.


Calculate cosine with 8 iterations. It calculates cosine but sacrifices some accuracy.

Parameters
dInputValue in Radians
Returns
Cosine of dInput
See also
get_sine(double)

◆ get_cosine() [2/2]

float BURGER_API Burger::get_cosine ( float fInput)
externnoexcept

Return the cosine from radians.


This is a replacement of cosf() from the C++ libraries

Parameters
fInputValue in Radians
Returns
Cosine of fInput
See also
get_cosine(double) or get_sine(float)

◆ get_cosine_12_digits()

double BURGER_API Burger::get_cosine_12_digits ( double dInput)
externnoexcept

Return the cosine from radians accurate to +-7.48669e-13.


Calculate cosine with 6 iterations. It calculates cosine but sacrifices some accuracy.

Parameters
dInputValue in Radians
Returns
Cosine of dInput
See also
get_sine_12_digits(double)

◆ get_cosine_18_digits()

double BURGER_API Burger::get_cosine_18_digits ( double dInput)
externnoexcept

Return the cosine from radians.


This is a replacement of cos() from the C++ libraries

Parameters
dInputValue in Radians
Returns
Cosine of dInput
See also
get_cosine(float) or get_cosine_18_digits(double)

◆ get_cosine_3_digits()

float BURGER_API Burger::get_cosine_3_digits ( float fInput)
externnoexcept

Return the cosine from radians accurate to +-0.000597239.


Calculate cosine with 3 iterations. It calculates cosine but sacrifices some accuracy.

Parameters
fInputValue in Radians
Returns
Cosine of fInput
See also
get_sine_3_digits(float)

◆ get_cosine_5_digits()

float BURGER_API Burger::get_cosine_5_digits ( float fInput)
externnoexcept

Return the cosine from radians accurate to +- 7.49199e-06.


Calculate cosine with 4 iterations. It calculates cosine but sacrifices some accuracy.

Parameters
fInputValue in Radians
Returns
Cosine of fInput
See also
get_sine_3_digits(float)

◆ get_cosine_6_digits()

float BURGER_API Burger::get_cosine_6_digits ( float fInput)
externnoexcept

Return the cosine from radians accurate to +-1.1407e-06.


Calculate cosine with 4 iterations. It calculates cosine but sacrifices some accuracy.

Parameters
fInputValue in Radians
Returns
Cosine of fInput
See also
get_sine_6_digits(float)

◆ get_cosine_7_digits()

double BURGER_API Burger::get_cosine_7_digits ( double dInput)
externnoexcept

Return the cosine from radians accurate to +-2.05542e-06.


Calculate cosine with 5 iterations. It calculates cosine but sacrifices some accuracy.

Parameters
dInputValue in Radians
Returns
Cosine of dInput
See also
get_sine_7_digits(double)

◆ get_default_mac_address()

Burger::eError BURGER_API Burger::get_default_mac_address ( MacAddress_t * pOutput)
externnoexcept

Get the MAC address.


Scan the hardware for the default MAC address

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pOutputPointer to an uninitialized MacAddress_t structure
Returns
Zero if no error, kErrorNotSupportedOnThisPlatform if unsupported machine.

◆ get_exponent() [1/2]

double BURGER_API Burger::get_exponent ( double dInput)
externnoexcept

◆ get_exponent() [2/2]

float BURGER_API Burger::get_exponent ( float fInput)
externnoexcept

◆ get_floor() [1/2]

double BURGER_API Burger::get_floor ( double dInput)
externnoexcept

Return a floating point number with the fraction removed.


If there is any fraction, round the value down to the whole integer.

Parameters
dInput64 bit floating point value to round down to the nearest integer.
Returns
The input converted to a 64 bit floating point value using the truth table below.
double dResult;
dResult = Burger::get_floor(1.1); //1
dResult = Burger::get_floor(1.95); //1
dResult = Burger::get_floor(-1.1); //-2
dResult = Burger::get_floor(-1.95); //-2
dResult = Burger::get_floor(0.1); //0
dResult = Burger::get_floor(0.95); //0
dResult = Burger::get_floor(-0.1); //-1
dResult = Burger::get_floor(-0.95); //-1
float get_floor(float fInput) noexcept
Return a floating point number with the fraction removed.
Definition brfloatingpoint.cpp:2053
See also
get_floor(float), get_ceiling(double), get_round(double), round_to_zero(double), or fixed_to_int_floor(Fixed32)

◆ get_floor() [2/2]

float BURGER_API Burger::get_floor ( float fInput)
externnoexcept

Return a floating point number with the fraction removed.


If there is any fraction, round the value down to the whole integer.

Parameters
fInput32 bit floating point value to round down to the nearest integer.
Returns
The input converted to a 32 bit floating point value using the truth table below.
float fResult;
fResult = Burger::get_floor(1.1f); //1
fResult = Burger::get_floor(1.95f); //1
fResult = Burger::get_floor(-1.1f); //-2
fResult = Burger::get_floor(-1.95f); //-2
fResult = Burger::get_floor(0.1f); //0
fResult = Burger::get_floor(0.95f); //0
fResult = Burger::get_floor(-0.1f); //-1
fResult = Burger::get_floor(-0.95f); //-1
See also
get_floor(double), get_ceiling(float), get_round(float), round_to_zero(float), or fixed_to_int_floor(Fixed32)

◆ get_fraction() [1/2]

double BURGER_API Burger::get_fraction ( double dInput,
double * pInteger )
externnoexcept

◆ get_fraction() [2/2]

float BURGER_API Burger::get_fraction ( float fInput,
float * pInteger )
externnoexcept

◆ get_high_word()

uint_t Burger::get_high_word ( uint32_t uInput)
inlinenoexcept

Retrieves the low-order word from the specified value.


Shift the input 16 bits to the right and set the upper bits to zero. This is an equivalent to the function HIWORD(DWORD)

Note
This is a direct replacement of the MacOS macro HiWord().
Parameters
uInputThe value to be converted.
Returns
The high order 16 bits of uInput.
See also
get_low_word(uint32_t)

◆ get_hintflags()

uint32_t BURGER_API Burger::get_hintflags ( void )
externnoexcept

Get the current code hint flags.


Several subsystems perform code that may or may not interfere with higher level code. This flag enables and/or disables these features.

Returns
The hint flags. Test against the eHintFlags enumerations.
See also
set_hintflags(uint32_t)

◆ get_home_directory()

Burger::eError BURGER_API Burger::get_home_directory ( String * pOutput)
externnoexcept

Return the path of the "home" folder.


On unix style machines, the user account has a home directory. Return that home directory name in native unix format.

Parameters
pOutputPointer to a String to receive the name in UTF-8 encoding
Returns
Zero on no error, or non zero on failure.

◆ get_logarithm() [1/2]

double BURGER_API Burger::get_logarithm ( double dInput)
externnoexcept

◆ get_logarithm() [2/2]

float BURGER_API Burger::get_logarithm ( float fInput)
externnoexcept

◆ get_logarithm10() [1/2]

double BURGER_API Burger::get_logarithm10 ( double dInput)
externnoexcept

◆ get_logarithm10() [2/2]

float BURGER_API Burger::get_logarithm10 ( float fInput)
externnoexcept

◆ get_logarithm2() [1/2]

double BURGER_API Burger::get_logarithm2 ( double dInput)
externnoexcept

◆ get_logarithm2() [2/2]

float BURGER_API Burger::get_logarithm2 ( float fInput)
externnoexcept

◆ get_low_word()

uint_t Burger::get_low_word ( uint32_t uInput)
inlinenoexcept

Retrieves the low-order word from the specified value.


Mask off the upper 16 bit of the 32 bit input and set the bits to zero. This is an equivalent to the function LOWORD(DWORD)

Note
This is a direct replacement of the MacOS macro LoWord().
Parameters
uInputThe value to be converted.
Returns
The low order 16 bits of uInput.
See also
get_high_word(uint32_t)

◆ get_modulo() [1/2]

double BURGER_API Burger::get_modulo ( double dInput,
double dDivisor )
externnoexcept

◆ get_modulo() [2/2]

float BURGER_API Burger::get_modulo ( float fInput,
float fDivisor )
externnoexcept

◆ get_power() [1/2]

double BURGER_API Burger::get_power ( double dX,
double dY )
externnoexcept

◆ get_power() [2/2]

float BURGER_API Burger::get_power ( float fX,
float fY )
externnoexcept

◆ get_PowerPC_rounding()

Burger::ePowerPCRounding BURGER_API Burger::get_PowerPC_rounding ( void )
extern

Get the floating point rounding setting.


On PowerPC processors, there's a special floating point register to control the rounding behavior. This function returns the current setting.

Note
This function only exists on PowerPC compatible CPU targets.
Returns
Current precision state
See also
ePowerPCRounding or set_PowerPC_rounding(ePowerPCRounding)

◆ get_round() [1/2]

double BURGER_API Burger::get_round ( double dInput)
externnoexcept

Return a floating point number rounded to the nearest integer.


If there is any fraction, round the value to the whole integer.

Parameters
dInput64 bit floating point value to round to the nearest integer.
Returns
The input converted to a 64 bit floating point value using the truth table below.
double dResult;
dResult = Burger::get_round(1.1); //1
dResult = Burger::get_round(1.95); //2
dResult = Burger::get_round(-1.1); //-1
dResult = Burger::get_round(-1.95); //-2
dResult = Burger::get_round(0.1); //0
dResult = Burger::get_round(0.95); //1
dResult = Burger::get_round(-0.1); //0
dResult = Burger::get_round(-0.95); //-1
float get_round(float fInput) noexcept
Return a floating point number rounded to the nearest integer.
Definition brfloatingpoint.cpp:2333
See also
get_round(float), get_floor(double), get_ceiling(double), round_to_zero(double), or fixed_to_int_nearest(Fixed32)

◆ get_round() [2/2]

float BURGER_API Burger::get_round ( float fInput)
externnoexcept

Return a floating point number rounded to the nearest integer.


If there is any fraction, round the value to the whole integer with fraction going away from zero. This is a functional equivalent to the "C" library function round().

Note
This uses "Round half away from zero" rounding
Parameters
fInput32 bit floating point value to round to the nearest integer.
Returns
The input converted to a 32 bit floating point value using the truth table below.
float fResult;
fResult = Burger::get_round(1.1f); //1
fResult = Burger::get_round(1.95f); //2
fResult = Burger::get_round(-1.1f); //-1
fResult = Burger::get_round(-1.95f); //-2
fResult = Burger::get_round(0.1f); //0
fResult = Burger::get_round(0.95f); //1
fResult = Burger::get_round(-0.1f); //0
fResult = Burger::get_round(-0.95f); //-1
See also
get_round(double), get_floor(float), get_ceiling(float), round_to_zero(float), or fixed_to_int_nearest(Fixed32)

◆ get_sign() [1/6]

double BURGER_API Burger::get_sign ( double dInput)
externnoexcept

Return sign constant.


If the input is less than zero, return negative one, if the input is greater than zero, return one, otherwise return zero.

Parameters
dInputValue to test
Returns
The sign constant of 1, -1 or 0
See also
get_sign(float)

◆ get_sign() [2/6]

float BURGER_API Burger::get_sign ( float fInput)
externnoexcept

Return sign constant.


If the input is less than zero, return negative one, if the input is greater than zero, return one, otherwise return zero.

Parameters
fInputValue to test
Returns
The sign constant of 1, -1 or 0
See also
get_sign(double)

◆ get_sign() [3/6]

int16_t Burger::get_sign ( int16_t iInput)
inlineconstexprnoexcept

Get the sign value of an integer.


Without branching, calculate the sign value of an integer. If the input was zero, return zero, if it's positive, return 1 and if negative, return -1.

Parameters
iInputValue to get the sign value of.
Returns
0, 1 or -1.
See also
get_sign(int8_t), get_sign(int32_t), get_sign(int64_t), get_sign(float) and get_sign(double)

◆ get_sign() [4/6]

int32_t Burger::get_sign ( int32_t iInput)
inlineconstexprnoexcept

Get the sign value of an integer.


Without branching, calculate the sign value of an integer. If the input was zero, return zero, if it's positive, return 1 and if negative, return -1.

Parameters
iInputValue to get the sign value of.
Returns
0, 1 or -1.
See also
get_sign(int8_t), get_sign(int16_t), get_sign(int64_t), get_sign(float) and get_sign(double)

◆ get_sign() [5/6]

int64_t Burger::get_sign ( int64_t iInput)
inlineconstexprnoexcept

Get the sign value of a 64 bit integer.


Without branching, calculate the sign value of an integer. If the input was zero, return zero, if it's positive, return 1 and if negative, return -1.

Parameters
iInputValue to get the sign value of.
Returns
0, 1 or -1.
See also
get_sign(int8_t), get_sign(int16_t), get_sign(int32_t), get_sign(float) and get_sign(double)

◆ get_sign() [6/6]

int8_t Burger::get_sign ( int8_t iInput)
inlineconstexprnoexcept

Get the sign value of an integer.


Without branching, calculate the sign value of an integer. If the input was zero, return zero, if it's positive, return 1 and if negative, return -1.

Parameters
iInputValue to get the sign value of.
Returns
0, 1 or -1.
See also
get_sign(int16_t), get_sign(int32_t), get_sign(int64_t), get_sign(float) and get_sign(double)

◆ get_sign_bit() [1/2]

uint_t BURGER_API Burger::get_sign_bit ( double dInput)
externnoexcept

Return TRUE if the value is negative.


Test for a negative number and return TRUE if so.

Parameters
dInputA 64 bit floating point number.
Returns
TRUE if negative, FALSE if not.
See also
get_sign_bit(float), is_NaN(double), is_infinite(double), is_finite(double) and is_normal(double)

◆ get_sign_bit() [2/2]

uint_t BURGER_API Burger::get_sign_bit ( float fInput)
externnoexcept

Return TRUE if the value is negative.


Test for a negative number and return TRUE if so.

Parameters
fInputA 32 bit floating point number.
Returns
TRUE if negative, FALSE if not.

◆ get_sine() [1/2]

double BURGER_API Burger::get_sine ( double dInput)
externnoexcept

Return the sine from radians accurate to +-1.16573e-15.


Calculate sine with 8 iterations. It calculates sine but sacrifices some accuracy.

Parameters
dInputValue in Radians
Returns
Sine of dInput
See also
get_cosine(double)

◆ get_sine() [2/2]

float BURGER_API Burger::get_sine ( float fInput)
externnoexcept

Return the sine from radians.


This is a replacement of sinf() from the C++ libraries

To calculate sine... sin(x) = x - ((x^3)/ 3!) + ((x^5)/ 5!) - ((x^7)/ 7!) + ((x^9)/ 9!) ... Repeat the pattern by reversing the sign of the addition and adding 2 to the factors for every iteration

This function will perform 10 iterations from 3,5,7,...,23

Note
! is factoral so 3! = 1*2*3, and 5! = 1*2*3*4*5
Parameters
fInputValue in Radians
Returns
Sine of fInput
See also
get_sine(double) or get_cosine(float)

◆ get_sine_12_digits()

double BURGER_API Burger::get_sine_12_digits ( double dInput)
externnoexcept

Return the sine from radians accurate to +-7.48669e-13.


Calculate sine with 6 iterations. It calculates sine but sacrifices some accuracy.

Parameters
dInputValue in Radians
Returns
Sine of dInput
See also
get_cosine_12_digits(double)

◆ get_sine_18_digits()

double BURGER_API Burger::get_sine_18_digits ( double dInput)
externnoexcept

Return the sine from radians.


This is a replacement of sin() from the C++ libraries

Parameters
dInputValue in Radians
Returns
Sine of dInput
See also
get_sine(double) or get_cosine_18_digits(double)

◆ get_sine_3_digits()

float BURGER_API Burger::get_sine_3_digits ( float fInput)
externnoexcept

Return the sine from radians accurate to +-0.000597239.


Calculate sine with 3 iterations. It calculates sine but sacrifices some accuracy.

Parameters
fInputValue in Radians
Returns
Sine of fInput
See also
get_cosine_3_digits(float)

◆ get_sine_5_digits()

float BURGER_API Burger::get_sine_5_digits ( float fInput)
externnoexcept

Return the sine from radians accurate to +-7.49199e-06.


Calculate sine with 4 iterations. It calculates sine but sacrifices some accuracy.

Parameters
fInputValue in Radians
Returns
Sine of fInput
See also
get_cosine_3_digits(float)

◆ get_sine_6_digits()

float BURGER_API Burger::get_sine_6_digits ( float fInput)
externnoexcept

Return the sine from radians accurate to +-1.03892e-06.


Calculate sine with 4 iterations. It calculates sine but sacrifices some accuracy.

Parameters
fInputValue in Radians
Returns
Sine of fInput
See also
get_cosine_6_digits(float)

◆ get_sine_7_digits()

double BURGER_API Burger::get_sine_7_digits ( double dInput)
externnoexcept

Return the sine from radians accurate to +-2.05542e-06.


Calculate sine with 5 iterations. It calculates sine but sacrifices some accuracy.

Parameters
dInputValue in Radians
Returns
Sine of dInput
See also
get_cosine_7_digits(double)

◆ get_tangent() [1/2]

double BURGER_API Burger::get_tangent ( double dInput)
externnoexcept

◆ get_tangent() [2/2]

float BURGER_API Burger::get_tangent ( float fInput)
externnoexcept

◆ get_thread_priority()

Burger::eThreadPriority BURGER_API Burger::get_thread_priority ( ThreadID uThreadID)
externnoexcept

Get the execution priority of a thread.


Get the execution priority of any thread using a ThreadID.

If kThreadPriorityInvalid is returned, this feature is not supported.

Returns
An eThreadPriority enumeration.
See also
Thread, or set_thread_priority(ThreadID, eThreadPriority)

◆ get_ThreadID()

Burger::ThreadID BURGER_API Burger::get_ThreadID ( void )
externnoexcept

Return the ID of the current thread.


Query the operating system for the ID number of the currently executing thread.

If zero is returned, this feature is not supported

Returns
ID of the thread or 0 on unsupported systems, like MSDOS.
See also
Thread

◆ get_traceflags()

uint32_t BURGER_API Burger::get_traceflags ( void )
externnoexcept

Get the current debug tracing flag.


Several subsystems perform diagnostic logging and this flag enables and/or disables these features.

Returns
The trace flags. Test against the eTraceFlags enumerations.
See also
set_traceflags(uint32_t)

◆ GetCommentFromDesktopFile()

int BURGER_API Burger::GetCommentFromDesktopFile ( char * pComment,
short svRefNum,
long lDirID,
const uint8_t * pFileName )
externnoexcept

Load in a comment from a Desktop resource file.


On network shares, the finder stores metadata like file comments in a file called "Desktop" on the root folder. Given the location of a file of interest, look up its comment ID in the database looking for a match. If found, return a copy of the data within.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pCommentPointer to a 256 byte buffer to receive the "C" string comment
svRefNumVolume reference number of the file to check
lDirIDDirectory ID of the file to check
pFileNamePointer to a "C" string of the filename to check
Returns
Zero if no error, or mac error code

◆ GetCommentID() [1/3]

int BURGER_API Burger::GetCommentID ( short * pCommentID,
const FSRef * pFSRef )
externnoexcept

Get finder comment ID.


Given information about a file, get the comment ID of the named file object.

Parameters
pCommentIDPointer to receive the finder comment ID.
pFSRefPointer to the FSRef of the file to query.
Returns
Zero if no error, otherwise return MacOS error code.

◆ GetCommentID() [2/3]

int BURGER_API Burger::GetCommentID ( short * pCommentID,
const FSSpec * pFSSpec )
externnoexcept

Get finder comment ID.


Given information about a file, get the comment ID of the named file object.

Parameters
pCommentIDPointer to receive the finder comment ID.
pFSSpecPointer to the FSSpec of the file to query.
Returns
Zero if no error, otherwise return MacOS error code.

◆ GetCommentID() [3/3]

int BURGER_API Burger::GetCommentID ( short * pCommentID,
short sVRefNum,
long lDirID,
const uint8_t * pName )
externnoexcept

Get finder comment ID.


Given information about a file, get the comment ID of the named file object.

Parameters
pCommentIDPointer to receive the finder comment ID.
sVRefNumVolume reference number
lDirIDCurrent directory ID
pNameName of the file of interest, can be nullptr.
Returns
Zero if no error, otherwise return MacOS error code.

◆ GetD3DFORMATAlphaChannelBits()

uint_t BURGER_API Burger::GetD3DFORMATAlphaChannelBits ( uint_t uD3DFORMAT)
extern

Get the number of bits for the alpha channel.


Using a DirectX 9 D3DFORMAT value, return the number of bits needed to hold the alpha value in a single pixel.

Return 0 if the value is invalid or there is no alpha component

Note
This is only available on Windows
Parameters
uD3DFORMATD3DFORMAT value
Returns
Number of bits for alpha in a pixel, 0 on error or no alpha
See also
GetD3DFORMATColorChannelBits(uint_t), GetD3DFORMATDepthBits(uint_t) or GetD3DFORMATStencilBits(uint_t)

◆ GetD3DFORMATColorChannelBits()

uint_t BURGER_API Burger::GetD3DFORMATColorChannelBits ( uint_t uD3DFORMAT)
extern

Get the number of bits for a single color channel.


Using a DirectX 9 D3DFORMAT value, return the number of bits needed to hold a smallest color value in a single pixel.

Return 0 if the value is invalid

Note
For formats like D3DFMT_R5G6B5 where the color channels have different widths, the smallest width is returned, which in this example is five.
This is only available on Windows
Parameters
uD3DFORMATD3DFORMAT value
Returns
Number of bits per pixel, 0 on error
See also
GetD3DFORMATAlphaChannelBits(uint_t), GetD3DFORMATDepthBits(uint_t) or GetD3DFORMATStencilBits(uint_t)

◆ GetD3DFORMATDepthBits()

uint_t BURGER_API Burger::GetD3DFORMATDepthBits ( uint_t uD3DFORMAT)
extern

Get the number of bits for the depth channel.


Using a DirectX 9 D3DFORMAT value, return the number of bits needed to hold the depth value in a single pixel.

Return 0 if the value is invalid or there is no depth component

Note
This is only available on Windows
Parameters
uD3DFORMATD3DFORMAT value
Returns
Number of bits for depth in a pixel, 0 on error or no depth
See also
GetD3DFORMATColorChannelBits(uint_t), GetD3DFORMATAlphaChannelBits(uint_t) or GetD3DFORMATStencilBits(uint_t)

◆ GetD3DFORMATStencilBits()

uint_t BURGER_API Burger::GetD3DFORMATStencilBits ( uint_t uD3DFORMAT)
extern

Get the number of bits for the stencil channel.


Using a DirectX 9 D3DFORMAT value, return the number of bits needed to hold the stencil value in a single pixel.

Return 0 if the value is invalid or there is no stencil component

Note
This is only available on Windows
Parameters
uD3DFORMATD3DFORMAT value
Returns
Number of bits for stencil in a pixel, 0 on error or no stencil
See also
GetD3DFORMATColorChannelBits(uint_t), GetD3DFORMATAlphaChannelBits(uint_t) or GetD3DFORMATDepthBits(uint_t)

◆ GetDesktopFileName()

int BURGER_API Burger::GetDesktopFileName ( uint8_t * pDesktopName,
short svRefNum )
externnoexcept

Determine the name of the Finder Desktop Database.


On network shares, the finder stores metadata like file comments in a file called "Desktop" on the root folder. Due to localization, this file name might be in another language so loading by name is impossible. Iterate through the root directory of the volume for the first file with the creator code of 'ERIK' and the file type of 'FNDR' and return the name of that file.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pDesktopNamePointer to a 256 byte buffer to receive the Pascal filename
svRefNumVolume reference number of the volume to scan for the file.
Returns
Zero if no error, or mac error code

◆ GetDestinationDirectoryInfo() [1/3]

int BURGER_API Burger::GetDestinationDirectoryInfo ( const FSRef * pFSRef,
long * pDirID,
uint_t * pbDirectory,
uint_t * pbDropBox )
externnoexcept

Get common information from a directory.


Given information about a file, get the ID of the named file object, if it's a directory and if the access is that of a "Drop box" folder.

Parameters
pFSRefPointer of an FSRef of the file/directory to query.
pDirIDPointer to receive the DirID of the named folder
pbDirectoryPointer to receive a boolean that is TRUE if it's a directory
pbDropBoxPointer to receive a boolean if the folder is a drop box.
Returns
Zero if no error, otherwise return MacOS error code.

◆ GetDestinationDirectoryInfo() [2/3]

int BURGER_API Burger::GetDestinationDirectoryInfo ( const FSSpec * pFSSpec,
long * pDirID,
uint_t * pbDirectory,
uint_t * pbDropBox )
externnoexcept

Get common information from a directory.


Given information about a file, get the ID of the named file object, if it's a directory and if the access is that of a "Drop box" folder.

Parameters
pFSSpecPointer of an FSSpec of the file/directory to query.
pDirIDPointer to receive the DirID of the named folder
pbDirectoryPointer to receive a boolean that is TRUE if it's a directory
pbDropBoxPointer to receive a boolean if the folder is a drop box.
Returns
Zero if no error, otherwise return MacOS error code.

◆ GetDestinationDirectoryInfo() [3/3]

int BURGER_API Burger::GetDestinationDirectoryInfo ( short sVRefNum,
long lDirID,
const uint8_t * pName,
long * pDirID,
uint_t * pbDirectory,
uint_t * pbDropBox )
externnoexcept

Get common information from a directory.


Given information about a file, get the ID of the named file object, if it's a directory and if the access is that of a "Drop box" folder.

Parameters
sVRefNumVolume reference number
lDirIDCurrent directory ID
pNameName of the file of interest, can be nullptr.
pDirIDPointer to receive the DirID of the named folder
pbDirectoryPointer to receive a boolean that is TRUE if it's a directory
pbDropBoxPointer to receive a boolean if the folder is a drop box.
Returns
Zero if no error, otherwise return MacOS error code.

◆ GetDirectoryID() [1/2]

int BURGER_API Burger::GetDirectoryID ( const FSSpec * pFSSpec,
long * pDirID,
uint_t * pbDirectory )
externnoexcept

Get directory ID of a named directory.


Given information about a directory, get its directory ID. If the object is a file, return the parent directory ID.

Parameters
pFSSpecPointer to the FSSpec of the file or directory of interest.
pDirIDPointer to receive the directory's ID.
pbDirectoryPointer to receive TRUE if it's a directory.
Returns
Zero if no error, otherwise return MacOS error code.

◆ GetDirectoryID() [2/2]

int BURGER_API Burger::GetDirectoryID ( short sVRefNum,
long lDirID,
const uint8_t * pName,
long * pDirID,
uint_t * pbDirectory )
externnoexcept

Get directory ID of a named directory.


Given information about a directory, get its directory ID. If the object is a file, return the parent directory ID.

Parameters
sVRefNumVolume reference number
lDirIDCurrent directory ID
pNamePascal name of the file of interest, can be nullptr.
pDirIDPointer to receive the directory's ID.
pbDirectoryPointer to receive TRUE if it's a directory.
Returns
Zero if no error, otherwise return MacOS error code.

◆ GetDirectoryInfo() [1/3]

int BURGER_API Burger::GetDirectoryInfo ( DInfo * pFinderInfo,
const FSRef * pFSRef )
externnoexcept

Get Finder DInfo for a directory using a FSRef.


Given an FSRef for a folder, obtain the finder information about this folder object and return the DInfo record.

Parameters
pFinderInfoPointer to empty DInfo to be filled in.
pFSRefPointer to a FSRef that points to the folder of interest.
Returns
Zero if no error, otherwise return MacOS error code.

◆ GetDirectoryInfo() [2/3]

int BURGER_API Burger::GetDirectoryInfo ( DInfo * pFinderInfo,
const FSSpec * pFSSpec )
externnoexcept

Get Finder DInfo for a directory using a FSSpec.


Given an FSSpec for a folder, obtain the finder information about this folder object and return the DInfo record.

Parameters
pFinderInfoPointer to empty DInfo to be filled in.
pFSSpecPointer to a FSSpec that points to the folder of interest.
Returns
Zero if no error, otherwise return MacOS error code.

◆ GetDirectoryInfo() [3/3]

int BURGER_API Burger::GetDirectoryInfo ( DInfo * pFinderInfo,
short sVRefNum,
long lDirID,
const uint8_t * pName )
externnoexcept

Get Finder DInfo for a directory.


Given information about a folder, obtain the finder information about this folder object and return the DInfo record. pName is converted into a pascal string before being passed to PBGetCatInfoSync().

Parameters
pFinderInfoPointer to empty DInfo to be filled in.
sVRefNumVolume reference number
lDirIDCurrent directory ID
pNameName of the file of interest, can be nullptr.
Returns
Zero if no error, otherwise return MacOS error code.

◆ GetDriverLoaderLib()

Burger::CodeLibrary *BURGER_API Burger::GetDriverLoaderLib ( void )
externnoexcept

Load DriverLoaderLib for manual linking.


Load in the shared system library DriverLoaderLib.

Returns
Pointer to Burger::CodeLibrary that has DriverLoaderLib.

◆ GetDXGI_FORMATColorChannelBits()

uint_t BURGER_API Burger::GetDXGI_FORMATColorChannelBits ( uint_t uDXGI_FORMAT)
extern

Get the number of bits for a single color channel.


Using a DirectX 11 DXGI_FORMAT value, return the number of bits needed to hold a smallest color value in a single pixel.

Return 0 if the value is invalid

Note
For formats like DXGI_FORMAT_B5G6R5_UNORM where the color channels have different widths, the smallest width is returned, which in this example is five.
This is only available on Windows
Parameters
uDXGI_FORMATDXGI_FORMAT value
Returns
Number of bits per pixel, 0 on error
See also
GetD3DFORMATColorChannelBits(uint_t)

◆ GetEnvironmentString()

const char *BURGER_API Burger::GetEnvironmentString ( const char * pKey)
externnoexcept

Retrieve an environment string.


On systems that support it, query the system for an environment variable and return a COPY of the string. Once the string is no longer needed, call Burger::Free(const void *) on it to release it.

Once obtained, the string will not change due to it being a copy of the one that exists in the operating system.

The string is encoded to UTF8 on all systems

Parameters
pKeyPointer to a "C" string of the environment variable name
Returns
nullptr on failure or if the string didn't exist. A valid "C" string pointer otherwise. Release with a call to Burger::Free(const void *)
See also
SetEnvironmentString(const char *,const char *)

◆ GetFileExtension()

char *BURGER_API Burger::GetFileExtension ( const char * pInput)
externnoexcept

Get a pointer to the beginning of the file extension.


A string is scanned until the last period is found. A pointer to the string fragment following the period is returned. If no period is found then a pointer to the terminating zero is returned. This function is a quick way to extract the file extension from a PC style filename.

Example filenames expected are: "Foo", "ReadMe.txt","ArtFile.gif" or "MyData.c".

These examples will return pointers to: "", "txt", "gif" or "c".

The pointer returned is a pointer within the string. You do not need to release the memory in any way.

Parameters
pInputPointer to the "C" string to scan. nullptr will page fault.
Returns
A pointer to the filename extension of terminating zero.
See also
Burger::SetFileExtension(char *,const char *).

◆ GetFileLocation() [1/3]

int BURGER_API Burger::GetFileLocation ( FSRef * pOutput,
short iFileRefNum )
externnoexcept

Use an open file reference to return the FSRef.


If a file was opened using an FSRef, use this function to retrieve the FSRef from the open file reference by calling FSGetForkCBInfo().

This function will fail if the application is not running on MacOS 9 or higher with a paramErr.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pOutputPointer to a buffer to receive the FSRef
iFileRefNumOpen file reference to query for the FSRef
Returns
Zero if no error, or mac error code
See also
GetFileLocation(FSSpec *, short) or GetFileLocation( short*, long*, uint8_t *, short)

◆ GetFileLocation() [2/3]

int BURGER_API Burger::GetFileLocation ( FSSpec * pOutput,
short iFileRefNum )
externnoexcept

Find the FSSpec from a file reference number.


When a file is opened, a file reference number is generated. This function will return the FSSpec of the opened file by calling PBGetFCBInfoSync().

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pOutputPointer to an uninitialized FSSpec
iFileRefNumOpen file reference ID
Returns
Zero if no error, or mac error code
See also
GetFileLocation(FSRef *, short) or GetFileLocation( short*, long*, uint8_t *, short)

◆ GetFileLocation() [3/3]

int BURGER_API Burger::GetFileLocation ( short * pVRefNum,
long * pDirID,
uint8_t * pOutputFilename,
short iFileRefNum )
externnoexcept

Find a file location from a file reference number.


When a file is opened, a file reference number is generated. This function will return the volume, directory ID and filename of the opened file by calling PBGetFCBInfoSync().

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pVRefNumPointer to variable to receive the volume reference number
pDirIDPointer to variable to receive the file's parent ID.
pOutputFilenamePointer to a 256 byte buffer to receive the Pascal filename
iFileRefNumOpen file reference ID
Returns
Zero if no error, or mac error code
See also
GetFileLocation(FSRef *, short) or GetFileLocation(FSSpec *, short)

◆ GetFilenameFromPathname()

int BURGER_API Burger::GetFilenameFromPathname ( uint8_t * pOutput,
const uint8_t * pInput )
externnoexcept

Extract a filename at the end of a MacOS path.


Scan a Pascal filename string and extract the last component which should be the filename. If the string passed in is a volume path, such as ":Macintosh HD:", it will intentionally fail.

Do not pass the same pointer for both input and output.

Error codes returned, notAFileErr, or noErr.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pOutputPointer to a 256 byte Pascal string buffer
pInputPointer to the Pascal filename path
Returns
Zero if no error, or mac error code

◆ GetFormattedLength()

intptr_t BURGER_API Burger::GetFormattedLength ( const char * pFormat,
uintptr_t uArgCount,
const ArgumentType ** ppArgs )
externnoexcept

Reports the size of a formatted output in bytes without actually creating any formatted output.


  * Step 1) Parse the format string and arguments
  * Step 2) Report the format results and call back for an output buffer.
  * Step 3) If no issues found in Step 1 and a buffer was returned in step
    2, execute the list of format & copy output commands.

\param pFormat Pointer to a "C" format string
\param uArgCount Number of arguments in the argument array
\param ppArgs Argument array, can be \ref NULL if uArgCount is zero
\return Negative number for error, number of bytes processed on success

◆ GetFullPathNameUTF8()

eError Burger::GetFullPathNameUTF8 ( String * pOutput,
const char * pInput )
externnoexcept

◆ GetID3V2TagLength()

uint32_t Burger::GetID3V2TagLength ( const void * pInput)
extern

Parses the ID3V2 tag length.


A ID3V2 tag is 28 bits pulled out of 4 bytes with the highest bit masked off.

Parameters
pInputPointer to a raw ID3V2 length stream (4 bytes)
Returns
The converted tag length (28 bits max)

◆ GetInterfaceLib()

Burger::CodeLibrary *BURGER_API Burger::GetInterfaceLib ( void )
externnoexcept

Load InterfaceLib for manual linking.


Load in the shared system library InterfaceLib.

Returns
Pointer to Burger::CodeLibrary that has InterfaceLib.

◆ GetMachineName()

Burger::eError BURGER_API Burger::GetMachineName ( String * pOutput)
externnoexcept

Get the name the user has called the computer.


Some computer owners have the option to give their computer a whimsical name. This routine will retrieve that name. If for some reason a name can't be found or the operating system doesn't support naming, the name of "Computer" will be returned.

Parameters
pOutputPointer to a String to receive the name in UTF-8 encoding
Returns
Zero on no error, or non zero on failure.
Note
On platforms where networking or user level access isn't available, it will return kErrorNotSupportedOnThisPlatform as an error code.
On MacOS 9, the machine name is found in the OS string number -16413 from the system resource file.
On Android, for security reasons, it may return localhost
See also
GetUserLoginName(String *) or NetworkManager::GetHostName()

◆ GetMacModelIdentifier()

Burger::eError BURGER_API Burger::GetMacModelIdentifier ( String * pOutput)
externnoexcept

Return the name of the mac model.

Query the Registry entries that are found in a Macintosh and return the model string that denotes the specific model of Macintosh that is currently running this code.

Parameters
pOutputPointer to a String to receive the name in UTF-8 encoding
Returns
Zero on no error, or non zero on failure.

◆ GetNameRegistryLib()

Burger::CodeLibrary *BURGER_API Burger::GetNameRegistryLib ( void )
externnoexcept

Load NameRegistryLib for manual linking.


Load in the shared system library NameRegistryLib.

Returns
Pointer to Burger::CodeLibrary that has NameRegistryLib.

◆ GetOSIndString()

Burger::eError BURGER_API Burger::GetOSIndString ( String * pOutput,
int16_t iStringID,
int16_t iIndex )
externnoexcept

Call GetIndString() using the system resource file.

Call the function GetIndString() with UseResFile(0) so the string is forced to be obtained from the system resource.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pOutputPointer to a String to receive the name in UTF-8 encoding.
iStringIDMacOS resource ID number of the string array.
iIndexIndex into the STR# list
Returns
Zero on no error, or non zero on failure.
See also
GetOSString(String *,int16_t)

◆ GetOSString()

Burger::eError BURGER_API Burger::GetOSString ( String * pOutput,
int16_t iStringID )
externnoexcept

Call GetString() using the system resource file.

Call the function GetString() with UseResFile(0) so the string is forced to be obtained from the system resource.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pOutputPointer to a String to receive the name in UTF-8 encoding.
iStringIDMacOS resource ID number of the string.
Returns
Zero on no error, or non zero on failure.
See also
GetOSIndString(String *, int16_t, int16_t)

◆ GetSize()

uintptr_t BURGER_API Burger::GetSize ( FILE * fp)
extern

Return the size of a file.


Given an ANSI FILE *, return the size of the file.

Parameters
fpFILE * to the stream to write to.
Note
On 32 bit platforms, if the file is larger than 4GB, the size will be returned as 0xFFFFFFFF. On 64 bit platforms the size will be returned with 64 bit precision.

This function is faster than the fseek(), ftell(seek), fseek() method since this uses custom code tailored for each compiler to directly access records in the FILE structure in most cases.

Returns
The size of the file in bytes, or zero on error.
See also
GetSize64(FILE *)

◆ GetSize64()

uint64_t BURGER_API Burger::GetSize64 ( FILE * fp)
extern

Return the size of a file with 64 bits.


Given an ANSI FILE *, return the size of the file.

Parameters
fpFILE * to the stream to write to.

This function is faster than the fseek(), ftell(seek), fseek() method since this uses custom code tailored for each compiler to directly access records in the FILE structure in most cases.

Returns
The size of the file in bytes, or zero on error.
See also
GetSize(FILE *)

◆ GetUserLoginName()

Burger::eError BURGER_API Burger::GetUserLoginName ( String * pOutput)
externnoexcept

Retrieves the login name of the user associated with the current thread.


On systems that use user logins, return the login name of the account associated with the current thread. If the platform doesn't support multiple user accounts, it will return "User" and the error code kErrorNotSupportedOnThisPlatform.

Parameters
pOutputPointer to a String to receive the name in UTF-8 encoding
Returns
Zero on no error, or non zero on failure.
Note
On platforms where networking or user level access isn't available, it will return kErrorNotSupportedOnThisPlatform as an error code.
See also
GetUserRealName(String *) or GetMachineName(String *)

◆ GetUserRealName()

Burger::eError BURGER_API Burger::GetUserRealName ( String * pOutput)
externnoexcept

Get the real name of the current user.


When someone has logged onto a computer, that person can associate a real name to the login user account. This routine will retrieve real name of the user. If for some reason a user name can't be found or the operating system doesn't support user logins, the name "User" will be returned.

Parameters
pOutputPointer to a String to receive the real name in UTF-8 encoding
Returns
Zero on no error, or non zero on failure.
Note
On platforms where networking or user level access isn't available, it will always return kErrorNotSupportedOnThisPlatform as an error code.
See also
GetUserLoginName(String *) or GetMachineName(String *)

◆ GetVolumeInfo() [1/2]

int BURGER_API Burger::GetVolumeInfo ( HParamBlockRec * pOutput,
short sVRefNum )
externnoexcept

Obtain information about a volume.


Given a volume reference number, fill in a HParamBlockRec record with information about the volume. The ioNamePtr entry is zeroed out so retrieving a volume name is not possible with this call.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pOutputPointer to an uninitialized HParamBlockRec buffer
sVRefNumVolume reference number
Returns
Zero if no error, or mac error code

◆ GetVolumeInfo() [2/2]

int BURGER_API Burger::GetVolumeInfo ( XVolumeParam * pOutput,
short svRefNum )
externnoexcept

Obtain information about an extended volume.


Given a volume reference number, fill in a XVolumeParam record with information about the volume. The ioNamePtr entry is zeroed out so retrieving a volume name is not possible with this call.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pOutputPointer to an uninitialized XVolumeParam buffer
svRefNumVolume reference number
Returns
Zero if no error, or mac error code

◆ GUID_compare()

int BURGER_API Burger::GUID_compare ( const GUID * pInput1,
const GUID * pInput2 )
externnoexcept

Test two GUID for equality.


Compare two GUID's for equality. For cross platform consistency, the comparisons assume the data is in little endian format and will do conversions on big endian machines.

Will return 0 for equality, -1 if pInput1<pInput2 and 1 if pInput1>pInput2

Parameters
pInput1Pointer to the first GUID to test
pInput2Pointer to the second GUID to test
Returns
1 if pInput1>pInput2, -1 if pInput1<pInput2 and 0 if they are identical
See also
GUID_is_equal(const GUID*, const GUID*)

◆ GUID_from_string()

Burger::eError BURGER_API Burger::GUID_from_string ( GUID * pOutput,
const char * pInput )
externnoexcept

Convert a GUID string into a GUID.


A string in the format of 8641FBDE-7F8F-11D4-AAC5-000A27DD93F2 will be parsed and converted into a GUID structure

Parameters
pOutputPointer to an uninitialized GUID structure
pInputPointer to a "C" string formatted as above
Returns
Zero if no error, kErrorInvalidArgument on bad input
See also
GUID_to_string()

◆ GUID_hash()

uint_t BURGER_API Burger::GUID_hash ( const GUID * pInput)
externnoexcept

Return the 16 bit hash of a GUID.


Using the GUID as a byte array (So the function is endian neutral), create a 16 bit hash value.

Parameters
pInputPointer to a valid GUID
Returns
The 16 bit hash value

◆ GUID_init()

void BURGER_API Burger::GUID_init ( GUID * pOutput)
externnoexcept

Create a new GUID.


Using a MAC address, current time and deep voodoo, generate a unique 128 bit number for labeling a data object.

http://en.wikipedia.org/wiki/Globally_unique_identifier

http://tools.ietf.org/html/rfc4122.html

Parameters
pOutputPointer to an uninitialized GUID buffer
See also
GUID_from_string() or GUID_to_string()

◆ GUID_is_equal()

uint_t BURGER_API Burger::GUID_is_equal ( const GUID * pInput1,
const GUID * pInput2 )
externnoexcept

Compare two GUID structures for equality.


Parameters
pInput1Pointer to the first GUID to test
pInput2Pointer to the second GUID to test
Returns
TRUE if they are equal, FALSE if not
See also
GUID_compare(const GUID*, const GUID*)

◆ GUID_to_string()

void BURGER_API Burger::GUID_to_string ( char * pOutput,
const GUID * pInput )
externnoexcept

Convert a GUID to a string.


Convert a GUID into a string that looks like 8641FBDE-7F8F-11D4-AAC5-000A27DD93F2

Parameters
pOutputPointer to a buffer that's at least 36 bytes in length.
pInputPointer to a GUID to convert to an ASCII string
See also
GUID_from_string()

◆ has_68kFPU()

uint_t BURGER_API Burger::has_68kFPU ( void )
externnoexcept

Return TRUE if floating point is supported in hardware.


Most modern CPUs have floating point in hardware, and on most platforms, this function will return TRUE. On 680x0 platforms, this function will test for the existance of an FPU and will return non-zero if one is found and zero if there is no FPU.

Note
If a 680x0 project is running on the MacOS 9 680x0 CPU emulator, this function will always return FALSE to help prevent runtime code from executing FPU instructions which would cause a runtime exception.
Returns
Non-zero if an FPU is available, FALSE if not.
See also
BURGER_68K

◆ has_AltiVec()

uint_t BURGER_API Burger::has_AltiVec ( void )
externnoexcept

Return TRUE if the AltiVec instruction set is present.


On PowerPC CPUs, this function will perform a test to determine if the AltiVec instruction is present. It will return TRUE if it does, and FALSE if not.

On XBox 360 and PS3 machines, this will always return TRUE and on non PowerPC CPUs it will always return FALSE.

Note
This function only matters on systems with an PowerPC CPU
Returns
TRUE if AltiVec is available, FALSE if not
See also
BURGER_PPC

◆ has_CPUID()

Burger::has_CPUID ( void )
externnoexcept

Return TRUE if the instruction CPUID is present.


On x86 CPUs, this function will perform a test to determine if the CPUID instruction is present. It will return TRUE if it does, and FALSE if not. It's very likely this will return TRUE on x86 CPUs due to the introduction of the instruction occurred in 1993

On x64 machines, this will always return TRUE and on non Intel CPUs it will always return FALSE.

Note
This function only matters on systems with an x86 CPU
Returns
TRUE if the instruction is available, FALSE if not
See also
BURGER_INTEL

◆ has_PPC_fsqrt()

uint_t BURGER_API Burger::has_PPC_fsqrt ( void )
externnoexcept

Return TRUE if floating point sqrt is supported in hardware.


Most modern CPUs have floating point in hardware, and on most platforms, this function will return TRUE. On 680x0 and PowerPC platforms, this function will test for the existance of an instruction to perform a floating point square root and will return non-zero if one is found.

Returns
Non-zero if fsqrt() is available, FALSE if not.
See also
BURGER_68K and BURGER_PPC

◆ hash() [1/5]

void BURGER_API Burger::hash ( GOST_t * pOutput,
const void * pInput,
uintptr_t uLength )
externnoexcept

Quickly create a GOST key.


Given a buffer of data, generate the GOST hash key

Parameters
pOutputPointer to an uninitialized GOST_t structure
pInputPointer to a buffer of data to hash
uLengthNumber of bytes to hash
See also
GOSTHasher_t

◆ hash() [2/5]

void BURGER_API Burger::hash ( MD2_t * pOutput,
const void * pInput,
uintptr_t uLength )
externnoexcept

Quickly create an MD2 key.


Given a buffer of data, generate the MD2 hash key

Parameters
pOutputPointer to an unitialized MD2_t structure
pInputPointer to a buffer of data to hash
uLengthNumber of bytes to hash
See also
MD2Hasher_t

◆ hash() [3/5]

void BURGER_API Burger::hash ( MD4_t * pOutput,
const void * pInput,
uintptr_t uLength )
externnoexcept

Quickly create an MD4 key.


Given a buffer of data, generate the MD4 hash key

Parameters
pOutputPointer to an unitialized MD4_t structure
pInputPointer to a buffer of data to hash
uLengthNumber of bytes to hash
See also
MD4Hasher_t

◆ hash() [4/5]

void BURGER_API Burger::hash ( MD5_t * pOutput,
const void * pInput,
uintptr_t uLength )
externnoexcept

Quickly create an MD5 key.


Given a buffer of data, generate the MD5 hash key

Parameters
pOutputPointer to an unitialized MD5_t structure
pInputPointer to a buffer of data to hash
uLengthNumber of bytes to hash
See also
MD5Hasher_t

◆ hash() [5/5]

void BURGER_API Burger::hash ( SHA1_t * pOutput,
const void * pInput,
uintptr_t uLength )
externnoexcept

Quickly create a SHA-1 key.


Given a buffer of data, generate the SHA-1 hash key

Parameters
pOutputPointer to an uninitialized SHA1_t structure
pInputPointer to a buffer of data to hash
uLengthNumber of bytes to hash
See also
SHA1Hasher_t

◆ HashMapStringCaseTest()

uint_t BURGER_API Burger::HashMapStringCaseTest ( const void * pA,
const void * pB )
externnoexcept

Case insensitive string test for HashMapStringCase.


This internal function performs a case insensitive string comparison between two String classes.

Parameters
pAPointer to the first String to test
pBPointer to the second String to test
Returns
TRUE if the strings match, FALSE if not.
See also
HashMapStringCase

◆ HasWildcard()

uint_t BURGER_API Burger::HasWildcard ( const char * pInput)
externnoexcept

Return TRUE if the string contains a wild card character.


To determine if a string contains a '*' or a '?' wild card character, call this function and it will return TRUE if so.

Parameters
pInputPointer to a "C" string to test. nullptr will return FALSE
Returns
TRUE if the string contains wild card characters, FALSE if not.
See also
Wildcardcmp(const char *,const char *)

◆ ImportIT()

uint_t BURGER_API Burger::ImportIT ( Sequencer::SongPackage * pOutput,
const uint8_t * pInput,
uintptr_t uInputLength )
extern

Import an IT file.


Convert an IT music file into a Burgerlib SongPackage

Parameters
pOutputPointer to the SongPackage to fill in with music data
pInputPointer to the IT file
uInputLengthLength of the input data
Returns
Zero if no error, non-zero if error
See also
ImportITEffect(Sequencer::Command_t *,uint_t,uint_t)

◆ ImportITEffect()

void BURGER_API Burger::ImportITEffect ( Sequencer::Command_t * pOutput,
uint_t uITCommand,
uint_t uITArgument )
extern

Convert an IT effect command to a Burgerlib one.


Given an IT effect command and its argument, translate them into a Burgerlib command and argument

Parameters
pOutputPointer to the command to receive the translated values
uITCommandIT format effect command
uITArgumentIT format effect argument
See also
ImportIT(Sequencer::SongPackage *,const uint8_t *,uintptr_t)

◆ ImportS3M()

uint_t BURGER_API Burger::ImportS3M ( Sequencer::SongPackage * pOutput,
const uint8_t * pInput,
uintptr_t uInputLength )
extern

Import an S3M file.


Convert an S3M music file into a Burgerlib SongPackage

Parameters
pOutputPointer to the SongPackage to fill in with music data
pInputPointer to the S3M file
uInputLengthLength of the input data
Returns
Zero if no error, non-zero if error
See also
ImportS3MEffect(Sequencer::Command_t *,uint_t,uint_t)

◆ ImportS3MEffect()

void BURGER_API Burger::ImportS3MEffect ( Sequencer::Command_t * pOutput,
uint_t uS3MCommand,
uint_t uS3MArgument )
extern

Convert an S3M effect command to a Burgerlib one.


Given an S3M effect command and its argument, translate them into a Burgerlib command and argument

Parameters
pOutputPointer to the command to receive the translated values
uS3MCommandS3M format effect command
uS3MArgumentS3M format effect argument
See also
ImportS3M(Sequencer::SongPackage *,const uint8_t *,uintptr_t)

◆ ImportXM()

uint_t BURGER_API Burger::ImportXM ( Sequencer::SongPackage * pOutput,
const uint8_t * pInput,
uintptr_t uInputLength )
extern

Import an XM file.


Convert an XM music file into a Burgerlib SongPackage

Parameters
pOutputPointer to the SongPackage to fill in with music data
pInputPointer to the XM file
uInputLengthLength of the input data
Returns
Zero if no error, non-zero if error
See also
ImportXMEffect(Sequencer::Command_t *,const uint8_t *)

◆ ImportXMEffect()

const uint8_t *BURGER_API Burger::ImportXMEffect ( Sequencer::Command_t * pOutput,
const uint8_t * pInput )
extern

Convert an XM effect command to a Burgerlib one.


Given an data stream with an XM effect encoded into it, parse the stream, convert the command and its arguments, translate them into a Burgerlib command and argument

Parameters
pOutputPointer to the command to receive the translated values
pInputPointer to the input stream
Returns
Pointer to the data stream after parsing out a single command
See also
ImportXM(Sequencer::SongPackage *,const uint8_t *,uintptr_t)

◆ InitFileInfo()

void BURGER_API Burger::InitFileInfo ( FileInfo * pFileInfo)
externnoexcept

Initialize a Mac Finder FileInfo.


When creating a file on MacOS, a file type and creator code needs to be assigned. The default for generic files is file type "BINA" for binary and the creator code is "????" for unknown. It's up to the app developer to call set_creator_and_file_type() to assign the proper values after the file is created or modified.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pFileInfoPointer to an uninitialized FileInfo to be filled in.
See also
FileManager::set_creator_and_file_type(const char *, uint32_t, uint32_t)

◆ InitFSRefParam()

void BURGER_API Burger::InitFSRefParam ( FSRefParam * pFSRefParam,
FSRef * pFSRef,
uint32_t uCatInfoBitmap )
externnoexcept

Initialize a Mac FSRefParam.


When calling the Mac function PBGetCatalogInfoSync(), a FSRefParam needs to be prepared so only the information queried is returned. This structure is large, so this subroutine clears it out quickly. All entries except for "ref" and "whichInfo" are cleared to zero. These two values are set to the passed values.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pFSRefParamPointer to an uninitialized FSRefParam to be filled in.
pFSRefPointer to a valid FSRef of the file of interest.
uCatInfoBitmapValue to put in whichInfo.

◆ int_to_fixed()

Fixed32 Burger::int_to_fixed ( int32_t iInput)
inlinenoexcept

Convert an int32_t into a Fixed32 value.


Convert an integer into a fixed point number. No bounds checking is performed so values that exceed 32767 or are less than -32768 will yield undefined results.

Parameters
iInputInteger to convert
Returns
Result of the conversion without saturation
See also
int_to_fixed_saturate(int32_t)

◆ int_to_fixed_saturate()

Fixed32 BURGER_API Burger::int_to_fixed_saturate ( int32_t iInput)
externnoexcept

Convert an int32_t into a Fixed32 value with saturation.


Convert an integer into a fixed point number. Bounds checking is performed so values that exceed 32767 or are less than -32768 will yield max and min values.

Examples of clamping:

  • 0x8000 -> 0x7FFFFFFF
  • 0xFEEDBEEF -> 0x80000000
Parameters
iInputInteger to convert
Returns
Result of the conversion with saturation
See also
int_to_fixed(int32_t)

◆ int_to_float() [1/4]

Burger::int_to_float ( const int32_t * pInput)
inlinenoexcept

32 bit integer to floating point conversion


Parameters
pInputPointer to a 32 bit integer to convert
Returns
Floating point representation of the integer input
See also
int_to_float(int32_t), int_to_float(float *,int32_t) or int_to_float(float*,const int32_t *)

◆ int_to_float() [2/4]

Burger::int_to_float ( float * pOutput,
const int32_t * pInput )
inlinenoexcept

32 bit integer to floating point conversion


Note
This function is fast on the Xbox 360, PS3 and PowerPC64 MacOSX due to direct use of VMX128 instructions
Parameters
pInputPointer to a 32 bit integer to convert
pOutputPointer to a 32 bit float to receive the converted integer
See also
int_to_float(int32_t), int_to_float(const int32_t *) or int_to_float(float*,int32_t)

◆ int_to_float() [3/4]

Burger::int_to_float ( float * pOutput,
int32_t iInput )
inlinenoexcept

32 bit integer to floating point conversion


Parameters
iInput32 bit integer to convert
pOutputPointer to a 32 bit float to receive the converted integer
See also
int_to_float(int32_t), int_to_float(const int32_t *) or int_to_float(float *,const int32_t *)

◆ int_to_float() [4/4]

Burger::int_to_float ( int32_t iInput)
inlineconstexprnoexcept

32 bit integer to floating point conversion


Parameters
iInput32 bit integer to convert
Returns
Floating point representation of the integer input
See also
int_to_float(const int32_t *), int_to_float(float *,int32_t) or int_to_float(float*,const int32_t *)

◆ interpolate() [1/2]

Burger::interpolate ( double dFrom,
double dTo,
double dFactor )
inlineconstexprnoexcept

Interpolate between two floating point values.


Using a factor that's clamped from 0.0 to 1.0, return the value between dFrom and dTo inclusive along a linear scale where 0.0 returns dFrom and 1.0 returns dTo. Order of the dFrom and dTo values are unimportant.

Note
NaN and Inf as input will yield undefined behavior
Parameters
dFromValue to return if the interpolation factor is 0.0
dToValue to return if the interpolation factor is 1.0
dFactorInterpolation between 0.0 and 1.0 inclusive
Returns
Value between dFrom and dTo
See also
interpolate(float,float,float)

◆ interpolate() [2/2]

Burger::interpolate ( float fFrom,
float fTo,
float fFactor )
inlineconstexprnoexcept

Interpolate between two floating point values.


Using a factor that's clamped from 0.0f to 1.0f, return the value between fFrom and fTo inclusive along a linear scale where 0.0f returns fFrom and 1.0f returns fTo. Order of the fFrom and fTo values are unimportant.

Note
NaN and Inf as input will yield undefined behavior
Parameters
fFromValue to return if the interpolation factor is 0.0f
fToValue to return if the interpolation factor is 1.0f
fFactorInterpolation between 0.0f and 1.0f inclusive
Returns
Value between fFrom and fTo
See also
interpolate(double,double,double)

◆ invoke_debugger()

void BURGER_API Burger::invoke_debugger ( void )
externnoexcept

Enter the debugger if present.


On some platforms, this will only halt if a debugger is attached, if not, this function will return immediately

Note
This call should never be issued in a Release build. It is intended to invoke a debugger.

◆ IPv4ToString()

Burger::eError BURGER_API Burger::IPv4ToString ( String * pOutput,
uint32_t uIP,
uint_t uPort = 0xFFFFFFFFU )
externnoexcept

Convert an IPv4 address into a string.


Given a an IPv4 address, convert it into a readable string.

If uPort is less than 65536, then append the port address.

Example output "206.55.132.145:80" "127.0.0.1"

Parameters
pOutputString object to store the output
uIPIPv4 IP address in native endian with the highest 8 bits being the leftmost number
uPortOptional port number, if set to greater than 65535, it's not appended
Returns
Zero if no error, non-zero if setting the string object returned an error

◆ IPv6ToString()

Burger::eError BURGER_API Burger::IPv6ToString ( String * pOutput,
const uint8_t * pIP,
uint_t uPort = 0xFFFFFFFFU )
externnoexcept

Convert an IPv6 address into a string.


Given a an IPv6 address, convert it into a readable string.

If uPort is less than 65536, then append the port address.

"[2604:4080:1122:8430:44ab:4ad8:adfd:a731]:80" "fe80::adfd:a731" "::1"

Parameters
pOutputString object to store the output
pIPPointer to IPv6 IP address as a 16 byte array
uPortOptional port number, if set to greater than 65535, the address isn't encapsulated and not appended
Returns
Zero if no error, non-zero if setting the string object returned an error

◆ is_debugger_present()

uint_t BURGER_API Burger::is_debugger_present ( void )
externnoexcept

Detect if a debugger is attached.


Return TRUE if a debugger is attached

◆ is_finite() [1/2]

uint_t BURGER_API Burger::is_finite ( double dInput)
externnoexcept

Return TRUE if the value is finite.


Test for a finite number (Not Nan, Inf) and return TRUE if so.

Parameters
dInputA 64 bit floating point number.
Returns
TRUE if finite, FALSE if not.
See also
is_finite(float), is_NaN(double), is_infinite(double), is_normal(double) and get_sign_bit(double)

◆ is_finite() [2/2]

uint_t BURGER_API Burger::is_finite ( float fInput)
externnoexcept

Return TRUE if the value is finite.


Test for a finite number (Not Nan, Inf) and return TRUE if so.

Parameters
fInputA 32 bit floating point number.
Returns
TRUE if finite, FALSE if not.
See also
is_finite(double), is_NaN(float), is_infinite(float), is_normal(float) and get_sign_bit(float)

◆ is_infinite() [1/2]

uint_t BURGER_API Burger::is_infinite ( double dInput)
externnoexcept

Return TRUE if the value is infinity.


Test for infinity and return TRUE if so.

Parameters
dInputA 64 bit floating point number.
Returns
TRUE if Infinity, FALSE if not.
See also
is_infinite(float), is_NaN(double), is_finite(double), is_normal(double) and get_sign_bit(double)

◆ is_infinite() [2/2]

uint_t BURGER_API Burger::is_infinite ( float fInput)
externnoexcept

Return TRUE if the value is infinity.


Test for infinity and return TRUE if so.

Parameters
fInputA 32 bit floating point number.
Returns
TRUE if Infinity, FALSE if not.
See also
is_infinite(double), is_NaN(float), is_finite(float), is_normal(float) and get_sign_bit(float)

◆ is_macsbug_installed()

uint_t BURGER_API Burger::is_macsbug_installed ( void )
externnoexcept

Test if macsbug is installed.


For pre-MacOSX and Carbon systems, the MacsBug system extension can be installed to capture application crashes. This function will detect if MacsBug is present.

Note
Since MacsBug doesn't work with MacOS Carbon or MacOSX 10, always return FALSE
This is only available on Mac OS 7.5-9.9.2 or Carbon
Returns
TRUE if MacsBug is running

◆ is_metronub_installed()

uint_t BURGER_API Burger::is_metronub_installed ( void )
externnoexcept

Test if Metrowerks Metronub is installed.


For pre-MacOSX and Carbon systems, the Metrowerks Metronub system extension can be installed to capture application crashes. This function will detect if Metrowerks Metronub is present.

Note
The Metronub only runs on pre-MacOS X
This is only available on Mac OS 7.5-9.9.2 or Carbon
Returns
TRUE if Metrowerks Metronub is running

◆ is_NaN() [1/2]

uint_t BURGER_API Burger::is_NaN ( double dInput)
externnoexcept

Return TRUE if the value is a NaN.


Test for QNan and SNan and return TRUE if so.

Parameters
dInputA 64 bit floating point number.
Returns
TRUE if Nan, FALSE if not.
See also
is_NaN(float), is_infinite(double), is_finite(double), is_normal(double) and get_sign_bit(double)

◆ is_NaN() [2/2]

uint_t BURGER_API Burger::is_NaN ( float fInput)
externnoexcept

Return TRUE if the value is a NaN.


Test for QNan and SNan and return TRUE if so.

Parameters
fInputA 32 bit floating point number.
Returns
TRUE if Nan, FALSE if not.
See also
is_NaN(double), is_infinite(float), is_finite(float), is_normal(float) and get_sign_bit(float)

◆ is_normal() [1/2]

uint_t BURGER_API Burger::is_normal ( double dInput)
externnoexcept

Return TRUE if the value is normal.


Test for a finite normal number (Not Zero, NaN, Inf or denormalized) and return TRUE if so.

Parameters
dInputA 64 bit floating point number.
Returns
TRUE if normal, FALSE if not.
See also
is_normal(float), is_NaN(double), is_infinite(double), is_finite(double) and get_sign_bit(double)

◆ is_normal() [2/2]

uint_t BURGER_API Burger::is_normal ( float fInput)
externnoexcept

Return TRUE if the value is normal.


Test for a finite normal number (Not Zero, NaN, Inf or denormalized) and return TRUE if so.

Parameters
fInputA 32 bit floating point number.
Returns
TRUE if normal, FALSE if not.
See also
is_normal(double), is_NaN(float), is_infinite(float), is_finite(float) and get_sign_bit(float)

◆ IsDeviceXInput()

uint_t BURGER_API Burger::IsDeviceXInput ( const GUID * pGuid)
externnoexcept

Test if a device GUID belongs to an XInput device.


To allow DirectInput and XInput to work side-by-side, all devices that are supported by XInput should be ignored when enumerated for DirectInput control.

Given a GUID of a device, test the Plug and Play (PNP) device ID if it contains the substring "IG_", because if it does, it's an XInput supported device.

Note
This code is compatible with Windows XP, however it does follow Microsoft's recommendation of using an IWbemLocator if the code detects it's running on Windows Vista or later.
This is only available on Windows
Returns
FALSE if the device is not supported by XInput, TRUE if so.

◆ IsDigit()

uint_t Burger::IsDigit ( char iInput)
inlinenoexcept

Test if a character is 0-9.


If the character is ASCII 0 through 9, return non zero, otherwise return zero.

Parameters
iInputASCII character
Returns
Non zero if the character was 0 through 9, zero if not.
See also
IsHex(char), IsWhitespace(char), IsLowercase(char) or IsUppercase(char)

◆ IsElevated()

uint_t BURGER_API Burger::IsElevated ( void )
externnoexcept

Test if the application has elevated privileges.


On systems that support it, check if the user has elevated privileges.

Systems such as MSDOS and game consoles allow full access to all system resources, but on modern desktops, only Administrators or root accounts can modify system folders.

Note
Windows XP tests for access restriction, where all other systems test for access token elevation.
Returns
Zero if user access is not granted, non-zero if elevated access was granted.

◆ IsHex()

uint_t Burger::IsHex ( char iInput)
inlinenoexcept

Test if a character is 0-9, A-F or a-f.


If the character is ASCII 0 through 9, A through F or a through f, return non zero, otherwise return zero.

Parameters
iInputASCII character
Returns
Non zero if the character was 0 through 9, A-F or a-f, zero if not.
See also
IsDigit(char), IsWhitespace(char), IsLowercase(char) or IsUppercase(char)

◆ IsIPv6CompatibleIPv4()

uint_t BURGER_API Burger::IsIPv6CompatibleIPv4 ( const uint8_t * pIP)
externnoexcept

Test if an IPv6 address is an IPv4 address in a wrapper.


Given a an IPv6 address, test if it's really an encapsulated IPv4 address.

Parameters
pIPPointer to an IPv6 address to test
Returns
TRUE if it's an encapsulated IPv4 address, FALSE if not
See also
IsIPv6Unspecified(const uint8_t *), IsIPv6Loopback(const uint8_t *), IsIPv6Multicast(const uint8_t *), IsIPv6LinkLocal(const uint8_t *), IsIPv6SiteLocal(const uint8_t *), or IsIPv6MappedIPv4(const uint8_t *)

◆ IsIPv6LinkLocal()

uint_t BURGER_API Burger::IsIPv6LinkLocal ( const uint8_t * pIP)
externnoexcept

Test if an IPv6 address is a link local address.


Given an IPv6 address, test if it's a link local address.

A multicast IPv6 address starts with 0xfe and the second byte is 0x80 if masked with 0xc0, where 'x' is "don't care", fe8x:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .

Parameters
pIPPointer to an IPv6 address to test
Returns
TRUE if it's a link local address, FALSE if not
See also
IsIPv6Unspecified(const uint8_t *), IsIPv6Loopback(const uint8_t *), IsIPv6Multicast(const uint8_t *), IsIPv6SiteLocal(const uint8_t *), IsIPv6MappedIPv4(const uint8_t *), or IsIPv6CompatibleIPv4(const uint8_t *)

◆ IsIPv6Loopback()

uint_t BURGER_API Burger::IsIPv6Loopback ( const uint8_t * pIP)
externnoexcept

Test if an IPv6 address is a loop back address.


Given an IPv6 address, test if it's the loop back address.

An loopback IPv6 address is ::1 .

Parameters
pIPPointer to an IPv6 address to test
Returns
TRUE if it's the loop back address, FALSE if not
See also
IsIPv6Unspecified(const uint8_t *), IsIPv6Multicast(const uint8_t *), IsIPv6LinkLocal(const uint8_t *), IsIPv6SiteLocal(const uint8_t *), IsIPv6MappedIPv4(const uint8_t *), or IsIPv6CompatibleIPv4(const uint8_t *)

◆ IsIPv6MappedIPv4()

uint_t BURGER_API Burger::IsIPv6MappedIPv4 ( const uint8_t * pIP)
externnoexcept

Test if an IPv6 address is an IPv4 address in a wrapper.


Given a an IPv6 address, test if it's really an encapsulated IPv4 address.

Parameters
pIPPointer to an IPv6 address to test
Returns
TRUE if it's an encapsulated IPv4 address, FALSE if not
See also
IsIPv6Unspecified(const uint8_t *), IsIPv6Loopback(const uint8_t *), IsIPv6Multicast(const uint8_t *), IsIPv6LinkLocal(const uint8_t *), IsIPv6SiteLocal(const uint8_t *), or IsIPv6CompatibleIPv4(const uint8_t *)

◆ IsIPv6Multicast()

uint_t Burger::IsIPv6Multicast ( const uint8_t * pIP)
inlinenoexcept

Test if an IPv6 address is a multicast address.


Given an IPv6 address, test if it's a multicast address.

A multicast IPv6 address starts with 0xff, where 'x' is "don't care", ffxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .

Parameters
pIPPointer to an IPv6 address to test
Returns
TRUE if it's a multicast address, FALSE if not
See also
IsIPv6Unspecified(const uint8_t *), IsIPv6Loopback(const uint8_t *), IsIPv6LinkLocal(const uint8_t *), IsIPv6SiteLocal(const uint8_t *), IsIPv6MappedIPv4(const uint8_t *), or IsIPv6CompatibleIPv4(const uint8_t *)

◆ IsIPv6MulticastGlobal()

uint_t BURGER_API Burger::IsIPv6MulticastGlobal ( const uint8_t * pIP)
externnoexcept

Test if an IPv6 multicast address has global scope.


Given an IPv6 multicast address, test if it has global scope.

A multicast IPv6 address starts with 0xff and the second byte is 0x0e if masked with 0x0f, where 'x' is "don't care", ffxe:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .

Parameters
pIPPointer to an IPv6 address to test
Returns
TRUE if it's a multicast address with global scope, FALSE if not
See also
IsIPv6MulticastNodeLocal(const uint8_t *), IsIPv6MulticastLinkLocal(const uint8_t *), IsIPv6MulticastSiteLocal(const uint8_t *), IsIPv6MulticastOrgLocal(const uint8_t *), or IsIPv6Multicast(const uint8_t *)

◆ IsIPv6MulticastLinkLocal()

uint_t BURGER_API Burger::IsIPv6MulticastLinkLocal ( const uint8_t * pIP)
externnoexcept

Test if an IPv6 multicast address has link local scope.


Given an IPv6 multicast address, test if it has link local scope.

A multicast IPv6 address starts with 0xff and the second byte is 0x02 if masked with 0x0f, where 'x' is "don't care", ffx2:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .

Parameters
pIPPointer to an IPv6 address to test
Returns
TRUE if it's a multicast address with link local scope, FALSE if not
See also
IsIPv6MulticastNodeLocal(const uint8_t *), IsIPv6MulticastSiteLocal(const uint8_t *), IsIPv6MulticastOrgLocal(const uint8_t *), IsIPv6MulticastGlobal(const uint8_t *), or IsIPv6Multicast(const uint8_t *)

◆ IsIPv6MulticastNodeLocal()

uint_t BURGER_API Burger::IsIPv6MulticastNodeLocal ( const uint8_t * pIP)
externnoexcept

Test if an IPv6 multicast address has node local scope.


Given an IPv6 multicast address, test if it has node local scope.

A multicast IPv6 address starts with 0xff and the second byte is 0x01 if masked with 0x0f, where 'x' is "don't care", ffx1:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .

Parameters
pIPPointer to an IPv6 address to test
Returns
TRUE if it's a multicast address with node local scope, FALSE if not
See also
IsIPv6MulticastLinkLocal(const uint8_t *), IsIPv6MulticastSiteLocal(const uint8_t *), IsIPv6MulticastOrgLocal(const uint8_t *), IsIPv6MulticastGlobal(const uint8_t *), or IsIPv6Multicast(const uint8_t *)

◆ IsIPv6MulticastOrgLocal()

uint_t BURGER_API Burger::IsIPv6MulticastOrgLocal ( const uint8_t * pIP)
externnoexcept

Test if an IPv6 multicast address has organization local scope.


Given an IPv6 multicast address, test if it has organization local scope.

A multicast IPv6 address starts with 0xff and the second byte is 0x08 if masked with 0x0f, where 'x' is "don't care", ffx8:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .

Parameters
pIPPointer to an IPv6 address to test
Returns
TRUE if it's a multicast address with organization local scope, FALSE if not
See also
IsIPv6MulticastNodeLocal(const uint8_t *), IsIPv6MulticastLinkLocal(const uint8_t *), IsIPv6MulticastSiteLocal(const uint8_t *), IsIPv6MulticastGlobal(const uint8_t *), or IsIPv6Multicast(const uint8_t *)

◆ IsIPv6MulticastSiteLocal()

uint_t BURGER_API Burger::IsIPv6MulticastSiteLocal ( const uint8_t * pIP)
externnoexcept

Test if an IPv6 multicast address has site local scope.


Given an IPv6 multicast address, test if it has site local scope.

A multicast IPv6 address starts with 0xff and the second byte is 0x05 if masked with 0x0f, where 'x' is "don't care", ffx5:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .

Parameters
pIPPointer to an IPv6 address to test
Returns
TRUE if it's a multicast address with site local scope, FALSE if not
See also
IsIPv6MulticastNodeLocal(const uint8_t *), IsIPv6MulticastLinkLocal(const uint8_t *), IsIPv6MulticastOrgLocal(const uint8_t *), IsIPv6MulticastGlobal(const uint8_t *), or IsIPv6Multicast(const uint8_t *)

◆ IsIPv6SiteLocal()

uint_t BURGER_API Burger::IsIPv6SiteLocal ( const uint8_t * pIP)
externnoexcept

Test if an IPv6 address is a site local address.


Given an IPv6 address, test if it's a site local address.

A multicast IPv6 address starts with 0xfe and the second byte is 0xc0 if masked with 0xc0, where 'x' is "don't care", fecx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx:xxxx .

Parameters
pIPPointer to an IPv6 address to test
Returns
TRUE if it's a site local address, FALSE if not
See also
IsIPv6Unspecified(const uint8_t *), IsIPv6Loopback(const uint8_t *), IsIPv6Multicast(const uint8_t *), IsIPv6LinkLocal(const uint8_t *), IsIPv6MappedIPv4(const uint8_t *), or IsIPv6CompatibleIPv4(const uint8_t *)

◆ IsIPv6Unspecified()

uint_t BURGER_API Burger::IsIPv6Unspecified ( const uint8_t * pIP)
externnoexcept

Test if an IPv6 address is unspecified.


Given an IPv6 address, test if it's specified.

An unspecified IPv6 address is :: .

Parameters
pIPPointer to an IPv6 address to test
Returns
TRUE if it's unspecified, FALSE if not
See also
IsIPv6Loopback(const uint8_t *), IsIPv6Multicast(const uint8_t *), IsIPv6LinkLocal(const uint8_t *), IsIPv6SiteLocal(const uint8_t *), IsIPv6MappedIPv4(const uint8_t *), or IsIPv6CompatibleIPv4(const uint8_t *)

◆ IsLowercase()

uint_t Burger::IsLowercase ( char iInput)
inlinenoexcept

Test if a character is a-z.


If the character is ASCII a through z, return non zero, otherwise return zero.

Parameters
iInputASCII character
Returns
Non zero if the character was a through z, zero if not.
See also
IsDigit(char), IsHex(char), IsWhitespace(char) or IsUppercase(char)

◆ IsNetworkEnumQueryPacket()

uint_t BURGER_API Burger::IsNetworkEnumQueryPacket ( const void * pPacket,
uintptr_t uPacketSize )
extern

Verify a query packet for network server scanning.


Test a 512 byte buffer with a special, big endian magic number for validation.

Parameters
pPacketPointer to a buffer to validate
uPacketSizeSize of the buffer to validate
Returns
TRUE if valid, FALSE if not
See also
MakeNetworkEnumQueryPacket(const void *)

◆ IsPointerInvalid()

uint_t Burger::IsPointerInvalid ( const void * pInput)
inlinenoexcept

Test if a pointer is invalid.


On windows platforms, memory pointers cannot point to any location less than 65536, so any pointer less than 65536 is considered broken. All other platforms will only consider nullptr as an invalid pointer.

No attempt is made to check if the memory points to a specific data type of if the application has permission to access the memory.

Parameters
pInputPointer to test
Returns
TRUE if it points to invalid memory, FALSE if it's a good pointer.
See also
Burger::IsPointerValid(const void *pInput)

◆ IsPointerValid()

uint_t Burger::IsPointerValid ( const void * pInput)
inlinenoexcept

Test if a pointer is valid.


On windows platforms, memory pointers cannot point to any location less than 65536, so any pointer less than 65536 is considered broken. All other platforms will only consider nullptr as an invalid pointer.

No attempt is made to check if the memory points to a specific data type of if the application has permission to access the memory.

Parameters
pInputPointer to test
Returns
TRUE if it points to valid memory, FALSE if it's a bad pointer.
See also
Burger::IsPointerInvalid(const void *pInput)

◆ IsSelfAssignedIPv4()

uint_t Burger::IsSelfAssignedIPv4 ( uint32_t uIP)
inlinenoexcept

Test if an IPv4 address is self assigned.


Given an IPv4 address, test if it's a self assigned address

Self assigned IPv4 addresses are 169.254.xxx.xxx where 'x' is "don't care".

Parameters
uIPIPv4 address in native endian
Returns
TRUE if it's a self assigned IPv4 address, FALSE if not

◆ IsSpace()

uint_t Burger::IsSpace ( int iInput)
inlinenoexcept

Test if a character is ASCII white space.


If the character is ASCII SPACE, TAB, LF, VT, FF or CR, return non zero, otherwise return zero.

Note
This is the same as isspace() from ctype.h.
Parameters
iInputASCII character
Returns
Non zero if the character was white space, zero if not.
See also
IsDigit(char), IsHex(char), IsLowercase(char) or IsUppercase(char)

◆ IsStringEmpty() [1/2]

uint_t Burger::IsStringEmpty ( const char * pInput)
inlinenoexcept

Test if a UTF-8 string pointer points to a nullptr string.


Test if the pointer is in a valid address range and if so, test if the first byte is a non zero character. If both tests pass, return TRUE.

Parameters
pInputPointer to a UTF-8 string to test
Returns
TRUE if it points to valid string, FALSE if it's a bad pointer or empty string.
See also
Burger::IsStringEmpty(const uint16_t *pInput)

◆ IsStringEmpty() [2/2]

uint_t Burger::IsStringEmpty ( const uint16_t * pInput)
inlinenoexcept

Test if a UTF-16 string pointer points to a nullptr string.


Test if the pointer is in a valid address range and if so, test if the first byte is a non zero character. If both tests pass, return TRUE.

Parameters
pInputPointer to a UTF-16 string to test
Returns
TRUE if it points to valid string, FALSE if it's a bad pointer or empty string.
See also
Burger::IsStringEmpty(const char *pInput)

◆ IsUppercase()

uint_t Burger::IsUppercase ( char iInput)
inlinenoexcept

Test if a character is A-Z.


If the character is ASCII A through Z, return non zero, otherwise return zero.

Parameters
iInputASCII character
Returns
Non zero if the character was A through Z, zero if not.
See also
IsDigit(char), IsHex(char), IsWhitespace(char) or IsLowercase(char)

◆ IsWhitespace()

uint_t Burger::IsWhitespace ( char iInput)
inlinenoexcept

Test if a character is TAB or SPACE.


If the character is ASCII TAB or SPACE, return non zero, otherwise return zero.

Parameters
iInputASCII character
Returns
Non zero if the character was TAB or SPACE, zero if not.
See also
IsDigit(char), IsHex(char), IsLowercase(char) or IsUppercase(char)

◆ little_endian_load_extended()

double BURGER_API Burger::little_endian_load_extended ( const Float80Bit pInput)
externnoexcept

Load a little endian 80 bit float as a double.


Convert an 80 bit float stored in memory in little endian format into a double in native endian

Parameters
pInputPointer to the 80 bit floating point number
Returns
Value in the form of a double
See also
big_endian_load_extended(const Float80Bit)

◆ LoadFile()

void *BURGER_API Burger::LoadFile ( FILE * fp,
uintptr_t * pLength )
extern

Load a file opened with fopen() into memory.


Given an ANSI FILE * for a freshly opened file with read permissions, allocate enough memory to accommodate the entire file and read it into memory. The file is closed at the end of the function. The passed fp pointer is considered invalid and closed after this call is issued.

Dispose of the memory returned with a call to Burger::Free(const void *)

Parameters
fpFILE * to the file to read from
pLengthto a uintptr_t to receive the size of the file in bytes.
Returns
NULL if failure, a pointer on success
Note
If the file is empty, it's considered a failure and a NULL is returned.
See also
SaveFile(FILE *,const void *,uintptr_t)

◆ MACEExp1to3()

void BURGER_API Burger::MACEExp1to3 ( const uint8_t * pInput,
uint8_t * pOutput,
uintptr_t uPacketCount,
MACEState_t * pInputState,
MACEState_t * pOutputState,
uint_t uNumChannels,
uint_t uWhichChannel )
extern

Decompress audio compressed with MACE 3:1.


This routine will decompress data by trying to "predict" where the next sample will be. This is a lossy compression targeted to unsigned 8 bit samples

Each call will only decompress one channel of data. To decompress stereo input, call this function twice like this

Each packet of compressed data occupies 2 bytes and yields 6 bytes

// Decompress mono
uint8_t SoundBufferMono[1024*6];
uint8_t CompressedMono[1024*2];
Burger::MACEExp1to3(SoundBufferMono,CompressedMono,1024,NULL,NULL,1,1);
// Decompress stereo
uint8_t SoundBufferLeft[1024*6];
uint8_t SoundBufferRight[1024*6];
uint8_t Compressed[(1024*2)*2];
Burger::MACEExp1to3(SoundBufferLeft,Compressed,1024,NULL,NULL,2,1);
Burger::MACEExp1to3(SoundBufferRight,Compressed,1024,NULL,NULL,2,2);
#define NULL
Define of the number 0 for pointer invalidation.
Definition burger.h:45
void MACEExp1to3(const uint8_t *pInput, uint8_t *pOutput, uintptr_t uPacketCount, MACEState_t *pInputState, MACEState_t *pOutputState, uint_t uNumChannels, uint_t uWhichChannel)
Decompress audio compressed with MACE 3:1.
Definition brmace.cpp:596
Note
The output buffer must be 6*uPacketCount bytes in size!
Parameters
pInputPointer to the compressed data
pOutputPointer to the uint8_t buffer to receive the decompressed data
uPacketCountNumber of compressed packets to decompress
pInputStatePointer to a running MACEState_t for partial decompression
pOutputStatePointer to a MACEState_t for the state of the decompression after this call completes
uNumChannels1 for mono, 2 for stereo
uWhichChannel1 for left channel, 2 for right channel
See also
MACEExp1to6()

◆ MACEExp1to6()

void BURGER_API Burger::MACEExp1to6 ( const uint8_t * pInput,
uint8_t * pOutput,
uintptr_t uPacketCount,
MACEState_t * pInputState,
MACEState_t * pOutputState,
uint_t uNumChannels,
uint_t uWhichChannel )
extern

Decompress audio compressed with MACE 6:1.


This routine will decompress data by trying to "predict" where the next sample will be. This is a lossy compression targeted to unsigned 8 bit samples

Each call will only decompress one channel of data. To decompress stereo input, call this function twice like this

Each packet of compressed data occupies 1 byte and yields 6 bytes

// Decompress mono
uint8_t SoundBufferMono[1024*6];
uint8_t CompressedMono[1024];
Burger::MACEExp1to6(SoundBufferMono,CompressedMono,1024,NULL,NULL,1,1);
// Decompress stereo
uint8_t SoundBufferLeft[1024*6];
uint8_t SoundBufferRight[1024*6];
uint8_t Compressed[1024*2];
Burger::MACEExp1to6(SoundBufferLeft,Compressed,1024,NULL,NULL,2,1);
Burger::MACEExp1to6(SoundBufferRight,Compressed,1024,NULL,NULL,2,2);
void MACEExp1to6(const uint8_t *pInput, uint8_t *pOutput, uintptr_t uPacketCount, MACEState_t *pInputState, MACEState_t *pOutputState, uint_t uNumChannels, uint_t uWhichChannel)
Decompress audio compressed with MACE 6:1.
Definition brmace.cpp:455
Note
The output buffer must be 6*uPacketCount bytes in size!
Parameters
pInputPointer to the compressed data
pOutputPointer to the uint8_t buffer to receive the decompressed data
uPacketCountNumber of compressed packets to decompress
pInputStatePointer to a running MACEState_t for partial decompression
pOutputStatePointer to a MACEState_t for the state of the decompression after this call completes
uNumChannels1 for mono, 2 for stereo
uWhichChannel1 for left channel, 2 for right channel
See also
MACEExp1to3()

◆ MakeNetworkEnumQueryPacket()

void BURGER_API Burger::MakeNetworkEnumQueryPacket ( void * pPacket)
extern

Create a query packet for network server scanning.


Fill in a 512 byte buffer with a special, big endian magic number which will be validated on the receiving server before the server responds with information about the server.

Parameters
pPacketPointer to a 512 byte buffer to fill in for a kQueryCommand
See also
IsNetworkEnumQueryPacket(const void *,uintptr_t)

◆ MemoryCaseCompare()

int BURGER_API Burger::MemoryCaseCompare ( const void * pInput1,
const void * pInput2,
uintptr_t uCount )
externnoexcept

Compare two byte buffers for equality, case insensitive.


Given pointers to two unsigned byte arrays, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero. If the byte is an upper case ASCII character, convert it to lower case before the subtraction is performed

Parameters
pInput1Pointer to the first buffer to subtract from.
pInput2Pointer to the second buffer to subtract with.
uCountSize in bytes of both of the buffers.
Returns
Zero on equality, negative on less than, positive on greater than.
See also
MemoryCompare(const void *,const void *,uintptr_t)

◆ MemoryCharacter() [1/2]

char *BURGER_API Burger::MemoryCharacter ( const char * pInput,
uintptr_t uInputSize,
int iChar )
externnoexcept

Scan for the first occurrence of a specific character in a byte array.


Returns a pointer to the first occurrence of the character iChar in the 8 bit pInput or nullptr if the character was not found

Parameters
pInputPointer to an array of bytes to scan
uInputSizeSize of the buffer in bytes
iCharCharacter to scan for
Returns
Pointer inside the input string to the first matching character or nullptr if not found
See also
MemoryCharacter(const uint16_t *,uintptr_t,uint_t)

◆ MemoryCharacter() [2/2]

uint16_t *BURGER_API Burger::MemoryCharacter ( const uint16_t * pInput,
uintptr_t uInputSize,
uint_t uChar )
externnoexcept

Scan for the first occurrence of a specific character in a short array.


Returns a pointer to the first occurrence of the character uChar in the 16 bit pInput or nullptr if the character was not found

Parameters
pInputPointer to an array of 16 bit shorts to scan
uInputSizeSize of the buffer in bytes
uCharCharacter to scan for
Returns
Pointer inside the input string to the first matching character or nullptr if not found
See also
MemoryCharacter(const char *,uintptr_t,int)

◆ MemoryCharacterReverse() [1/2]

char *BURGER_API Burger::MemoryCharacterReverse ( const char * pInput,
uintptr_t uInputSize,
int iChar )
externnoexcept

Scan for the last occurrence of a specific character in a buffer.


Returns a pointer to the last occurrence of the character iChar in the memory buffer pInput or nullptr if the character was not found

Note
This function can be used to scan for zeros in the data array.
Parameters
pInputPointer to a char buffer string to scan
uInputSizeNumber of bytes contained in the buffer
iCharCharacter to scan for
Returns
Pointer inside the input string to the last matching character or nullptr if not found
See also
MemoryCharacterReverse(const uint16_t *,uintptr_t, uint_t) and StringCharacterReverse(const char *, int)

◆ MemoryCharacterReverse() [2/2]

uint16_t *BURGER_API Burger::MemoryCharacterReverse ( const uint16_t * pInput,
uintptr_t uInputSize,
uint_t uChar )
externnoexcept

Scan for the last occurrence of a specific character in a uint16_t buffer.


Returns a pointer to the last occurrence of the character uChar in the uint16_t string buffer pInput or nullptr if the character was not found

Note
This function can be used to scan for zeros in the data array.
Parameters
pInputPointer to a uint16_t string buffer to scan
uInputSizeNumber of BYTES in the buffer
uCharCharacter to scan for
Returns
Pointer inside the input string to the last matching character or nullptr if not found
See also
MemoryCharacterReverse(const char *, uintptr_t, int) and StringCharacterReverse(const uint16_t *, uint_t)

◆ MemoryClear()

void BURGER_API Burger::MemoryClear ( void * pOutput,
uintptr_t uCount )
externnoexcept

Set a buffer to all zeros.


Given a pointer to a byte array, erase it to all zeros

Parameters
pOutputPointer to the buffer to erase.
uCountSize in bytes of the buffer.
Note
This function is not recommended for non-cached or special memories. On some platforms, it will use special cache clear instructions to perform the operation quickly in which cache-disabled sections of memory would generate a page fault.
See also
MemoryFill() and MemoryCopy()

◆ MemoryCompare()

int BURGER_API Burger::MemoryCompare ( const void * pInput1,
const void * pInput2,
uintptr_t uCount )
externnoexcept

Compare two byte buffers for equality.


Given pointers to two unsigned byte arrays, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero.

This is equivalent to memcmp()

Parameters
pInput1Pointer to the first buffer to subtract from.
pInput2Pointer to the second buffer to subtract with.
uCountSize in bytes of both of the buffers.
Returns
Zero on equality, negative on less than, positive on greater than.
See also
MemoryCaseCompare(const void *,const void *,uintptr_t)

◆ MemoryCopy()

void BURGER_API Burger::MemoryCopy ( void * pOutput,
const void * pInput,
uintptr_t uCount )
externnoexcept

Copy raw memory from one buffer to another.


Given a pointer to a byte stream, copy it to a destination buffer using a supplied input length.

Parameters
pOutputPointer to the buffer to get the copy.
pInputPointer to the buffer with the raw data to copy from.
uCountSize in bytes of the data to copy.
Note
This function will not check if the output buffer is not large enough for the input. Caution must be used with this function.
This function uses large chuck data copies, so the input and output pointers must point to separate buffers. If they are overlapping buffers, the results are undefined.
See also
MemoryMove(), MemoryFill() and MemoryClear()

◆ MemoryFill()

void BURGER_API Burger::MemoryFill ( void * pOutput,
uint8_t uFill,
uintptr_t uCount )
externnoexcept

Set a buffer to a specific value.


Given a pointer to a byte array, fill it with a specific value

Parameters
pOutputPointer to the buffer to erase.
uFill8 bit value to fill memory with
uCountSize in bytes of the buffer.
Note
This function is not recommended for non-cached or special memories. On some platforms, it will use special cache clear instructions to perform the operation quickly in which cache-disabled sections of memory would generate a page fault.
See also
MemoryClear() and MemoryCopy()

◆ MemoryMove()

void BURGER_API Burger::MemoryMove ( void * pOutput,
const void * pInput,
uintptr_t uCount )
externnoexcept

Copy raw memory from one buffer to another in any direction.


Given a pointer to a byte stream, copy it to a destination buffer using a supplied input length. This differs from MemoryCopy() in that it is safe to use this function for up or down memory copies. It will determine which direction to perform the copy in a safe manner. As such, there is a small performance penalty for using this function instead of MemoryCopy().

Parameters
pOutputPointer to the buffer to get the copy.
pInputPointer to the buffer with the raw data to copy from.
uCountSize in bytes of the data to copy.
See also
MemoryCopy(), MemoryClear() and MemoryFill()

◆ MemoryNot() [1/2]

void BURGER_API Burger::MemoryNot ( void * pOutput,
const void * pInput,
uintptr_t uCount )
externnoexcept

Copy a buffer that's been exclusive or'd with 0xFF.


Given a pointer to a byte array, toggle all the zeros to ones and vice versa and store the result into another buffer

Parameters
pOutputPointer to the buffer to store the result.
pInputPointer to the buffer to toggle.
uCountSize in bytes of the buffer.
See also
MemoryNot(void *,uintptr_t) and MemoryXor(void *,const void ,uint8_t,uintptr_t)

◆ MemoryNot() [2/2]

void BURGER_API Burger::MemoryNot ( void * pOutput,
uintptr_t uCount )
externnoexcept

Exclusive or a buffer with 0xFF.


Given a pointer to a byte array, toggle all the zeros to ones and vice versa.

Parameters
pOutputPointer to the buffer to toggle.
uCountSize in bytes of the buffer.
See also
MemoryNot(void *,const void *,uintptr_t) and MemoryXor(void ,uint8_t,uintptr_t)

◆ MemoryXor() [1/4]

void BURGER_API Burger::MemoryXor ( void * pOutput,
const void * pInput,
uint8_t uXor,
uintptr_t uCount )
externnoexcept

Exclusive or a buffer with a value and store the result in another buffer.


Given a pointer to a byte array, exclusive or all of the values with a given 8 bit value and store the result elsewhere

Parameters
pOutputPointer to the buffer to store the result.
pInputPointer to the buffer to toggle.
uXorValue to exclusive or the buffer with
uCountSize in bytes of the buffer.
See also
MemoryXor(void *,uint8_t,uintptr_t) and MemoryNot(void *,const void ,uintptr_t)

◆ MemoryXor() [2/4]

void BURGER_API Burger::MemoryXor ( void * pOutput,
const void * pInput,
uintptr_t uCount )
externnoexcept

Exclusive or a buffer with another buffer.


Given pointers to two byte arrays, exclusive or all of the values of each buffer with each other and store the result in the first buffer

Parameters
pOutputPointer to the buffer to exclusive or and store the result.
pInputPointer to the buffer to exclusive or with.
uCountSize in bytes of the buffers. Both buffers must be the same size.
See also
MemoryXor(void *,const void *,const void *,uintptr_t) and MemoryXor(void ,uint8_t,uintptr_t)

◆ MemoryXor() [3/4]

void BURGER_API Burger::MemoryXor ( void * pOutput,
const void * pInput1,
const void * pInput2,
uintptr_t uCount )
externnoexcept

Exclusive or a buffer with another buffer and store the result in a third buffer.


Given pointers to two byte arrays, exclusive or all of the values of each buffer with each other and store the result in a third buffer

Parameters
pOutputPointer to the buffer to store the result.
pInput1Pointer to the first buffer to exclusive or with.
pInput2Pointer to the second buffer to exclusive or with.
uCountSize in bytes of the buffers. All three buffers must be the same size.
See also
MemoryXor(void *,const void *,uintptr_t) and MemoryXor(void *,const void ,uint8_t,uintptr_t)

◆ MemoryXor() [4/4]

void BURGER_API Burger::MemoryXor ( void * pOutput,
uint8_t uXor,
uintptr_t uCount )
externnoexcept

Exclusive or a buffer with a value.


Given a pointer to a byte array, exclusive or all of the values with a given 8 bit value.

Parameters
pOutputPointer to the buffer to toggle.
uXorValue to exclusive or the buffer with
uCountSize in bytes of the buffer.
See also
MemoryXor(void *,const void *,uint8_t,uintptr_t) and MemoryNot(void ,uintptr_t)

◆ modulo_radians() [1/2]

double BURGER_API Burger::modulo_radians ( double dInput)
externnoexcept

Modulo the range of the input so that -BURGER_PI <= fInput < BURGER_PI.


Wrap around a value in radians into remain in the valid range of radians.

Note
Due to 64 bit precision, numbers larger than 1024*pi will likely contain rounding errors
Parameters
dInput64 bit floating point value in radians
Returns
The input converted to a 64 bit floating point value wrapped to fit within.
See also
modulo_radians(float), get_sine(double), get_cosine(double)

◆ modulo_radians() [2/2]

float BURGER_API Burger::modulo_radians ( float fInput)
externnoexcept

Modulo the range of the input so that -BURGER_PI <= fInput < BURGER_PI.


Wrap around a value in radians into remain in the valid range of radians.

Note
Due to 32 bit precision, numbers larger than 16*pi will likely contain rounding errors
Parameters
fInput32 bit floating point value in radians
Returns
The input converted to a 32 bit floating point value wrapped to fit within.
See also
modulo_radians(double), get_sine(float), get_cosine(float)

◆ move()

template<class T >
Burger::move ( T && t)
inlineconstexprnoexcept

Upconvert to && for move semantics.


A template that converts the type to a && type. Used to force move semantics. It's used to allow for C++11 or higher compilers to generate better code by moving the contents of a class or structure instead of making a copy.

Note
On compilers that don't support move semantics, it will return a reference and use the older copy semantics.
Template Parameters
TType to convert to &&.
Parameters
tObject reference to convert to &&
Returns
Object reference converted to &&, or & on old compilers.

Based on std::move

See also
is_function

◆ MP3DCT12()

void BURGER_API Burger::MP3DCT12 ( float * pSideSamples,
float * pHybridOutput,
float * pOutput,
const float * pPrevious,
const float * pBlockType )
extern

12 entry DCT for MP3


Perform a 12 entry DCT for MP3 decoding. This is a simpler form of DCT36 that only processes 1/3 of the entries

"On Computing the Discrete Fourier Transform", Mathematics of Computation, Volume 32, Number 141, January 1978, Pages 175-199 http://www.ams.org/journals/mcom/1978-32-141/S0025-5718-1978-0468306-4/S0025-5718-1978-0468306-4.pdf

Parameters
pSideSamplesPointer a buffer of cSideSampleLimit (18) entries for cascade (Input/Output)
pHybridOutputPointer a buffer of cSubBandLimit*cSideSampleLimit (32*18) entries for transform (Input/Output)
pOutputPointer a buffer of cSideSampleLimit (18) entries for output
pPreviousPointer to the previous output buffer of cSideSampleLimit (18) entries
pBlockTypePointer a 36 entry block type table

◆ MP3DCT36()

void BURGER_API Burger::MP3DCT36 ( float * pSideSamples,
float * pHybridOutput,
float * pOutput,
const float * pPrevious,
const float * pBlockType )
extern

36 entry DCT for MP3


Perform a 36 entry DCT for MP3 decoding

"On Computing the Discrete Fourier Transform", Mathematics of Computation, Volume 32, Number 141, January 1978, Pages 175-199 http://www.ams.org/journals/mcom/1978-32-141/S0025-5718-1978-0468306-4/S0025-5718-1978-0468306-4.pdf

Parameters
pSideSamplesPointer a buffer of cSideSampleLimit (18) entries for cascade (Input/Output)
pHybridOutputPointer a buffer of cSubBandLimit*cSideSampleLimit (32*18) entries for transform (Input/Output)
pOutputPointer a buffer of cSideSampleLimit (18) entries for output
pPreviousPointer to the previous output buffer of cSideSampleLimit (18) entries
pBlockTypePointer a 36 entry block type table

◆ MP3DCT64()

void BURGER_API Burger::MP3DCT64 ( float * pOutput1,
float * pOutput2,
const float * pInput )
extern

MP3 Discrete cosine transform function.


Discrete cosine transform applied to an 8*8 2 dimensional array for decoding audio for MP3.

The output arrays are written at a stride of 16 entries

Parameters
pOutput1Pointer to a buffer with a minimum of 257 entries
pOutput2Pointer to a buffer with a minimum of 257 entries
pInputPointer to a 32 entry array of audio samples

◆ MP3FHT()

void BURGER_API Burger::MP3FHT ( float * pInput,
uintptr_t uCount )
extern

MP3 Fast Fourier (Hartley) transform.


https://en.wikipedia.org/wiki/Hartley_transform

Apply a Hartley transform optimized for either 256 or 1024 entry arrays using the MP3 FHT algorithm

Parameters
pInputPointer to an array of terms to apply the FHT
uCountEither 256 or 1024 entries

◆ New()

template<class T >
Burger::New ( void )
noexcept

Allocate a class instance.


Allocate memory with Burger::Alloc(uintptr_t) and invoke the default constructor on it.

Returns
nullptr on memory error or a valid pointer to a new class instance
See also
Burger::Delete(const T*)

◆ NumberHexStringLength() [1/3]

template<class T >
Burger::NumberHexStringLength ( T input)
inlinenoexcept

Calculate the length of a string that represents this hex integer.


A template to map an integral data type and calls the appropriate NumberHexStringLength function.

Note
This will intentionally fail on any non-integral data type.
Template Parameters
TInput data type, tested with is_integral.
Parameters
inputIntegral value to determine the string length if converted to hex ASCII.
See also
NumberHexStringLength(uint32_t) or NumberHexStringLength(uint64_t)

◆ NumberHexStringLength() [2/3]

uint_t BURGER_API Burger::NumberHexStringLength ( uint32_t uInput)
externnoexcept

Calculate the length of a string that represents this hex integer.


Determine the number of characters are needed to convert the input value into a hexadecimal string. 32 bit integers have a minimum of one character to a maximum of 8 characters.

Parameters
uInput32 bit unsigned integer to test.
Returns
1 through 8 for the number of digits this number requires for string conversion.
See also
NumberHexStringLength(uint64_t)

◆ NumberHexStringLength() [3/3]

uint_t BURGER_API Burger::NumberHexStringLength ( uint64_t uInput)
externnoexcept

Calculate the length of a string that represents this hex integer.


Determine the number of characters are needed to convert the input value into a hexadecimal string. 64 bit integers have a minimum of one character to a maximum of 16 characters.

Parameters
uInput64 bit unsigned integer to test.
Returns
1 through 16 for the number of digits this number requires for string conversion.
See also
NumberHexStringLength(uint32_t)

◆ NumberOctalStringLength() [1/3]

template<class T >
Burger::NumberOctalStringLength ( T input)
inlinenoexcept

Calculate the length of a string that represents this octal integer.


A template to map an integral data type and calls the appropriate NumberOctalStringLength function.

Note
This will intentionally fail on any non-integral data type.
Template Parameters
TInput data type, tested with is_integral.
Parameters
inputIntegral value to determine the string length if converted to octal ASCII.
See also
NumberOctalStringLength(uint32_t) or NumberOctalStringLength(uint64_t)

◆ NumberOctalStringLength() [2/3]

uint_t BURGER_API Burger::NumberOctalStringLength ( uint32_t uInput)
externnoexcept

Calculate the length of a string that represents this octal integer.


Determine the number of characters are needed to convert the input value into a octal string. 32 bit integers have a minimum of one character to a maximum of 11 characters.

Parameters
uInput32 bit unsigned integer to test.
Returns
1 through 11 for the number of digits this number requires for string conversion.
See also
NumberOctalStringLength(uint64_t)

◆ NumberOctalStringLength() [3/3]

uint_t BURGER_API Burger::NumberOctalStringLength ( uint64_t uInput)
externnoexcept

Calculate the length of a string that represents this octal integer.


Determine the number of characters are needed to convert the input value into a octal string. 64 bit integers have a minimum of one character to a maximum of 22 characters.

Parameters
uInput32 bit unsigned integer to test.
Returns
1 through 22 for the number of digits this number requires for string conversion.
See also
NumberOctalStringLength(uint32_t)

◆ NumberStringLength() [1/5]

uint_t BURGER_API Burger::NumberStringLength ( int32_t iInput)
externnoexcept

Calculate the length of a string that represents this integer.


Determine the number of characters are needed to convert the input value into a string. 32 bit integers have a minimum of one character to a maximum of 10 characters and an extra character for a '-' for negative numbers which could be "-2147483648".

Example: 12345 will return 5, 1000 will return 4, 0 through 9 will return 1.

Parameters
iInput32 bit signed integer to test.
Returns
1 through 10 for the number of digits this number requires for string conversion.
See also
NumberStringLength(uint32_t) or NumberStringLength(int64_t)

◆ NumberStringLength() [2/5]

uint_t BURGER_API Burger::NumberStringLength ( int64_t iInput)
externnoexcept

Calculate the length of a string that represents this integer.


Determine the number of characters are needed to convert the input value into a string. 64 bit integers have a minimum of one character to a maximum of 20 characters and an extra character for a '-' for negative numbers which could be "-9223372036854775808"

Example: 12345 will return 5, 1000 will return 4, 0 through 9 will return 1.

Parameters
iInput64 bit signed integer to test.
Returns
1 through 20 for the number of digits this number requires for string conversion.
See also
NumberStringLength(uint32_t) or NumberStringLength(int64_t)

◆ NumberStringLength() [3/5]

template<class T >
Burger::NumberStringLength ( T input)
inlinenoexcept

Calculate the length of a string that represents this integer.


A template to map an integral data type and calls the appropriate NumberStringLength function.

Note
This will intentionally fail on any non-integral data type.
Template Parameters
TInput data type, tested with is_integral.
Parameters
inputIntegral value to determine the string length if converted to ASCII.
See also
NumberStringLength(uint32_t) or NumberStringLength(int32_t)

◆ NumberStringLength() [4/5]

uint_t BURGER_API Burger::NumberStringLength ( uint32_t uInput)
externnoexcept

Calculate the length of a string that represents this integer.


Determine the number of characters are needed to convert the input value into a string. 32 bit integers have a minimum of one character to a maximum of 10 characters which could be "4294967295".

Example: 12345 will return 5, 1000 will return 4, 0 through 9 will return 1.

Parameters
uInput32 bit unsigned integer to test.
Returns
1 through 10 for the number of digits this number requires for string conversion.
See also
NumberStringLength(uint64_t) or NumberStringLength(int32_t)

◆ NumberStringLength() [5/5]

uint_t BURGER_API Burger::NumberStringLength ( uint64_t uInput)
externnoexcept

Calculate the length of a string that represents this integer.


Determine the number of characters are needed to convert the input value into a string. 64 bit integers have a minimum of one character to a maximum of 20 characters "18446744073709551615".

Example: 12345 will return 5, 1000 will return 4, 0 through 9 will return 1.

Parameters
uInput32 bit unsigned integer to test.
Returns
1 through 21 for the number of digits this number requires for string conversion.
See also
NumberStringLength(int64_t) or NumberStringLength(uint32_t)

◆ NumberToAscii() [1/8]

char *BURGER_API Burger::NumberToAscii ( char * pOutput,
double dInput,
uint_t uDigits = 0 )
externnoexcept

Convert a 64 bit float into ASCII.


Convert a 64 bit float into an ASCII string.

Examples:
dInput = 123.4567 -> "123.4567"
dInput = 123456.7 -> "123456.7"
dInput = -1.234567 -> "-1.234567"
dInput = -1234.567 -> "-1234.567"

Note
The string is capped at 30 digits. It will not output more than 30 digits. The negative sign does NOT count as part of the numeric string length.
Parameters
pOutputPointer to a buffer to hold the converted integer. It has to be a minimum of 32 bytes in size.
dInput64 bit float to convert to ASCII.
uDigitsNumber of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output.
Returns
Pointer to the char immediately after the last char output.
See also
Burger::NumberToAscii(char *,uint32_t,uint_t) or Burger::NumberToAsciiHex(char *,uint32_t,uint_t)

◆ NumberToAscii() [2/8]

char *BURGER_API Burger::NumberToAscii ( char * pOutput,
float fInput,
uint_t uDigits = 0 )
externnoexcept

Convert a 32 bit float into ASCII.


Convert a 32 bit float into an ASCII string.

Examples:
fInput = 123.4567 -> "123.4567"
fInput = 123456.7 -> "123456.7"
fInput = -1.234567 -> "-1.234567"
fInput = -1234.567 -> "-1234.567"

Note
The string is capped at 30 digits. It will not output more than 30 digits. The negative sign does NOT count as part of the numeric string length.
Parameters
pOutputPointer to a buffer to hold the converted integer. It has to be a minimum of 32 bytes in size.
fInput32 bit float to convert to ASCII.
uDigitsNumber of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output.
Returns
Pointer to the char immediately after the last char output.
See also
Burger::NumberToAscii(char *,uint32_t,uint_t) or Burger::NumberToAsciiHex(char *,uint32_t,uint_t)

◆ NumberToAscii() [3/8]

char *BURGER_API Burger::NumberToAscii ( char * pOutput,
int32_t iInput,
uint_t uDigits )
externnoexcept

Convert a signed 32 bit integer into ASCII.


Convert a signed 32 bit integer into an ASCII string. The third parameter modifies how the data is formatted.

Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so an existing string can be modified without accidentally truncating it.

Examples:
uInput = 1234567, uDigits = 4 -> "4567"
uInput = 1234567, uDigits = 0 -> "1234567"
uInput = -1234567, uDigits = 4 -> "-4567"
uInput = -1234567, uDigits = 0 -> "-1234567"
uInput = 1234567, uDigits = Burger::LEADINGZEROS -> "0001234567"
uInput = 22, uDigits = Burger::LEADINGZEROS+4 -> "0022"
uInput = -22, uDigits = Burger::LEADINGZEROS+4 -> "-0022"

Note
uDigits is capped at 10 digits. It will not output more than 10 digits. The negative sign does NOT count as part of the numeric string length.
Parameters
pOutputPointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 12 bytes in size Whichever is appropriate.
iInputSigned 32 bit integer to convert to ASCII.
uDigitsNumber of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output.
Returns
Pointer to the char immediately after the last char output. Most cases, this is a pointer to the terminating zero.
See also
Burger::NumberToAscii(char *,uint32_t,uint_t) or Burger::NumberToAsciiHex(char *,uint32_t,uint_t)

◆ NumberToAscii() [4/8]

char *BURGER_API Burger::NumberToAscii ( char * pOutput,
int64_t iInput,
uint_t uDigits )
externnoexcept

Convert a signed 64 bit integer into ASCII.


Convert a signed 64 bit integer into an ASCII string. You can modify how the data is formatted by passing a third parameter.

Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so you can modify the an existing string without accidentally truncating it.

Examples:
uInput = 1234567, uDigits = 4 -> "4567"
uInput = 1234567, uDigits = 0 -> "1234567"
uInput = -1234567, uDigits = 4 -> "-4567"
uInput = -1234567, uDigits = 0 -> "-1234567"
uInput = 1234567, uDigits = Burger::LEADINGZEROS -> "0001234567"
uInput = 22, uDigits = Burger::LEADINGZEROS+4 -> "0022"
uInput = -22, uDigits = Burger::LEADINGZEROS+4 -> "-0022"

Note
uDigits is capped at 20 digits. It will not output more than 20 digits. The negative sign does NOT count as part of the numeric string length.
Parameters
pOutputPointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 24 bytes in size Whichever is appropriate.
iInputSigned 64 bit integer to convert to ASCII.
uDigitsNumber of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output.
Returns
Pointer to the char immediately after the last char output. Most cases, this is a pointer to the terminating zero.
See also
Burger::NumberToAscii(char *,uint64_t,uint_t) or Burger::NumberToAsciiHex(char *,uint64_t,uint_t)

◆ NumberToAscii() [5/8]

template<class T >
char * Burger::NumberToAscii ( char * pOutput,
T input )
inlinenoexcept

◆ NumberToAscii() [6/8]

template<class T >
char * Burger::NumberToAscii ( char * pOutput,
T input,
uint_t uDigits )
inlinenoexcept

◆ NumberToAscii() [7/8]

char *BURGER_API Burger::NumberToAscii ( char * pOutput,
uint32_t uInput,
uint_t uDigits )
externnoexcept

Convert an unsigned 32 bit integer into ASCII.


Convert an unsigned 32 bit integer into an ASCII string. The third parameter modifies how the data is formatted.

Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so an existing string can be modified without accidentally truncating it.

Examples:
uInput = 1234567, uDigits = 4 -> "4567"
uInput = 1234567, uDigits = 0 -> "1234567"
uInput = 1234567, uDigits = Burger::LEADINGZEROS -> "0001234567"
uInput = 22, uDigits = Burger::LEADINGZEROS+4 -> "0022"

Note
uDigits is capped at 10 digits. It will not output more than 10 digits.
Parameters
pOutputPointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 12 bytes in size Whichever is appropriate.
uInputUnsigned 32 bit integer to convert to ASCII.
uDigitsNumber of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output.
Returns
Pointer to the char immediately after the last char output. Most cases, this is a pointer to the terminating zero.
See also
Burger::NumberToAsciiHex(char *,uint32_t,uint_t) or Burger::NumberToAscii(char *,int32_t,uint_t)

◆ NumberToAscii() [8/8]

char *BURGER_API Burger::NumberToAscii ( char * pOutput,
uint64_t uInput,
uint_t uDigits )
externnoexcept

Convert an unsigned 64 bit integer into ASCII.


Convert an unsigned 64 bit integer into an ASCII string. You can modify how the data is formatted by passing a third parameter.

Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so you can modify the an existing string without accidentally truncating it.

Examples:
uInput = 1234567, uDigits = 4 -> "4567"
uInput = 1234567, uDigits = 0 -> "1234567"
uInput = 1234567, uDigits = Burger::LEADINGZEROS -> "0001234567"
uInput = 22, uDigits = Burger::LEADINGZEROS+4 -> "0022"

Note
uDigits is capped at 20 digits. It will not output more than 20 digits.
Parameters
pOutputPointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 24 bytes in size Whichever is appropriate.
uInputUnsigned 64 bit integer to convert to ASCII.
uDigitsNumber of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output.
Returns
Pointer to the char immediately after the last char output. Most cases, this is a pointer to the terminating zero.
See also
Burger::NumberToAsciiHex(char *,uint64_t,uint_t) or Burger::NumberToAscii(char *,int64_t,uint_t)

◆ NumberToAsciiHex() [1/14]

char *BURGER_API Burger::NumberToAsciiHex ( char * pOutput,
double dInput )
externnoexcept

Convert a 64 bit floating point value into a hex string.


Store sixteen hex digits in the form of 0000000000000000 to a string buffer and append a terminating zero. Returns the pointer to the terminating zero so the calling function can continue writing to the output buffer as if it's a stream.

Parameters
pOutputPointer to a buffer at least 17 bytes in size.
dInput64 bit value to print in HEX to a string.
Returns
Pointer to terminating zero at the end of the string
See also
NumberToAsciiHex(char *,uint8_t), NumberToAsciiHex(char *,uint16_t), NumberToAsciiHex(char *,uint32_t), NumberToAsciiHex(char *,uint64_t), NumberToAsciiHex(char *,float), NumberToAsciiHex(char *,uint32_t,uint_t), or NumberToAsciiHex(char *,uint64_t,uint_t)

◆ NumberToAsciiHex() [2/14]

char *BURGER_API Burger::NumberToAsciiHex ( char * pOutput,
double dInput,
uint_t uDigits )
externnoexcept

Convert a 64 bit float into hexadecimal ASCII.


Convert a 64 bit float into a hexadecimal ASCII string. The third parameter modifies how the data is formatted.

Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so an existing string can be modified without accidentally truncating it.

Note
uDigits is capped at 16 digits. It will not output more than 16 digits.
Parameters
pOutputPointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 17 bytes in size, whichever is appropriate.
dInput64 bit float to convert to hexadecimal ASCII.
uDigitsNumber of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output.
Returns
Pointer to the char immediately after the last char output. Most cases, this is a pointer to the terminating zero.
See also
NumberToAsciiHex(char *pOutput,uint64_t uInput,uint_t uDigits)

◆ NumberToAsciiHex() [3/14]

char *BURGER_API Burger::NumberToAsciiHex ( char * pOutput,
float fInput )
externnoexcept

Convert a 32 bit floating point value into a hex string.


Store eight hex digits in the form of 00000000 to a string buffer and append a terminating zero. Returns the pointer to the terminating zero so the calling function can continue writing to the output buffer as if it's a stream.

Parameters
pOutputPointer to a buffer at least 9 bytes in size.
fInput32 bit value to print in HEX to a string.
Returns
Pointer to terminating zero at the end of the string
See also
NumberToAsciiHex(char *,uint8_t), NumberToAsciiHex(char *,uint16_t), NumberToAsciiHex(char *,uint32_t), NumberToAsciiHex(char *,uint64_t), NumberToAsciiHex(char *,double), NumberToAsciiHex(char *,uint32_t,uint_t), or NumberToAsciiHex(char *,uint64_t,uint_t)

◆ NumberToAsciiHex() [4/14]

char *BURGER_API Burger::NumberToAsciiHex ( char * pOutput,
float fInput,
uint_t uDigits )
externnoexcept

Convert a 32 bit float into hexadecimal ASCII.


Convert a 32 bit float into a hexadecimal ASCII string. The third parameter modifies how the data is formatted.

Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so an existing string can be modified without accidentally truncating it.

Note
uDigits is capped at 8 digits. It will not output more than 8 digits.
Parameters
pOutputPointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 9 bytes in size, whichever is appropriate.
fInput32 bit float to convert to hexadecimal ASCII.
uDigitsNumber of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output.
Returns
Pointer to the char immediately after the last char output. Most cases, this is a pointer to the terminating zero.
See also
NumberToAsciiHex(char *pOutput,uint32_t uInput,uint_t uDigits)

◆ NumberToAsciiHex() [5/14]

template<class T >
Burger::NumberToAsciiHex ( char * pOutput,
T input )
inlinenoexcept

Convert a integral value into a hex string.


A template to map an integral data type and calls the appropriate NumberToAsciiHex function.

Note
This will intentionally fail on any non-integral data type.
Template Parameters
TInput data type, tested with is_integral.
Parameters
pOutputPointer to a buffer at least 17 bytes in size.
inputIntegral value to print in HEX to a string.

◆ NumberToAsciiHex() [6/14]

template<class T >
Burger::NumberToAsciiHex ( char * pOutput,
T input,
uint_t uDigits )
inlinenoexcept

Convert a integral value into a hex string.


A template to map an integral data type and calls the appropriate NumberToAsciiHex(char *, T, uint_t uDigits) function.

Note
This will intentionally fail on any non-integral data type.
Template Parameters
TInput data type, tested with is_integral.
Parameters
pOutputPointer to a buffer at least 17 bytes in size.
inputIntegral value to print in HEX to a string.
uDigitsNumber of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output.

◆ NumberToAsciiHex() [7/14]

char *BURGER_API Burger::NumberToAsciiHex ( char * pOutput,
uint16_t uInput )
externnoexcept

Convert a 16 bit value into a hex string.


Store four hex digits in the form of 0000 to a string buffer and append a terminating zero. Returns the pointer to the terminating zero so the calling function can continue writing to the output buffer as if it's a stream.

Parameters
pOutputPointer to a buffer at least 5 bytes in size.
uInput16 bit value to print in HEX to a string.
Returns
Pointer to terminating zero at the end of the string
See also
NumberToAsciiHex(char *,uint8_t), NumberToAsciiHex(char *,uint32_t), NumberToAsciiHex(char *,uint64_t), NumberToAsciiHex(char *,float), NumberToAsciiHex(char *,double), NumberToAsciiHex(char *,uint32_t,uint_t), or NumberToAsciiHex(char *,uint64_t,uint_t)

◆ NumberToAsciiHex() [8/14]

char * Burger::NumberToAsciiHex ( char * pOutput,
uint16_t uInput,
uint_t uDigits )
inlinenoexcept

◆ NumberToAsciiHex() [9/14]

char *BURGER_API Burger::NumberToAsciiHex ( char * pOutput,
uint32_t uInput )
externnoexcept

Convert a 32 bit value into a hex string.


Store eight hex digits in the form of 00000000 to a string buffer and append a terminating zero. Returns the pointer to the terminating zero so the calling function can continue writing to the output buffer as if it's a stream.

Parameters
pOutputPointer to a buffer at least 9 bytes in size.
uInput32 bit value to print in HEX to a string.
Returns
Pointer to terminating zero at the end of the string
See also
NumberToAsciiHex(char *,uint8_t), NumberToAsciiHex(char *,uint16_t), NumberToAsciiHex(char *,uint64_t), NumberToAsciiHex(char *,float), NumberToAsciiHex(char *,double), NumberToAsciiHex(char *,uint32_t,uint_t), or NumberToAsciiHex(char *,uint64_t,uint_t)

◆ NumberToAsciiHex() [10/14]

char *BURGER_API Burger::NumberToAsciiHex ( char * pOutput,
uint32_t uInput,
uint_t uDigits )
externnoexcept

Convert an unsigned 32 bit integer into hexadecimal ASCII.


Convert an unsigned 32 bit integer into a hexadecimal ASCII string. The third parameter modifies how the data is formatted.

Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so an existing string can be modified without accidentally truncating it.

Examples:
uInput = 0x1234BCD, uDigits = 4 -> "4BCD"
uInput = 0x1234BCD, uDigits = 0 -> "1234BCD"
uInput = 0x1234BCD, uDigits = Burger::LEADINGZEROS -> "01234BCD"
uInput = 0x2A, uDigits = Burger::LEADINGZEROS+4 -> "002A"

Note
uDigits is capped at 8 digits. It will not output more than 8 digits.
Parameters
pOutputPointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 9 bytes in size, whichever is appropriate.
uInputUnsigned 32 bit integer to convert to hexadecimal ASCII.
uDigitsNumber of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output.
Returns
Pointer to the char immediately after the last char output. Most cases, this is a pointer to the terminating zero.
See also
NumberToAsciiHex(char *pOutput,uint64_t uInput,uint_t uDigits), NumberToAscii(char *,uint32_t,uint_t) or NumberToAscii(char *,int32_t,uint_t)

◆ NumberToAsciiHex() [11/14]

char *BURGER_API Burger::NumberToAsciiHex ( char * pOutput,
uint64_t uInput )
externnoexcept

Convert a 64 bit value into a hex string.


Store sixteen hex digits in the form of 0000000000000000 to a string buffer and append a terminating zero. Returns the pointer to the terminating zero so the calling function can continue writing to the output buffer as if it's a stream.

Parameters
pOutputPointer to a buffer at least 17 bytes in size.
uInput64 bit value to print in HEX to a string.
Returns
Pointer to terminating zero at the end of the string
See also
NumberToAsciiHex(char *,uint8_t), NumberToAsciiHex(char *,uint16_t), NumberToAsciiHex(char *,uint32_t), NumberToAsciiHex(char *,float), NumberToAsciiHex(char *,double), NumberToAsciiHex(char *,uint32_t,uint_t), or NumberToAsciiHex(char *,uint64_t,uint_t)

◆ NumberToAsciiHex() [12/14]

char *BURGER_API Burger::NumberToAsciiHex ( char * pOutput,
uint64_t uInput,
uint_t uDigits )
externnoexcept

Convert an unsigned 64 bit integer into hexadecimal ASCII.


Convert an unsigned 64 bit integer into a hexadecimal ASCII string. The third parameter modifies how the data is formatted.

Burger::LEADINGZEROS will force leading zeros to be printed. Burger::NOENDINGNULL will disable the writing of a terminating zero character at the end of the string so an existing string can be modified without accidentally truncating it.

Examples:
uInput = 0x1234BCD, uDigits = 4 -> "4BCD"
uInput = 0x1234BCD, uDigits = 0 -> "1234BCD"
uInput = 0x1234BCD, uDigits = Burger::LEADINGZEROS -> "01234BCD"
uInput = 0x2A, uDigits = Burger::LEADINGZEROS+4 -> "002A"

Note
uDigits is capped at 16 digits. It will not output more than 16 digits.
Parameters
pOutputPointer to a buffer to hold the converted integer. It has to be with uDigits+1 or 17 bytes in size, whichever is appropriate.
uInputUnsigned 64 bit integer to convert to hexadecimal ASCII.
uDigitsNumber of digits to convert. Flags Burger::LEADINGZEROS and Burger::NOENDINGNULL can be added or or'd to this value to affect output.
Returns
Pointer to the char immediately after the last char output. Most cases, this is a pointer to the terminating zero.
See also
NumberToAsciiHex(char *pOutput, uint32_t uInput, uint_t uDigits), NumberToAscii(char *, uint32_t, uint_t) or NumberToAscii(char *, int32_t, uint_t)

◆ NumberToAsciiHex() [13/14]

char *BURGER_API Burger::NumberToAsciiHex ( char * pOutput,
uint8_t uInput )
externnoexcept

Convert an 8 bit value into a hex string.


Store two hex digits in the form of 00 to a string buffer and append a terminating zero. Returns the pointer to the terminating zero so the calling function can continue writing to the output buffer as if it's a stream.

Parameters
pOutputPointer to a buffer at least 3 bytes in size.
uInput8 bit value to print in HEX to a string.
Returns
Pointer to terminating zero at the end of the string
See also
NumberToAsciiHex(char *,uint16_t), NumberToAsciiHex(char *,uint32_t), NumberToAsciiHex(char *,uint64_t), NumberToAsciiHex(char *,float), NumberToAsciiHex(char *,double), NumberToAsciiHex(char *,uint32_t,uint_t), or NumberToAsciiHex(char *,uint64_t,uint_t)

◆ NumberToAsciiHex() [14/14]

char * Burger::NumberToAsciiHex ( char * pOutput,
uint8_t uInput,
uint_t uDigits )
inlinenoexcept

◆ OkAlertMessage()

void BURGER_API Burger::OkAlertMessage ( const char * pMessage,
const char * pTitle = nullptr )
externnoexcept

Display a dialog box.


On platforms that support pop up dialogs, display a dialog that has an "Okay" button

On platforms that do not support pop up dialogs, the messages are logged

Parameters
pMessageMessage to print in the center of the dialog box
pTitlePointer to "C" string or nullptr for a message in the title bar
See also
OkCancelAlertMessage() or Debug::PrintString(const char *)

◆ OkCancelAlertMessage()

uint_t BURGER_API Burger::OkCancelAlertMessage ( const char * pMessage,
const char * pTitle = nullptr )
externnoexcept

Display a dialog to alert the user of a possible error condition or message.


On platforms that support pop up dialogs, display a dialog that has two buttons, one for "Okay" and another for "Cancel"

On platforms that do not support pop up dialogs, the messages are logged and FALSE (Cancel) is always returned

Parameters
pMessagePointer to "C" string with the message that asks a question that can be answered with Okay or Cancel
pTitlePointer to "C" string or NULL for a message in the title bar
Returns
TRUE if the user pressed "Okay" or FALSE if pressed "Cancel"
See also
OkAlertMessage() or Debug::PrintString(const char *)

◆ OpenAware() [1/2]

int BURGER_API Burger::OpenAware ( const FSSpec * pFSSpec,
short sDenyModes,
short * pRefNum )
externnoexcept

Open a file with OpenDeny modes.


If the file system supports it, open a data fork using PBHOpenDenySync(), otherwise emulate the behavior using older APIs.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pFSSpecFSSpec for the file to open
sDenyModesOpenDeny modes requested
pRefNumPointer to receive the open file reference
Returns
Zero if no error, or mac error code
See also
OpenAware(short, long, const uint8_t*, short, const uint8_t*)

◆ OpenAware() [2/2]

int BURGER_API Burger::OpenAware ( short svRefNum,
long lDirID,
const uint8_t * pFilename,
short sDenyModes,
short * pRefNum )
externnoexcept

Open a file with OpenDeny modes.


If the file system supports it, open a data fork using PBHOpenDenySync(), otherwise emulate the behavior using older APIs.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
svRefNumVolume the file resides on
lDirIDDirectory ID the file resides on
pFilenamePointer to a PASCAL string of the filename
sDenyModesOpenDeny modes requested
pRefNumPointer to receive the open file reference
Returns
Zero if no error, or mac error code
See also
OpenAware(const FSSpec, short, const uint8_t*)

◆ OpenRFAware() [1/2]

int BURGER_API Burger::OpenRFAware ( const FSSpec * pFSSpec,
short sDenyModes,
short * pRefNum )
externnoexcept

Open a resource fork with OpenDeny modes.


If the file system supports it, open a resource fork using PBHOpenRFDenySync(), otherwise emulate the behavior using older APIs.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
pFSSpecFSSpec for the file to open
sDenyModesOpenDeny modes requested
pRefNumPointer to receive the open file reference
Returns
Zero if no error, or mac error code
See also
OpenRFAware(short, long, const uint8_t*, short, const uint8_t*)

◆ OpenRFAware() [2/2]

int BURGER_API Burger::OpenRFAware ( short svRefNum,
long lDirID,
const uint8_t * pFilename,
short sDenyModes,
short * pRefNum )
externnoexcept

Open a resource fork with OpenDeny modes.


If the file system supports it, open a resource fork using PBHOpenRFDenySync(), otherwise emulate the behavior using older APIs.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
svRefNumVolume the file resides on
lDirIDDirectory ID the file resides on
pFilenamePointer to a PASCAL string of the filename
sDenyModesOpenDeny modes requested
pRefNumPointer to receive the open file reference
Returns
Zero if no error, or mac error code
See also
OpenRFAware(const FSSpec, short, const uint8_t*)

◆ operator!=()

template<class T , class U >
bool Burger::operator!= ( const allocator< T > & ,
const allocator< U > &  )
inlinenoexcept

Allocators are always equal.

◆ operator==()

template<class T , class U >
bool Burger::operator== ( const allocator< T > & ,
const allocator< U > &  )
inlinenoexcept

Allocators are always equal.

◆ PackFloatTo16() [1/2]

int16_t BURGER_API Burger::PackFloatTo16 ( float fInput)
extern

Convert a float in the range of 0.999999 to -0.999999 into a 16 bit packed integer.


Apply compression to a floating point number in the range of 0.999999 to -0.999999 and create a 16 bit version. The input will be clamped.

Use Burger::Unpack16ToFloat(int16_t) to reconstruct the number.

Result == 0 if the input was zero or too small to be represented. Result & 0x8000 if the input was negative. (Result>>11)&0xF The exponent where 0 = 111 and 15 = 126. (Result&0x7FF) The 11 bit mantissa.

Parameters
fInputFloating point number in the range of 0.999999 to -0.999999
Returns
16 bit floating point version of the 32 bit number.
See also
Burger::Unpack16ToFloat(int16_t), Burger::Unpack16ToFloat(int16_t,uint32_t) or Burger::PackFloatTo16(float,uint32_t).

◆ PackFloatTo16() [2/2]

int16_t BURGER_API Burger::PackFloatTo16 ( float fInput,
uint32_t uBaseExponent )
extern

Convert a float in the range of a supplied exponent into a 16 bit packed integer.


Apply compression to a floating point number in the range of 0.999999 to -0.999999 and create a 16 bit version. The input will be clamped.

Use Burger::Unpack16ToFloat(int16_t,uint32_t) to reconstruct the number.

Result == 0 if the input was zero or too small to be represented. Result & 0x8000 if the input was negative. (Result>>11)&0xF The exponent where 0 = BaseExponent and 15 = BaseExponent+15. (Result&0x7FF) The 11 bit mantissa.

Parameters
fInputFloating point number in the range of the supplied exponent.
uBaseExponentMinimum acceptable exponent, (111 is used for a max value of 0.999999).
Returns
16 bit floating point version of the 32 bit number.
See also
Burger::Unpack16ToFloat(int16_t), Burger::Unpack16ToFloat(int16_t,uint32_t) or Burger::PackFloatTo16(float).

◆ ParseBeyondEOL() [1/2]

char *BURGER_API Burger::ParseBeyondEOL ( const char * pInput)
externnoexcept

Parse a "C" string until a zero or EOL.


Follow a stream of text input until either a zero is found or an End Of Line is found.

If a zero is found, return a pointer to the ZERO.

If an EOL is found, return a pointer to the text BEYOND the EOL which is a "\n" (10) or a "\r" (13). In the case of a CR/LF combination, found in PC style text files, return the pointer beyond the pair.

Parameters
pInputPointer to a "C" string to parse. nullptr will page fault.
Returns
Pointer to the zero, or EOL character.

◆ ParseBeyondEOL() [2/2]

char *BURGER_API Burger::ParseBeyondEOL ( const char * pInput,
uintptr_t uLength )
externnoexcept

Parse a "C" string until a zero or EOL or out of data.


Follow a stream of text input until either a zero is found, an End Of Line is found or data ran out.

If a zero is found, return a pointer to the ZERO.

If an EOL is found, return a pointer to the text BEYOND the EOL which is a "\n" (10) or a "\r" (13). In the case of a CR/LF combination, found in PC style text files, return the pointer beyond the pair.

Parameters
pInputPointer to a string to parse. nullptr will page fault.
uLengthLength of the string buffer.
Returns
Pointer to the zero, or EOL character.

◆ ParseBeyondWhiteSpace()

char *BURGER_API Burger::ParseBeyondWhiteSpace ( const char * pInput)
externnoexcept

Parse a "C" string until a non-white space character is found.


Skip over any space (32) or tab (9) character and return the pointer to the first character that doesn't match.

Parameters
pInputPointer to a "C" string to parse. nullptr will page fault.
Returns
Pointer to the first non-white space character.
See also
Burger::ParseToDelimiter(const char *pInput)

◆ ParseQuotedString()

char *BURGER_API Burger::ParseQuotedString ( char * pOutput,
uintptr_t uOutputSize,
const char * pInput )
externnoexcept

Parse out a quoted string.


If the first character of the string is a quote "\"" (0x22) or "'", then parse out a quote delimited string. This function will parse double quotes ("" or '') as a single quote to be inserted into the string. Whichever was the first quote character found, that will be the quote character to be used for the double quote and end quote parser making the alternate quote treated as a normal character.

If the first character is 0 or whitespace, return pInput to signal an error condition.

If the first character isn't a quote, 0 or whitespace, parse the string until another whitespace character is found.

All tabs (\t) in a quoted string are converted into spaces.

All strings terminate if a 0 or EOL (\r, \r\n, \n) sequence is found. If this type of terminator is found, the returned pointer will point to the terminating character (Except in the case of \r\n, where it will point at the \n character).

If the output buffer isn't large enough to hold the resulting string, truncate the output to fit. The output will always be zero terminated in all cases.

char output[256];
const char *pInput = "Hello";
char *pError = ParseQuotedString(output,sizeof(output),pInput);
// Determining if output is really an empty string or a parse error
if (pError==pInput) {
printf("Nothing parsed, not an empty string");
}
char * ParseQuotedString(char *pOutput, uintptr_t uOutputSize, const char *pInput) noexcept
Parse out a quoted string.
Definition brstringfunctions.cpp:1194
Parameters
pOutputPointer to the output string. nullptr is acceptable if uOutputSize is zero.
uOutputSizeSize of the output string buffer in bytes.
pInputPointer to a "C" string that has a '"' as the first character. nullptr will page fault.
Returns
Pointer to the character that ended parsing. +1 beyond '"', or at CR, at LF or at zero.

◆ ParseToDelimiter()

char *BURGER_API Burger::ParseToDelimiter ( const char * pInput)
externnoexcept

Return a pointer to whitespace, CR, LF or zero.


Parse a string until a whitespace, CR, LF or zero is found. Return the pointer at the point where the requested character is. Useful in parsing a token and finding the end of it.

Parameters
pInputPointer to a "C" string to parse. nullptr will page fault.
Returns
Pointer to a TAB, Space, CR, LF or zero.
See also
Burger::ParseBeyondWhiteSpace(const char *)

◆ platform_convert_to_error()

Burger::eError BURGER_API Burger::platform_convert_to_error ( int iNativeError)
externnoexcept

Convert platform error code to a Burgerlib error code.


Take a native platform error code and convert it to a Burgerlib equivalent error code.

Parameters
iNativeErrorMacOS OSErr or OSStatus, Windows HRESULT error code
Returns
Burgerlib error code, or kErrorGeneric if unknown

◆ power_of_two() [1/5]

double BURGER_API Burger::power_of_two ( double dInput)
externnoexcept

Round up a 64 bit float to the nearest power of 2.


Take an arbitrary value and round it up to the nearest power of 2.

If the input is 5 to 7, the function returns 8. NaN, infinity, or numbers that are already powers of two are returned unchanged. Zero will return NaN.

Parameters
dInputFloat value to round up
Returns
Rounded up value
See also
power_of_two(uint32_t), power_of_two(uint64_t), or power_of_two(float)

◆ power_of_two() [2/5]

float BURGER_API Burger::power_of_two ( float fInput)
externnoexcept

Round up a 32 bit float to the nearest power of 2.


Take an arbitrary value and round it up to the nearest power of 2.

If the input is 5 to 7, the function returns 8. NaN, infinity, or numbers that are already powers of two are returned unchanged. Zero will return NaN.

Parameters
fInputFloat value to round up
Returns
Rounded up value
See also
power_of_two(uint32_t), power_of_two(uint64_t), or power_of_two(double)

◆ power_of_two() [3/5]

template<class T >
Burger::power_of_two ( T input)
inlinenoexcept

Round up an integer to the nearest power of 2.


A template to take an arbitrary value and round it up to the nearest power of 2. Zero will return zero.

Note
This will intentionally fail on any non-integral or signed data type.
Template Parameters
TInput data type, tested with is_unsigned.
Parameters
inputInteger value to round up
Returns
Rounded up value
See also
power_of_two(uint32_t), power_of_two(uint64_t), power_of_two(float)

◆ power_of_two() [4/5]

uint32_t BURGER_API Burger::power_of_two ( uint32_t uInput)
externnoexcept

Round up an integer to the nearest power of 2.


Take an arbitrary value and round it up to the nearest power of 2 If the input is 0x40000001 to 0x7FFFFFFF, the function returns 0x80000000 0x80000000-0xFFFFFFFF is an overflow and returns zero. Zero will return zero

Parameters
uInputInteger value to round up
Returns
Rounded up value
See also
power_of_two(uint64_t), power_of_two(float), power_of_two(double)

◆ power_of_two() [5/5]

uint64_t BURGER_API Burger::power_of_two ( uint64_t uInput)
externnoexcept

Round up an integer to the nearest power of 2.


Take an arbitrary value and round it up to the nearest power of 2 If the input is 0x4000000000000001 to 0x7FFFFFFFFFFFFFFF, the function returns 0x8000000000000000 0x8000000000000000-0xFFFFFFFFFFFFFFFF is an overflow and returns zero. Zero will return zero

Parameters
uInputInteger value to round up
Returns
Rounded up value
See also
power_of_two(uint32_t), power_of_two(float), or power_of_two(double)

◆ PreflightFileCopySpace()

int BURGER_API Burger::PreflightFileCopySpace ( short svRefNumSource,
long lDirIDSource,
const uint8_t * pFilenameSource,
const uint8_t * pVolumenameDest,
short svRefNumDest,
uint_t * pbSpaceAvailable )
externnoexcept

Determine if a destination volume has free file space.


Given a file, check how much space it currently is occupying on the drive. Then, check the destination volume if there is enough free space to receive a copy of the source file.

Note
This is only available on Mac OS 7.5-9.9.2 or Carbon
Parameters
svRefNumSourceVolume reference number of the source file
lDirIDSourceParent ID of the source file
pFilenameSourcePointer to a Pascal string for the source file
pVolumenameDestPointer to a Pascal string of the dest volume
svRefNumDestVolume reference number of the destination volume
pbSpaceAvailablePointer to a variable to receive the answer
Returns
Zero if no error, or mac error code

◆ Printf()

intptr_t BURGER_API Burger::Printf ( const char * pFormat,
uintptr_t uArgCount,
const ArgumentType ** ppArgs )
externnoexcept

printf() clone


Return value is the number of characters transmitted, or a negative value indicating an error occurred during the attempt.

  • Step 1) Parse the format string and arguments
  • Step 2) if no issues found in Step 1, execute the list of format & copy output commands.
Parameters
pFormatPointer to a "C" format string
uArgCountNumber of arguments in the argument array
ppArgsArgument array, can be NULL if uArgCount is zero
Returns
Negative number for error, number of bytes processed on success

◆ PrintHex() [1/15]

Burger::PrintHex ( char iInput)
inlinenoexcept

Print a char in hex to standard out.


Parameters
iInputchar to print in HEX to stdout
See also
PrintHex(uint8_t), or PrintHex(signed char)

◆ PrintHex() [2/15]

void BURGER_API Burger::PrintHex ( double dInput)
externnoexcept

Print a 64 bit floating point number in hex to standard out.


Print sixteen hex digits in the form of 0000000000000000 to stdout

Parameters
dInput64 bit floating point number to print in HEX to stdout
See also
PrintHex(uint64_t), or PrintHex(float)

◆ PrintHex() [3/15]

void BURGER_API Burger::PrintHex ( float fInput)
externnoexcept

Print a 32 bit floating pointer number in hex to standard out.


Print eight hex digits in the form of 00000000 to stdout

Parameters
fInputFloating point number to print in HEX to stdout
See also
PrintHex(uint32_t), or PrintHex(double)

◆ PrintHex() [4/15]

Burger::PrintHex ( int iInput)
inlinenoexcept

Print an integer in hex to standard out.


Parameters
iInputinteger to print in HEX to stdout
See also
PrintHex(uint32_t), PrintHex(uint16_t), or PrintHex(unsigned int)

◆ PrintHex() [5/15]

Burger::PrintHex ( long iInput)
inlinenoexcept

Print a long integer in hex to standard out.


Parameters
iInputlong integer to print in HEX to stdout
See also
PrintHex(uint64_t), PrintHex(uint32_t), or PrintHex(unsigned long)

◆ PrintHex() [6/15]

Burger::PrintHex ( long long iInput)
inlinenoexcept

Print a long long integer in hex to standard out.


Parameters
iInputlong integer to print in HEX to stdout
See also
PrintHex(uint64_t)

◆ PrintHex() [7/15]

Burger::PrintHex ( short iInput)
inlinenoexcept

Print a short in hex to standard out.


Parameters
iInputshort to print in HEX to stdout
See also
PrintHex(uint16_t), or PrintHex(wchar_t)

◆ PrintHex() [8/15]

Burger::PrintHex ( signed char iInput)
inlinenoexcept

Print a signed char in hex to standard out.


Parameters
iInputsigned char to print in HEX to stdout
See also
PrintHex(uint8_t), or PrintHex(char)

◆ PrintHex() [9/15]

void BURGER_API Burger::PrintHex ( uint16_t uInput)
externnoexcept

Print a 16 bit value in hex to standard out.


Print four hex digits in the form of 0000 to stdout

Parameters
uInput16 bit value to print in HEX to stdout
See also
PrintHexDigit(uint_t), PrintHex(short), or PrintHex(wchar_t)

◆ PrintHex() [10/15]

void BURGER_API Burger::PrintHex ( uint32_t uInput)
externnoexcept

Print a 32 bit value in hex to standard out.


Print eight hex digits in the form of 00000000 to stdout

Parameters
uInput32 bit value to print in HEX to stdout
See also
PrintHexDigit(uint_t), PrintHex(int), PrintHex(unsigned int), PrintHex(long), or PrintHex(unsigned long)

◆ PrintHex() [11/15]

void BURGER_API Burger::PrintHex ( uint64_t uInput)
externnoexcept

Print a 64 bit value in hex to standard out.


Print sixteen hex digits in the form of 0000000000000000 to stdout

Parameters
uInput64 bit value to print in HEX to stdout
See also
PrintHexDigit(uint_t), PrintHex(long), PrintHex(unsigned long), PrintHex(long long), or PrintHex(unsigned long long)

◆ PrintHex() [12/15]

void BURGER_API Burger::PrintHex ( uint8_t uInput)
externnoexcept

Print an 8 bit value in hex to standard out.


Print two hex digits in the form of 00 to stdout

Parameters
uInput8 bit value to print in HEX to stdout
See also
PrintHexDigit(uint_t), PrintHex(char), or PrintHex(signed char)

◆ PrintHex() [13/15]

Burger::PrintHex ( unsigned int uInput)
inlinenoexcept

Print an unsigned integer in hex to standard out.


Parameters
uInputunsigned integer to print in HEX to stdout
See also
PrintHex(uint32_t), PrintHex(uint16_t), or PrintHex(int)

◆ PrintHex() [14/15]

Burger::PrintHex ( unsigned long uInput)
inlinenoexcept

Print an unsigned long integer in hex to standard out.


Parameters
uInputunsigned long integer to print in HEX to stdout
See also
PrintHex(uint64_t), PrintHex(uint32_t), or PrintHex(long)

◆ PrintHex() [15/15]

Burger::PrintHex ( wchar_t uInput)
inlinenoexcept

Print a wchar_t in hex to standard out.


Parameters
uInputwchar_t to print in HEX to stdout
See also
PrintHex(uint16_t), or PrintHex(short)

◆ PrintHexDigit()

void BURGER_API Burger::PrintHexDigit ( uint_t uInput)
externnoexcept

Print a hex character to standard out.


Print a single hex digit from the lowest 4 bits of the input value to stdout

Parameters
uInputInteger value (Only lowest 4 bits used) to print in HEX to stdout
See also
PrintHex(uint8_t), PrintHex(uint16_t), PrintHex(uint32_t), or PrintHex(uint64_t)

◆ PStringToCString()

void BURGER_API Burger::PStringToCString ( char * pOutput,
const uint8_t * pInput )
externnoexcept

Convert a Pascal string into a "C" string.


Copy a Pascal string and convert it into a "C" style string. A byte will denote the length, followed by the text itself. There will be text followed by a terminating zero in the new string.

The destination and the source pointer can contain the same value. This function allows in buffer data conversion.

Note
While the input and output strings can be the same value for in place conversions, they cannot be pointing to overlapping sections of the same buffer. Either the buffers must be independent of each other, or they are pointing to the exact same buffer. Overlap will cause undefined behavior.
Parameters
pOutputPointer to a buffer (max 256 bytes) to receive the new string. nullptr will page fault.
pInputPointer to the Pascal string to copy. nullptr will page fault.
See also
Burger::CStringToPString(uint8_t *,const char *);

◆ read_big_uint16()

uint16_t BURGER_API Burger::read_big_uint16 ( FILE * fp)
extern

Read a big endian 16-bit integer from a file.


Given an ANSI FILE *, read a 16-bit integer in big endian format from the file stream.

Parameters
fpFILE * to the stream to read from.
Returns
Zero on error or integer from the data stream
See also
read_little_uint16(FILE *), read_big_uint32(FILE *) or ReadBigWord64(FILE *)

◆ read_big_uint32()

uint32_t BURGER_API Burger::read_big_uint32 ( FILE * fp)
extern

Read a big endian 32-bit integer from a file.


Given an ANSI FILE *, read a 32-bit integer in big endian format from the file stream.

Parameters
fpFILE * to the stream to read from.
Returns
Zero on error or integer from the data stream
See also
read_little_uint32(FILE *), read_big_uint16(FILE *) or ReadBigWord64(FILE *)

◆ read_c_string()

uint_t BURGER_API Burger::read_c_string ( FILE * fp,
char * pInput,
uintptr_t uLength )
extern

Read a "C" string with the terminating zero to a file stream.


Given an ANSI FILE *, read a "C" string with a terminating zero into the file stream. If the string read is larger than the buffer, it is truncated. The buffer will have an ending zero on valid read or a truncated read. If uLength was zero, then pInput can be NULL

Parameters
fpFILE * to the stream to write to.
pInputPointer to a "C" string to write.
uLengthSize of the buffer (To prevent overruns)
Returns
TRUE if the string was read, FALSE, hit EOF
See also
WriteCString(FILE *,const char *)

◆ read_little_uint16()

uint16_t BURGER_API Burger::read_little_uint16 ( FILE * fp)
extern

Read a little endian 16-bit integer from a file.


Given an ANSI FILE *, read a 16-bit integer in little endian format from the file stream.

Parameters
fpFILE * to the stream to read from.
Returns
Zero on error or integer from the data stream
See also
read_big_uint16(FILE *), read_little_uint32(FILE *) or ReadLittleWord64(FILE *)

◆ read_little_uint32()

uint32_t BURGER_API Burger::read_little_uint32 ( FILE * fp)
extern

Read a little endian 32-bit integer from a file.


Given an ANSI FILE *, read a 32-bit integer in little endian format from the file stream.

Parameters
fpFILE * to the stream to read from.
Returns
Zero on error or integer from the data stream
See also
read_big_uint32(FILE *), read_little_uint16(FILE *) or ReadLittleWord64(FILE )

◆ ReadBigDouble()

double BURGER_API Burger::ReadBigDouble ( FILE * fp)
extern

Read a big endian 64-bit float from a file.


Given an ANSI FILE *, read a 64-bit float in big endian format from the file stream.

Parameters
fpFILE * to the stream to read from.
Returns
NaN on error or double from the data stream
See also
ReadLittleDouble(FILE *), ReadBigFloat(FILE *)

◆ ReadBigFloat()

float BURGER_API Burger::ReadBigFloat ( FILE * fp)
extern

Read a big endian 32-bit float from a file.


Given an ANSI FILE *, read a 32-bit float in big endian format from the file stream.

Parameters
fpFILE * to the stream to read from.
Returns
NaN on error or float from the data stream
See also
ReadLittleFloat(FILE *) or ReadBigDouble(FILE *)

◆ ReadBigWord64()

uint64_t BURGER_API Burger::ReadBigWord64 ( FILE * fp)
extern

Read a big endian 64-bit integer from a file.


Given an ANSI FILE *, read a 64-bit integer in big endian format from the file stream.

Parameters
fpFILE * to the stream to read from.
Returns
Zero on error or integer from the data stream
See also
ReadLittleWord64(FILE *), read_big_uint16(FILE *) or ReadBigWord64(FILE *)

◆ ReadLittleDouble()

double BURGER_API Burger::ReadLittleDouble ( FILE * fp)
extern

Read a little endian 64-bit float from a file.


Given an ANSI FILE *, read a 64-bit float in little endian format from the file stream.

Parameters
fpFILE * to the stream to read from.
Returns
NaN on error or double from the data stream
See also
ReadBigDouble(FILE *) or ReadLittleFloat(FILE *)

◆ ReadLittleFloat()

float BURGER_API Burger::ReadLittleFloat ( FILE * fp)
extern

Read a little endian 32-bit float from a file.


Given an ANSI FILE *, read a 32-bit float in little endian format from the file stream.

Parameters
fpFILE * to the stream to read from.
Returns
NaN on error or float from the data stream
See also
ReadBigFloat(FILE *) or ReadLittleDouble(FILE *)

◆ ReadLittleWord64()

uint64_t BURGER_API Burger::ReadLittleWord64 ( FILE * fp)
extern

Read a little endian 64-bit integer from a file.


Given an ANSI FILE *, read a 64-bit integer in little endian format from the file stream.

Parameters
fpFILE * to the stream to read from.
Returns
Zero on error or integer from the data stream
See also
ReadBigWord64(FILE *), read_little_uint16(FILE *) or read_little_uint32(FILE *)

◆ Realloc()

void *BURGER_API Burger::Realloc ( const void * pInput,
uintptr_t uSize )
externnoexcept

Reallocate previously allocated memory.


Reallocate memory using the Burger::GlobalMemoryManager. If the new buffer is smaller, the data is truncated. If the new buffer is larger, the extra memory is not initialized.

Parameters
pInputPointer to memory to reallocate. nullptr assumes no memory to copy from.
uSizeNew size of the buffer.
Returns
Pointer to the memory allocated with the data copied from the previous pointer. nullptr if out of memory or no memory requested.
See also
Burger::Alloc() or Burger::alloc_copy()

◆ RemoveTrailingChar()

void BURGER_API Burger::RemoveTrailingChar ( char * pInput,
uint_t uRemove )
externnoexcept

Remove a character from the end of a string if present.


Parse to the end of the string. If the last character is a match to uRemove, it's zeroed out, effectively removing it. This function is a convenience routine used to get rid of a trailing ':' or '/' mark from a directory path.

Parameters
pInputPointer to the "C" string to scan. nullptr will page fault.
uRemovecharacter to test the last char with (Range 0-255).
See also
Burger::ForceTrailingChar(char *,uint_t)

◆ Replace() [1/2]

void BURGER_API Burger::Replace ( char * pInput,
uint_t uFrom,
uint_t uTo )
externnoexcept

Convert characters in a string from one to another.


Convert any character that matches the uFrom value into the uTo value.

Parameters
pInputPointer to the "C" string to perform the fix up on. nullptr will page fault.
uFromValue to compare with.
uToValue to replace matching values with.
See also
Replace(char *,const char *,uint_t,uint_t)

◆ Replace() [2/2]

void BURGER_API Burger::Replace ( char * pOutput,
const char * pInput,
uint_t uFrom,
uint_t uTo )
externnoexcept

Convert characters in a string from one to another.


Convert any character that matches the uFrom value into the uTo value.

Parameters
pOutputPointer to a buffer large enough to hold the converted "C" string.
pInputPointer to the "C" string to perform the fix up on. nullptr will page fault.
uFromValue to compare with.
uToValue to replace matching values with.
See also
Replace(char *,uint_t,uint_t)

◆ reverse_list()

Burger::ForwardLink *BURGER_API Burger::reverse_list ( ForwardLink * pRoot)
externnoexcept

Reverse a singly linked list.


Traverse a singly linked list and reverse the linkage so that the order of the entries are in the opposite order.

Parameters
pRootPointer to the ForwardLink that is the head of the list.
Returns
Pointer to the last entry of the linked list that is the new head of the list.
See also
ForwardLink

◆ RotateLeft() [1/2]

uint32_t Burger::RotateLeft ( uint32_t uInput,
uint_t uShiftCount )
inlinenoexcept

Rotate the bits left.


Using a compiler intrinsic where supported, rotate the bits in the 32 bit register to the left.

Parameters
uInputValue to rotate left
uShiftCount0 to 31, number of bits to shift.
Returns
The value with the bits rotated
See also
RotateLeft(uint64_t,uint_t) or RotateRight(uint32_t,uint_t)

◆ RotateLeft() [2/2]

uint64_t Burger::RotateLeft ( uint64_t uInput,
uint_t uShiftCount )
inlinenoexcept

Rotate the bits left.


Using a compiler intrinsic where supported, rotate the bits in the 64 bit register to the left.

Parameters
uInputValue to rotate left
uShiftCount0 to 63, number of bits to shift.
Returns
The value with the bits rotated
See also
RotateLeft(uint32_t,uint_t) or RotateRight(uint64_t,uint_t)

◆ RotateRight() [1/2]

uint32_t Burger::RotateRight ( uint32_t uInput,
uint_t uShiftCount )
inlinenoexcept

Rotate the bits right.


Using a compiler intrinsic where supported, rotate the bits in the 32 bit register to the right.

Parameters
uInputValue to rotate right
uShiftCount0 to 31, number of bits to shift.
Returns
The value with the bits rotated
See also
RotateRight(uint64_t,uint_t) or RotateLeft(uint32_t,uint_t)

◆ RotateRight() [2/2]

uint64_t Burger::RotateRight ( uint64_t uInput,
uint_t uShiftCount )
inlinenoexcept

Rotate the bits right.


Using a compiler intrinsic where supported, rotate the bits in the 64 bit register to the right.

Parameters
uInputValue to rotate right
uShiftCount0 to 63, number of bits to shift.
Returns
The value with the bits rotated
See also
RotateRight(uint32_t,uint_t) or RotateLeft(uint64_t,uint_t)

◆ round_to_zero() [1/2]

double BURGER_API Burger::round_to_zero ( double dInput)
externnoexcept

Return a floating point number rounded to zero.


If there is any fraction, round the value to the whole integer towards zero

Parameters
dInput64 bit floating point value to round to zero.
Returns
The input converted to a 64 bit floating point value using the truth table below.
double dResult;
dResult = Burger::round_to_zero(1.1); //1
dResult = Burger::round_to_zero(1.95); //1
dResult = Burger::round_to_zero(-1.1); //-1
dResult = Burger::round_to_zero(-1.95); //-1
dResult = Burger::round_to_zero(0.1); //0
dResult = Burger::round_to_zero(0.95); //0
dResult = Burger::round_to_zero(-0.1); //0
dResult = Burger::round_to_zero(-0.95); //0
float round_to_zero(float fInput) noexcept
Return a floating point number rounded to zero.
Definition brfloatingpoint.cpp:2565
See also
round_to_zero(float), get_floor(double), get_ceiling(double), get_round(double), or fixed_to_int(Fixed32)

◆ round_to_zero() [2/2]

float BURGER_API Burger::round_to_zero ( float fInput)
externnoexcept

Return a floating point number rounded to zero.


If there is any fraction, round the value to the whole integer towards zero

Parameters
fInput32 bit floating point value to round to zero.
Returns
The input converted to a 32 bit floating point value using the truth table below.
float fResult;
fResult = Burger::round_to_zero(1.1f); //1
fResult = Burger::round_to_zero(1.95f); //1
fResult = Burger::round_to_zero(-1.1f); //-1
fResult = Burger::round_to_zero(-1.95f); //-1
fResult = Burger::round_to_zero(0.1f); //0
fResult = Burger::round_to_zero(0.95f); //0
fResult = Burger::round_to_zero(-0.1f); //0
fResult = Burger::round_to_zero(-0.95f); //0
See also
round_to_zero(double), get_floor(float), get_ceiling(float), get_round(float), or fixed_to_int(Fixed32)

◆ SaveFile()

Burger::eError BURGER_API Burger::SaveFile ( FILE * fp,
const void * pInput,
uintptr_t uLength )
extern

Save memory to a file opened with fopen()


Given an ANSI FILE * for a freshly opened file with write permissions, write the chunk of memory to the file and close the file. The passed pointer is considered invalid and closed after this call is issued.

Parameters
fpFILE * to the file to write to
pInputPointer to the memory to write to
uLengthNumber of bytes to write
Returns
Zero if failure, non-zero on success
See also
LoadFile(FILE *,uintptr_t *)

◆ SDBM_hash()

uintptr_t BURGER_API Burger::SDBM_hash ( const void * pInput,
uintptr_t uInputCount,
uint32_t uHashSeed = 0U )
externnoexcept

Hash data using the sdbm (Service Data Base Management) algorithm.


This algorithm was created for sdbm (a public-domain reimplementation of ndbm) database library.

It was found to do well in scrambling bits, causing better distribution of the keys and fewer splits. it also happens to be a good general hashing function with good distribution. the actual function is hash(i) = hash(i - 1) * 65599 + str[i];

Further reading: http://www.cs.yorku.ca/~oz/hash.html#sdbm

Parameters
pInputPointer to the data to hash
uInputCountNumber of bytes of data to hash
uHashSeedValue to seed the hash with.
Returns
32 bit hash value generated by the data.
See also
SDBM_hash_case(const void *,uintptr_t,uint32_t)

◆ SDBM_hash_case()

uintptr_t BURGER_API Burger::SDBM_hash_case ( const void * pInput,
uintptr_t uInputCount,
uint32_t uHashSeed = 0U )
externnoexcept

Hash string data using forced lower case with the sdbm (Service Data Base Management) algorithm.


This algorithm was created for sdbm (a public-domain reimplementation of ndbm) database library.

It was found to do well in scrambling bits, causing better distribution of the keys and fewer splits. it also happens to be a good general hashing function with good distribution. the actual function is hash(i) = hash(i - 1) * 65599 + str[i];

Further reading: http://www.cs.yorku.ca/~oz/hash.html#sdbm

Note
This function converts all upper case characters into lower case to yield a case insensitive hash
Parameters
pInputPointer to the data to hash
uInputCountNumber of bytes of data to hash
uHashSeedValue to seed the hash with.
Returns
32 bit hash value generated by the data.
See also
SDBM_hash(const void *,uintptr_t,uint32_t)

◆ SDBMHashCaseFunctor()

uintptr_t BURGER_API Burger::SDBMHashCaseFunctor ( const void * pData,
uintptr_t uDataSize )
externnoexcept

Case insensitive SDBM (Service Data Base Management) hash callback for HashMapShared.


Invoke the SDBM (Service Data Base Management) hashing algorithm on the contents of a class using the default seed value and convert all upper case characters into lower case.

Parameters
pDataPointer to a data chunk to hash
uDataSizeSize of the data chunk in bytes
Returns
32 bit wide hash of the class
See also
SDBMHashFunctor(), HashMapShared or SDBM_hash_case()

◆ SDBMHashFunctor()

uintptr_t BURGER_API Burger::SDBMHashFunctor ( const void * pData,
uintptr_t uDataSize )
externnoexcept

SDBM (Service Data Base Management) hash callback for HashMapShared.


Invoke the SDBM (Service Data Base Management) hashing algorithm on the contents of a class using the default seed value.

Parameters
pDataPointer to a data chunk to hash
uDataSizeSize of the data chunk in bytes
Returns
32 bit wide hash of the class
See also
SDBMHashCaseFunctor(), HashMapShared or SDBM_hash()

◆ separate_integer_fraction()

void BURGER_API Burger::separate_integer_fraction ( FPLargeInt * pIntegerPart,
FPLargeInt * pFractionalPart,
const FPInfo * pFPInfo )
externnoexcept

Separate integer and fractional values from floating point number.


Given an FPInfo class instance, extract the integer and the fractional components of a floating point number and store the values into separate FPLargeInt classes.

Parameters
pIntegerPartPointer to the output integer record
pFractionalPartPointer to the output fractional record
pFPInfoPointer to the input FPInfo record

◆ set_8087_precision()

Burger::e8087Precision Burger::set_8087_precision ( e8087Precision uInput)
externnoexcept

Change the floating point precision.


On Intel 32 bit processors, there's a special floating point register to control the precision of the 80387 compatible FPU. This function allows the modification of this register for FPU precision. Lower precision yields more speed.

Note
This function only exists on 32 bit Intel compatible CPU targets.
If Direct3D is enabled, Windows sets the precision to 24 bit on 32 bit platforms. This function will undo the change if that's not desired.
Parameters
uInputNew enumeration state
Returns
Previous precision state
See also
e8087Precision or get_8087_precision(void)

◆ set_8087_rounding()

Burger::e8087Rounding Burger::set_8087_rounding ( e8087Rounding uInput)
externnoexcept

Change the floating point precision.


On Intel 32 bit processors, there's a special floating point register to control the rounding of the 80387 compatible FPU. This function allows the modification of this register for FPU rounding.

Note
This function only exists on 32 bit Intel compatible CPU targets.
Parameters
uInputNew enumeration state
Returns
Previous rounding state
See also
e8087Rounding or get_8087_rounding(void)

◆ set_hintflags()

void BURGER_API Burger::set_hintflags ( uint32_t uHintFlags)
externnoexcept

Set the current debug tracing flag.


Several subsystems perform perform code that may or may not interfere with higher level code. This flag enables and/or disables these features.

Parameters
uHintFlagsThe hint flags. Generate it with eHintFlags enumerations.
See also
get_hintflags()

◆ set_mxcsr_flags()

uint32_t BURGER_API Burger::set_mxcsr_flags ( uint32_t uOrFlags,
uint32_t uAndFlags )
externnoexcept

Change the SSE floating point precision.


On Intel processors with SSE, there's a special floating point register to control the rounding of the SSE FPU. This function allows the modification of this register for FPU rounding, denormal zeroing, and other exceptions.

Examples of flags to set or clear

Note
This function only exists on Intel compatible CPU targets with SSE. Do not call this function if SSE is not available.
Parameters
uOrFlagsFlags to set in the MXCSR
uAndFlagsFlags to clear in the MXCSR
Returns
Previous rounding state
See also
get_8087_rounding(void), or get_8087_precision(void)

◆ set_PowerPC_rounding()

Burger::ePowerPCRounding Burger::set_PowerPC_rounding ( ePowerPCRounding uInput)
extern

Change the floating point precision.


On PowerPC processors, there's a special floating point register to control the rounding. This function allows the modification of this register for FPU rounding.

Note
This function only exists on PowerPC compatible CPU targets.
Parameters
uInputNew enumeration state
Returns
Previous rounding state
See also
ePowerPCRounding or get_PowerPC_rounding(void)

◆ set_thread_priority()

Burger::eError BURGER_API Burger::set_thread_priority ( ThreadID uThreadID,
eThreadPriority uThreadPriority )
externnoexcept

Set the execution priority of a thread.


Set the execution priority of any thread using a ThreadID.

If kErrorNotSupportedOnThisPlatform is returned, this feature is not supported.

Returns
Zero if no error, non-zero on error.
See also
Thread, or get_thread_priority(ThreadID)

◆ set_traceflags()

void BURGER_API Burger::set_traceflags ( uint32_t uTraceFlags)
externnoexcept

Set the current debug tracing flag.


Several subsystems perform diagnostic logging and this flag enables and/or disables these features.

Parameters
uTraceFlagsThe trace flags. Generate it with eTraceFlags enumerations.
See also
get_traceflags()

◆ SetBinaryMode()

void BURGER_API Burger::SetBinaryMode ( FILE * fp)
extern

Force an ANSI FILE * to binary mode.


If the "C" standard library supports it, change the mode for an open FILE * to binary

Note
This is only relevant to operating systems that require remapping of text files on to and from a non-linux line feed only line endings.
Parameters
fpFILE * to the file to read from

◆ SetDeviceCursor()

long BURGER_API Burger::SetDeviceCursor ( IDirect3DDevice9 * pDirect3DDevice9,
HICON__ * hCursor )
extern

Convert a Windows HCURSOR for DirectX9.


Convert a HCURSOR into a DirectX 9 surface and set up DirectX to use this surface as a cursor. Hot spots are retained.

Note
This is only available on Windows
Parameters
pDirect3DDevice9Pointer to the current Direct3D 9 device
hCursorHCURSOR object to convert
Returns
HRESULT returned by Windows. Positive numbers mean success.

◆ SetEnvironmentString()

Burger::eError BURGER_API Burger::SetEnvironmentString ( const char * pKey,
const char * pInput )
externnoexcept

Set an environment string.


On systems that support it, set or create an environment variable.

The string will be properly converted from UTF8 into the operating system's native character encoding.

Parameters
pKeyPointer to a "C" string of the environment variable name
pInputPointer to a "C" string of the environment variable value or nullptr to remove the variable
Returns
Zero on success, non-zero on error
See also
GetEnvironmentString(const char *)

◆ SetFileExtension()

void BURGER_API Burger::SetFileExtension ( char * pInput,
const char * pNewExtension )
externnoexcept

Replace the text after the last period for filename extensions.


A string is scanned until the last period is found. The text beyond the final period is discarded and the string pointed by pNewExtension is appended to the Input filename. If no final period is found, then a period is appended and then the new extension is added. If NewExtension has a period as the first character, it will be ignored to prevent a double period from occurring in the final string.

You must guarantee that the Input buffer has enough space to accommodate the new extension. This routine will not check for buffer overruns.

Examples: "Foo.txt" + "gif" = "Foo.gif", "Foo" + "gif" = "Foo.gif", "Foo.txt" + nullptr = "Foo", "Foo.bin" + ".txt" = "Foo.txt".

Parameters
pInputPointer to the "C" string to scan. nullptr will page fault. This will be modified with the new file extension. NewExtension = Pointer to a "C" string with the extension to apply.
pNewExtensionPointer to a "C" string that represents the new extension. A nullptr or empty string will have the existing extension stripped.
See also
Burger::GetFileExtension(const char *).

◆ SimpleDecompressDeflate()

Burger::eError BURGER_API Burger::SimpleDecompressDeflate ( void * pOutput,
uintptr_t uOutputChunkLength,
const void * pInput,
uintptr_t uInputChunkLength )
extern

Decompress data using Deflate compression.


Using the Deflate (ZLIB) compression algorithm, decompress the data in one pass

Parameters
pOutputPointer to the buffer to accept the decompressed data
uOutputChunkLengthNumber of bytes in the output buffer
pInputPointer to data to compress
uInputChunkLengthNumber of bytes in the data to decompress
Returns
Decompress::eError code with zero if no failure, non-zero is an error code
See also
DecompressDeflate::Process()

◆ SimpleDecompressILBMRLE()

Burger::eError BURGER_API Burger::SimpleDecompressILBMRLE ( void * pOutput,
uintptr_t uOutputChunkLength,
const void * pInput,
uintptr_t uInputChunkLength )
extern

Decompress data using RLE compression.


Using the RLE compression algorithm, decompress the data in one pass

Parameters
pOutputPointer to the buffer to accept the decompressed data
uOutputChunkLengthNumber of bytes in the output buffer
pInputPointer to data to compress
uInputChunkLengthNumber of bytes in the data to decompress
Returns
Decompress::eError code with zero if no failure, non-zero is an error code
See also
DecompressILBMRLE::Process()

◆ SimpleDecompressLZSS()

Burger::eError BURGER_API Burger::SimpleDecompressLZSS ( void * pOutput,
uintptr_t uOutputChunkLength,
const void * pInput,
uintptr_t uInputChunkLength )
extern

◆ sine_387() [1/2]

double BURGER_API Burger::sine_387 ( double dInput)
externnoexcept

Return the sine from radians.


Use the fsin instruction to generate sine. Will loop in cases where overflow is detected.

Note
Only available on 32 bit intel CPUs
Parameters
dInputValue in Radians
Returns
Sine of fInput
See also
sine_387(float) or cosine_387(double)

◆ sine_387() [2/2]

float BURGER_API Burger::sine_387 ( float fInput)
externnoexcept

Return the sine from radians.


Use the fsin instruction to generate sine. Will loop in cases where overflow is detected.

Note
Only available on 32 bit intel CPUs
Parameters
fInputValue in Radians
Returns
Sine of fInput
See also
sine_387(double) or cosine_387(float)

◆ SlashesToColons() [1/2]

void BURGER_API Burger::SlashesToColons ( char * pInput)
externnoexcept

Convert all forward and back slashes to colons.


Burgerlib uses colons as directory separators. This function will take Unix ('\') and Windows ('/') style slashes and convert them into colons.

Parameters
pInputPointer to the "C" string to perform the fix up on. nullptr will page fault.
See also
SlashesToColons(char *,const char *), SlashesToWindowsSlashes(char *) or SlashesToLinuxSlashes(char *)

◆ SlashesToColons() [2/2]

void BURGER_API Burger::SlashesToColons ( char * pOutput,
const char * pInput )
externnoexcept

Convert all forward and back slashes to colons.


Burgerlib uses colons as directory separators. This function will take Unix ('\') and Windows ('/') style slashes and convert them into colons.

Parameters
pOutputPointer to a buffer large enough to contain the new string
pInputPointer to the "C" string to perform the fix up. nullptr will page fault.
See also
SlashesToColons(char *), SlashesToWindowsSlashes(char ,const char *) or SlashesToLinuxSlashes(char *,const char *)

◆ SlashesToLinuxSlashes() [1/2]

void BURGER_API Burger::SlashesToLinuxSlashes ( char * pInput)
externnoexcept

Convert all back slashes ('\') to forward slashes ('/').


Linux and MacOSX uses forward slashes as directory separators. This function will take Windows slashes and convert them into Linux style slashes.

Parameters
pInputPointer to the "C" string to perform the fix up on. nullptr will page fault.
See also
SlashesToLinuxSlashes(char *, const char *), SlashesToColons(char *) or SlashesToWindowsSlashes(char *)

◆ SlashesToLinuxSlashes() [2/2]

void BURGER_API Burger::SlashesToLinuxSlashes ( char * pOutput,
const char * pInput )
externnoexcept

Convert all back slashes ('\') to forward slashes ('/').


Linux and MacOSX uses forward slashes as directory separators. This function will take Windows slashes and convert them into Unix style slashes.

Parameters
pOutputPointer to a buffer large enough to hold the converted "C" string.
pInputPointer to the "C" string to perform the fix up on. nullptr will page fault.
See also
SlashesToLinuxSlashes(char *),SlashesToColons(char *,const char *) or SlashesToWindowsSlashes(char *,const char *)

◆ SlashesToWindowsSlashes() [1/2]

void BURGER_API Burger::SlashesToWindowsSlashes ( char * pInput)
externnoexcept

Convert all forward slashes ('/') to back slashes ('\').


Windows uses backslashes as directory separators. This function will take Linux style slashes and convert them into Windows slashes.

Parameters
pInputPointer to the "C" string to perform the fix up on. nullptr will page fault.
See also
SlashesToWindowsSlashes(char *,const char *), SlashesToColons(char *) or SlashesToLinuxSlashes(char *)

◆ SlashesToWindowsSlashes() [2/2]

void BURGER_API Burger::SlashesToWindowsSlashes ( char * pOutput,
const char * pInput )
externnoexcept

Convert all forward slashes ('/') to back slashes ('\').


Windows uses backslashes as directory separators. This function will take Unix style slashes and convert them into Windows slashes.

Parameters
pOutputPointer to a buffer large enough to hold the converted "C" string.
pInputPointer to the "C" string to perform the fix up on. nullptr will page fault.
See also
SlashesToWindowsSlashes(char *), SlashesToColons(char ,const char *) or SlashesToLinuxSlashes(char *,const char *)

◆ sleep_ms()

void BURGER_API Burger::sleep_ms ( uint32_t uMilliseconds,
uint_t bAlertable = 0 )
externnoexcept

Sleep the current thread.


On multithreaded systems, if kSleepYield is passed to this function it will yield the thread's remaining time quantum.

If kSleepInfinite is passed then the thread will sleep forever unless an Remote Procedure Call or an I/O event occurs. Otherwise, pass the number of milliseconds that are desired for the thread to sleep. Zero is mapped to kSleepYield.

If bAlertable is FALSE, the pause will not be interruptable.

Parameters
uMillisecondskSleepYield, kSleepInfinite or number of non-zero milliseconds to sleep
bAlertableTRUE if the sleep can be interrupted
Note
On non-multithreaded systems, this function does nothing

◆ Snprintf()

intptr_t BURGER_API Burger::Snprintf ( char * pOutput,
uintptr_t uOutputSize,
const char * pFormat,
uintptr_t uArgCount,
const ArgumentType ** ppArgs )
externnoexcept

snprintf() clone


Return value is the number of characters to be written if the buffer is sufficiently large to hold the entire formatted output, or a negative value indicating an error occurred during the attempt.

  • Step 1) Parse the format string and arguments
  • Step 2) if no issues found in Step 1, execute the list of format & copy output commands.
Parameters
pOutputPointer to the output buffer
uOutputSizeSize of the output buffer in bytes
pFormatPointer to a "C" format string
uArgCountNumber of arguments in the argument array
ppArgsArgument array, can be NULL if uArgCount is zero
Returns
Negative number for error, number of bytes processed on success
See also
Sprintf(char *,const char *,uintptr_t,const ArgumentType **)

◆ SocketSetBlocking()

Burger::eError BURGER_API Burger::SocketSetBlocking ( SocketType uSocket)
externnoexcept

Set a posix socket to blocking mode.


Given a valid socket from a BSD socket library, mark it as blocking.

Parameters
uSocketSOCKET from windows or socket from BSD socket systems
Returns
Zero if no error, non-zero if not supported or an error
See also
SocketSetNonBlocking(uintptr_t)

◆ SocketSetNonBlocking()

Burger::eError BURGER_API Burger::SocketSetNonBlocking ( SocketType uSocket)
externnoexcept

Set a posix socket to non-blocking mode.


Given a valid socket from a BSD socket library, mark it as blocking.

Parameters
uSocketSOCKET from windows or socket from BSD socket systems
Returns
Zero if no error, non-zero if not supported or an error
See also
SocketSetBlocking(uintptr_t)

◆ SocketTestForReading()

Burger::eError BURGER_API Burger::SocketTestForReading ( SocketType uSocket)
externnoexcept

Test a posix socket if there's pending data.


Given a valid socket from a BSD socket library, test it if there's data pending. Return an error if the socket is disconnected.

Parameters
uSocketSOCKET from windows or socket from BSD socket systems
Returns
Zero if no error, non-zero if not supported or an error

◆ Sprintf()

intptr_t BURGER_API Burger::Sprintf ( char * pOutput,
const char * pFormat,
uintptr_t uArgCount,
const ArgumentType ** ppArgs )
externnoexcept

sprintf() clone


Return value is the number of characters written to the buffer, or a negative value indicating an error occurred during the attempt.

  • Step 1) Parse the format string and arguments
  • Step 2) if no issues found in Step 1, execute the list of format & copy output commands.
Note
This function can easily overrun the buffer since no buffer is supplied. It is recommended you use Snprintf() instead.
Parameters
pOutputPointer to a buffer large enough to accept the output string
pFormatPointer to a "C" format string
uArgCountNumber of arguments in the argument array
ppArgsArgument array, can be NULL if uArgCount is zero
Returns
Negative number for error, number of bytes processed on success
See also
Snprintf(char *,uintptr_t,const char *,uintptr_t, const ArgumentType **) or SprintfUserAlloc( SafePrint::SprintfCallbackProc,void *,uint_t,const char *, uintptr_t,const ArgumentType **)

◆ SprintfUserAlloc()

intptr_t BURGER_API Burger::SprintfUserAlloc ( SafePrint::SprintfCallbackProc pCallback,
void * pContext,
uint_t bAddNull,
const char * pFormat,
uintptr_t uArgCount,
const ArgumentType ** ppArgs )
externnoexcept

Print into a buffer that a callback allocates.


Version of sprintf that calls back to an allocator to get the output buffer AFTER* validating the formatting and determining the required size. A null terminator written to the end of the output is optional requested by the caller.

  • Step 1) Parse the format string and arguments
  • Step 2) Report the format results and call back for an output buffer.
  • Step 3) If no issues found in Step 1 and a buffer was returned in step 2, execute the list of format & copy output commands.
Parameters
pCallbackPointer to a callback function
pContextPointer to data the callback function requires, can be NULL
bAddNullTRUE if a 0 should be appended to the end of the string, FALSE if not.
pFormatPointer to a "C" format string
uArgCountNumber of arguments in the argument array
ppArgsArgument array, can be NULL if uArgCount is zero
Returns
Negative number for error, number of bytes processed on success
See also
Sprintf(char *,const char *,uintptr_t,const ArgumentType **)

◆ SqrtFixedToWord32()

uint32_t BURGER_API Burger::SqrtFixedToWord32 ( Fixed32 fInput)
extern

Get the square root of a Fixed32.


Return the square root of a Fixed32 and return the integer result. The maximum value is 255.998 (256) for the square root of 0x7FFFFFFF. This routine is 100% accurate.

Negative numbers will return zero for the result.

Parameters
fInputValue to return the square root of.
Returns
Return the square root as an integer.
Note
This will perform a round to nearest for the fraction so if the calculated square root is 1.6, it will return 2.
See also
Burger::square_root(uint32_t)

◆ square() [1/2]

double Burger::square ( double dInput)
inlineconstexprnoexcept

Return the square of the input.


Square the number and return the result.

Parameters
dInputValue to square
Returns
The square of the input
See also
square(float)

◆ square() [2/2]

float Burger::square ( float fInput)
inlineconstexprnoexcept

Return the square of the input.


Square the number and return the result.

Parameters
fInputValue to square
Returns
The square of the input
See also
square(double)

◆ square_root() [1/4]

double BURGER_API Burger::square_root ( double dInput)
externnoexcept

Get the square root value of a double.


Return the square root of the floating point input. This is usually done by inline assembly.

Parameters
dInputA valid double precision floating point number.
Returns
The square root of the input.
See also
square_root(float), square_root(uint32_t), and square_root(Fixed32)

◆ square_root() [2/4]

Fixed32 BURGER_API Burger::square_root ( Fixed32 fInput)
extern

Get the square root of a Fixed32.


Return the square root of a Fixed32 and return the Fixed32 result. The maximum value is 255.998 (256) for the square root of 0x7FFFFFFF. This routine is 100% accurate.

Negative numbers will return zero for the result.

Parameters
fInputValue to return the square root of.
Returns
Return the square root as a Fixed32.
See also
Burger::square_root(uint32_t), Burger::square_root(float), and Burger::square_root(double)

◆ square_root() [3/4]

float BURGER_API Burger::square_root ( float fInput)
externnoexcept

Get the square root value of a float.


Return the square root of the floating point input.

This is usually done by inline assembly.

Parameters
fInputA valid single precision floating point number.
Returns
The square root of the input.
See also
square_root(double), square_root(uint32_t), and square_root(Fixed32)

◆ square_root() [4/4]

uint32_t BURGER_API Burger::square_root ( uint32_t uInput)
extern

Get the square root of an integer.


Return the square root of an integer. The maximum value is 46341 for the square root of 0x7FFFFFFF. This routine is 100% accurate.

Parameters
uInputValue to return the square root of.
Returns
Return the square root as an integer.
Note
This will perform a round to nearest for the fraction so if the calculated square root is 1.6, it will return 2.
See also
Burger::square_root(Fixed32), Burger::square_root(float), and Burger::square_root(double)

◆ StringCaseCompare() [1/2]

int BURGER_API Burger::StringCaseCompare ( const char * pInput1,
const char * pInput2 )
externnoexcept

Compare two "C" strings for equality, case insensitive.


Given pointers to two "C" strings, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero. If the characters in the string are upper case, convert them to ASCII lowercase before the subtraction.

Parameters
pInput1Pointer to the first "C" string to subtract from.
pInput2Pointer to the second "C" string to subtract with.
Returns
Zero if identical, <0 if pInput1<pInput2 and >0 if pInput1>pInput2
See also
Burger::StringCompare(const char *,const char *), Burger::StringCaseCompare(const char *,const char *,uintptr_t)

◆ StringCaseCompare() [2/2]

int BURGER_API Burger::StringCaseCompare ( const char * pInput1,
const char * pInput2,
uintptr_t uMaxLength )
externnoexcept

Compare two "C" strings for equality, case insensitive, length delimited.


Given pointers to two "C" strings, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero. If the characters in the string are upper case, convert them to ASCII lowercase before the subtraction.

The function determines equality by hitting a zero first or the maximum allowed length.

Parameters
pInput1Pointer to the first "C" string to subtract from.
pInput2Pointer to the second "C" string to subtract with.
uMaxLengthMaximum number of bytes to check
Returns
Zero if identical, <0 if pInput1<pInput2 and >0 if pInput1>pInput2

◆ StringCaseString() [1/2]

char *BURGER_API Burger::StringCaseString ( const char * pInput,
const char * pTest )
externnoexcept

Locate a substring, case insensitive.


Returns a pointer to the first occurrence of pTest in pInput, or a nullptr pointer if pTest is not part of pInput.

The case insensitive matching process does not include the terminating null-characters, but it stops there.

Parameters
pInputPointer to the string to scan
pTestPointer to the substring to look for
Returns
nullptr if substring was not found or the pointer to the first matching string
See also
Burger::StringString(const char *,const char *)

◆ StringCaseString() [2/2]

uint16_t *BURGER_API Burger::StringCaseString ( const uint16_t * pInput,
const uint16_t * pTest )
externnoexcept

Locate a substring, case insensitive (UTF-16 version)


Returns a pointer to the first occurrence of pTest in pInput, or a nullptr pointer if pTest is not part of pInput.

The case insensitive matching process does not include the terminating null-characters, but it stops there.

Parameters
pInputPointer to the string to scan
pTestPointer to the substring to look for
Returns
nullptr if substring was not found or the pointer to the first matching string
See also
Burger::StringString(const uint16_t *,const uint16_t *)

◆ StringCharacter() [1/2]

char *BURGER_API Burger::StringCharacter ( const char * pInput,
int iChar )
externnoexcept

Scan for the first occurrence of a specific character.


Returns a pointer to the first occurrence of the character iChar in the string pInput or nullptr if the character was not found

Parameters
pInputPointer to a "C" string to scan
iCharCharacter to scan for
Returns
Pointer inside the input string to the first matching character or nullptr if not found
See also
Burger::StringCharacter(const uint16_t *,uint_t) and Burger::StringCharacterReverse(const char *,int)

◆ StringCharacter() [2/2]

uint16_t *BURGER_API Burger::StringCharacter ( const uint16_t * pInput,
uint_t uChar )
externnoexcept

Scan for the first occurrence of a specific character.


Returns a pointer to the first occurrence of the character uChar in the string pInput or nullptr if the character was not found

Parameters
pInputPointer to a "C" string to scan
uCharCharacter to scan for
Returns
Pointer inside the input string to the first matching character or nullptr if not found
See also
Burger::StringCharacter(const char *,int) and Burger::StringCharacterReverse(const uint16_t *,uint_t)

◆ StringCharacterReverse() [1/2]

char *BURGER_API Burger::StringCharacterReverse ( const char * pInput,
int iChar )
externnoexcept

Scan for the last occurrence of a specific character.


Returns a pointer to the last occurrence of the character iChar in the string pInput or nullptr if the character was not found

Parameters
pInputPointer to a "C" string to scan
iCharCharacter to scan for
Returns
Pointer inside the input string to the last matching character or nullptr if not found
See also
Burger::StringCharacterReverse(const uint16_t *,uint_t), Burger::MemoryCharacterReverse(const char *,uintptr_t,int) and Burger::StringCharacter(const char *,int)

◆ StringCharacterReverse() [2/2]

uint16_t *BURGER_API Burger::StringCharacterReverse ( const uint16_t * pInput,
uint_t uChar )
externnoexcept

Scan for the last occurrence of a specific character.


Returns a pointer to the last occurrence of the character uChar in the string pInput or nullptr if the character was not found

Parameters
pInputPointer to a "C" string to scan
uCharCharacter to scan for
Returns
Pointer inside the input string to the last matching character or nullptr if not found
See also
Burger::StringCharacterReverse(const char *,int), Burger::MemoryCharacterReverse(const uint16_t *,uintptr_t,uint_t) and Burger::StringCharacter(const uint16_t *,uint_t)

◆ StringCompare() [1/4]

int BURGER_API Burger::StringCompare ( const char * pInput1,
const char * pInput2 )
externnoexcept

Compare two "C" strings for equality.


Given pointers to two "C" strings, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero.

Parameters
pInput1Pointer to the first "C" string to subtract from.
pInput2Pointer to the second "C" string to subtract with.
Returns
Zero if identical, <0 if pInput1<pInput2 and >0 if pInput1>pInput2
See also
Burger::StringCompare(const char *,const char *,uintptr_t)

◆ StringCompare() [2/4]

int BURGER_API Burger::StringCompare ( const char * pInput1,
const char * pInput2,
uintptr_t uMaxLength )
externnoexcept

Compare two "C" strings for equality, case sensitive, length delimited.


Given pointers to two "C" strings, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero.

The function determines equality by hitting a zero first or the maximum allowed length.

Parameters
pInput1Pointer to the first "C" string to subtract from.
pInput2Pointer to the second "C" string to subtract with.
uMaxLengthMaximum number of bytes to check
Returns
Zero if identical, <0 if pInput1<pInput2 and >0 if pInput1>pInput2
See also
Burger::StringCompare(const char *,const char *)

◆ StringCompare() [3/4]

int BURGER_API Burger::StringCompare ( const uint16_t * pInput1,
const uint16_t * pInput2 )
externnoexcept

Compare two 16 bit "C" strings for equality.


Given pointers to two 16 bit "C" strings, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero.

Parameters
pInput1Pointer to the first 16 bit "C" string to subtract from.
pInput2Pointer to the second 16 bit "C" string to subtract with.
Returns
Zero if identical, <0 if pInput1<pInput2 and >0 if pInput1>pInput2
See also
Burger::StringCompare(const uint16_t *,const uint16_t *,uintptr_t)

◆ StringCompare() [4/4]

int BURGER_API Burger::StringCompare ( const uint16_t * pInput1,
const uint16_t * pInput2,
uintptr_t uMaxLength )
externnoexcept

Compare two 16 bit "C" strings for equality, case sensitive, length delimited.


Given pointers to two 16 bit "C" strings, compare them for equality by using a subtraction of the first buffer to the second. If the subtraction's result is non-zero, sign extend the result and return it immediately. If both buffers are identical, return zero.

The function determines equality by hitting a zero first or the maximum allowed length.

Parameters
pInput1Pointer to the first 16 bit "C" string to subtract from.
pInput2Pointer to the second 16 bit "C" string to subtract with.
uMaxLengthMaximum number of bytes to check
Returns
Zero if identical, <0 if pInput1<pInput2 and >0 if pInput1>pInput2
See also
Burger::StringCompare(const uint16_t *,const uint16_t *)

◆ StringConcatenate() [1/5]

void BURGER_API Burger::StringConcatenate ( char * pOutput,
const char * pInput )
externnoexcept

Concatenate a "C" string with another "C" string.


Given a pointer to a "C" string, append it to a destination buffer that contains a valid "C" string. No bounds checking is performed.

This is the equivalent to strcat()

Parameters
pOutputPointer to the buffer of a valid "C" string to be appended.
pInputPointer to the buffer with the "C" to copy from.
See also
Burger::StringConcatenate(char *,uintptr_t,const char *) or Burger::StringLength(const char *)

◆ StringConcatenate() [2/5]

void BURGER_API Burger::StringConcatenate ( char * pOutput,
uintptr_t uOutputSize,
const char * pInput )
externnoexcept

Concatenate a "C" string with another "C" string bounds checked.


Given a pointer to a "C" string, append it to a destination buffer that contains a valid "C" string. If the destination buffer isn't big enough for the input string, truncate it.

Parameters
pOutputPointer to the buffer of a valid "C" string to be appended.
uOutputSizeSize in bytes of the output buffer
pInputPointer to the buffer with the "C" to copy from.
See also
Burger::StringConcatenate(char *,const char *) or Burger::StringLength(const char *)

◆ StringConcatenate() [3/5]

void BURGER_API Burger::StringConcatenate ( char * pOutput,
uintptr_t uOutputSize,
const char * pInput,
uintptr_t uInputSize )
externnoexcept

Concatenate a "C" string with a string buffer, bounds checked.


Given a pointer to a string buffer, append it to a destination buffer that contains a valid "C" string. If the destination buffer isn't big enough for the input string, truncate it.

Parameters
pOutputPointer to the buffer of a valid "C" string to be appended.
uOutputSizeSize in bytes of the output buffer
pInputPointer to the buffer with the string to copy from.
uInputSizeSize in bytes of the input buffer
See also
Burger::StringConcatenate(char *,const char *) or Burger::StringLength(const char *)

◆ StringConcatenate() [4/5]

void BURGER_API Burger::StringConcatenate ( uint16_t * pOutput,
const uint16_t * pInput )
externnoexcept

Concatenate a 16 bit "C" string with another 16 bit "C" string.


Given a pointer to a 16 bit "C" string, append it to a destination buffer that contains a valid 16 bit "C" string. No bounds checking is performed.

This is the equivalent to wstrcat()

Parameters
pOutputPointer to the buffer of a valid 16 bit "C" string to be appended.
pInputPointer to the buffer with the 16 bit "C" to copy from.
See also
Burger::StringConcatenate(uint16_t *,uintptr_t,const uint16_t *) or Burger::StringLength(const uint16_t *)

◆ StringConcatenate() [5/5]

void BURGER_API Burger::StringConcatenate ( uint16_t * pOutput,
uintptr_t uOutputSize,
const uint16_t * pInput )
externnoexcept

Concatenate a 16 bit "C" string with another 16 bit "C" string bounds checked.


Given a pointer to a 16 bit "C" string, append it to a destination buffer that contains a valid 16 bit "C" string. If the destination buffer isn't big enough for the input string, truncate it.

Parameters
pOutputPointer to the buffer of a valid 16 bit "C" string to be appended.
uOutputSizeSize in bytes of the output buffer
pInputPointer to the buffer with the 16 bit "C" to copy from.
See also
Burger::StringConcatenate(uint16_t *,const uint16_t *) or Burger::StringLength(const uint16_t *)

◆ StringCopy() [1/7]

void BURGER_API Burger::StringCopy ( char * pOutput,
const char * pInput )
externnoexcept

Copy a "C" string.


Given a pointer to a "C" string, copy it to a destination buffer. This is a functional equivalent to strcpy().

Parameters
pOutputPointer to the buffer to get the copy.
pInputPointer to the buffer with the "C" to copy from.
Note
This function does not check for buffer overruns on the destination buffer. Use with caution.
See also
Burger::StringCopy(char *,uintptr_t,const char *) or Burger::StringLength(const char *)

◆ StringCopy() [2/7]

void BURGER_API Burger::StringCopy ( char * pOutput,
uintptr_t uOutputSize,
const char * pInput )
externnoexcept

Copy a "C" string with bounds checking.


Given a pointer to a "C" string, copy it to a destination buffer. If the destination buffer isn't big enough for the input string, truncate it.

Parameters
pOutputPointer to the buffer to get the copy.
uOutputSizeSize in bytes of the output buffer
pInputPointer to the buffer with the "C" to copy from.
Note
This function will always zero terminate the output string and perform nothing at all if the input size is zero.
See also
Burger::StringCopy(char *,const char *) or Burger::StringLength(const char *)

◆ StringCopy() [3/7]

void BURGER_API Burger::StringCopy ( char * pOutput,
uintptr_t uOutputSize,
const char * pInput,
uintptr_t uInputSize )
externnoexcept

Copy a text buffer into a "C" string with bounds checking.


Given a pointer to a buffer of text, copy it to a destination buffer and append it with a trailing zero. If the destination buffer isn't big enough for the input string, truncate it.

Parameters
pOutputPointer to the buffer to get the copy.
uOutputSizeSize in bytes of the output buffer
pInputPointer to the buffer with the text to copy from.
uInputSizeSize in byte of the text to copy from
Note
This function will always zero terminate the output string and perform nothing at all if the output size is zero.
See also
Burger::StringCopy(char *,const char *) or Burger::StringLength(const char *)

◆ StringCopy() [4/7]

void BURGER_API Burger::StringCopy ( String * pOutput,
const __CFString * pInput )
externnoexcept

Convert an NSString to a Burger::String (MacOSX and Carbon Only)


Given a valid const NSString, convert the string into UTF8 encoding and store the result into an output String.

Note
This is only available on Mac OSX
Parameters
pOutputPointer to a String class instance to recieve the string
pInputPointer to a constant NSString or CFString to convert

◆ StringCopy() [5/7]

void BURGER_API Burger::StringCopy ( uint16_t * pOutput,
const uint16_t * pInput )
externnoexcept

Copy a 16 bit "C" string.


Given a pointer to a 16 bit "C" string, copy it to a destination buffer. This is a functional equivalent to wstrcpy().

Parameters
pOutputPointer to the buffer to get the copy.
pInputPointer to the buffer with the 16 bit "C" to copy from.
Note
This function does not check for buffer overruns on the destination buffer. Use with caution.
See also
Burger::StringCopy(uint16_t *,uintptr_t,const uint16_t *) or Burger::StringLength(const uint16_t *)

◆ StringCopy() [6/7]

void BURGER_API Burger::StringCopy ( uint16_t * pOutput,
uintptr_t uOutputSize,
const uint16_t * pInput )
externnoexcept

Copy a 16 bit "C" string with bounds checking.


Given a pointer to a 16 bit "C" string, copy it to a destination buffer. If the destination buffer isn't big enough for the input string, truncate it.

Parameters
pOutputPointer to the buffer to get the copy.
uOutputSizeSize in bytes of the output buffer
pInputPointer to the buffer with the 16 bit "C" to copy from.
Note
This function will always zero terminate the output string and perform nothing at all if the input size is zero.
See also
Burger::StringCopy(uint16_t *,const uint16_t *) or Burger::StringLength(const uint16_t *)

◆ StringCopy() [7/7]

void BURGER_API Burger::StringCopy ( uint16_t * pOutput,
uintptr_t uOutputSize,
const uint16_t * pInput,
uintptr_t uInputSize )
externnoexcept

Copy a text buffer into a 16 bit "C" string with bounds checking.


Given a pointer to a buffer of text, copy it to a destination buffer and append it with a trailing zero. If the destination buffer isn't big enough for the input string, truncate it.

Parameters
pOutputPointer to the buffer to get the copy.
uOutputSizeSize in bytes of the output buffer
pInputPointer to the buffer with the text to copy from.
uInputSizeSize in byte of the text to copy from
Note
This function will always zero terminate the output string and perform nothing at all if the output size is zero.
See also
Burger::StringCopy(uint16_t *,const uint16_t *) or Burger::StringLength(const uint16_t *)

◆ StringDelete()

void BURGER_API Burger::StringDelete ( const char * pInput)
externnoexcept

Delete an allocated string.


If a string was allocated with Burger::StringDuplicate(const char *) or Burger::StringDuplicate(const char *,uintptr_t) then you must dispose of it with this function.

Parameters
pInputPointer to the "C" string to delete. A nullptr pointer will do nothing and is okay to pass.
See also
Burger::StringDuplicate(const char *) or Burger::StringDuplicate(const char *,uintptr_t)

◆ StringDuplicate() [1/2]

char *BURGER_API Burger::StringDuplicate ( const char * pInput)
externnoexcept

Make a copy of a "C" string.


The "C" string passed by pInput will be copied into a buffer allocated by Burger::Alloc(uintptr_t). The buffer is exactly the same size of the string. You must eventually dispose of the string with a call to Burger::StringDelete(const char *).

Parameters
pInputPointer to the "C" string to copy. A nullptr pointer will page fault.
Returns
A pointer to the copy of the string. Or nullptr if a memory error occurs.
See also
Burger::StringDuplicate(const char *,uintptr_t) or Burger::StringDelete(const char *).

◆ StringDuplicate() [2/2]

char *BURGER_API Burger::StringDuplicate ( const char * pInput,
uintptr_t uPadding )
externnoexcept

Make a copy of a "C" string with some padding.


The "C" string passed by pInput will be copied into a buffer allocated by Burger::Alloc(uintptr_t). The buffer is the same size of the string plus the padding value. The extra memory is not initialized but the string does terminate with a zero. You must eventually dispose of the string with a call to Burger::StringDelete(const char *).

Parameters
pInputPointer to the "C" string to copy. A null pointer will page fault.
uPaddingNumber of bytes to extend the buffer.
Returns
A pointer to the copy of the string. Or nullptr if a memory error occurred.
See also
Burger::StringDuplicate(const char *) or Burger::StringDelete( const char *)

◆ StringEndsWith() [1/2]

uint_t BURGER_API Burger::StringEndsWith ( char * pInput,
int iChar )
externnoexcept

Force the ending character of a string.


If the string is empty, or the last character doesn't match iChar, append iChar to the end of the string.

If pInput is nullptr, do nothing.

Parameters
pInputPointer to a "C" string to scan and modify
iCharCharacter to append if needed
Returns
FALSE if no operation was performed, TRUE if a character was appended
See also
StringEndsWith(uint16_t*, uint_t)

◆ StringEndsWith() [2/2]

uint_t BURGER_API Burger::StringEndsWith ( uint16_t * pInput,
uint_t uChar )
externnoexcept

Force the ending character of a string.


If the string is empty, or the last character doesn't match uChar, append uChar to the end of the string.

If pInput is nullptr, do nothing.

Parameters
pInputPointer to a "C" string to scan and modify
uCharCharacter to append if needed
Returns
FALSE if no operation was performed, TRUE if a character was appended
See also
StringEndsWith(char*, int)

◆ StringLength() [1/2]

uintptr_t BURGER_API Burger::StringLength ( const char * pInput)
externnoexcept

Perform an ANSI compatible strlen().


Determine the length of a "C" string in memory. A "C" string is a random string of bytes that terminates with a zero.

This function works by first forcing 32-bit alignment and then grabbing four bytes at a time, and uses a pseudo vector operation to test all four of them at once.

Here's how it works. For each byte, perform an operation that will clear the high bit if it is not in a suitable range. The two tests are as follows.

#1) Negate the high bit. This eliminates 0x80-0xFF, because if the byte was 0xD5, then it would become 0x55 which has a clear high bit. (0xD5^0x80)&0x80 == 0. This test is performed by performing a "~" operation in "C".

#2) Add 0xFF to the byte. This converts 0x01-0x80 into 0x00-0x7F. This range of values all have their high bits clear. This test is performed by adding the constant 0xFEFEFEFF to the uint32_t.

Take the output of these two tests and and them together, then and with 0x80 to test the high bit. If it is set, it must be zero since zero is the only value that passes both tests.

You may ask, why add with 0xFEFEFEFF, when I want to add 0xFF to each byte? Why wasn't it 0xFFFFFFFF? Because when I add 0xFF to the bottommost byte, it will carry a one to each upper byte. To compensate, I add 0xFE instead of 0xFF so the carried one is accounted for.

Parameters
pInputPointer to "C" string to determine the length
Returns
Length in bytes of the "C" string sans the terminating zero.
See also
Burger::StringCopy(char *,const char *)

◆ StringLength() [2/2]

uintptr_t BURGER_API Burger::StringLength ( const uint16_t * pInput)
externnoexcept

Perform an ANSI compatible strlen() for UTF16 strings..


Determine the length of a UTF16 "C" string in memory. A UTF16 "C" string is a random string of shorts that terminates with a zero.

Note
While the string L"Foobar" takes 14 bytes of memory to store, this function will return 6 to denote the number of values that are present. Due to UTF16 encoding, do not assume that this value represents the number of visible characters since some encodings take 2 samples instead of one.
Parameters
pInputPointer to a UTF16 "C" string to determine the length
Returns
Length in values of the UTF16 "C" string sans the terminating zero.
See also
Burger::StringLength(const char *)

◆ StringLowercase() [1/2]

void BURGER_API Burger::StringLowercase ( char * pInput)
externnoexcept

Convert a string to lower case.


Convert all 'A'-'Z' characters to 'a'-'z'. No localization is performed and no other characters are altered.

Parameters
pInputPointer to "C" string to modify.
See also
Burger::StringLowercase(char *,const char *) and Burger::StringUppercase(char *)

◆ StringLowercase() [2/2]

void BURGER_API Burger::StringLowercase ( char * pOutput,
const char * pInput )
externnoexcept

Convert a string to lower case into a new buffer.


Copy a string and convert all 'A'-'Z' characters to 'a'-'z'. No localization is performed and no other characters are altered.

Parameters
pOutputPointer to a buffer large enough to hold the input "C" string.
pInputPointer to "C" string to modify.
See also
Burger::StringLowercase(char *) and Burger::StringUppercase(char *,const char *)

◆ StringSkipOver() [1/2]

uintptr_t BURGER_API Burger::StringSkipOver ( const char * pInput,
const char * pDelimiters )
externnoexcept

Locate the offset of the first non-delimiter in a string.


Calculate the length of a span in pInput, which consists entirely of characters in pDelimiters. If no delimiters are found, the returned value is zero.

Parameters
pInputPointer to the string to scan
pDelimitersPointer to the list of delimiters to look for
Returns
Index of the first non-delimiter found, or zero in no delimiter was found.
See also
Burger::StringStopAt(const uint16_t *,const uint16_t *)

◆ StringSkipOver() [2/2]

uintptr_t BURGER_API Burger::StringSkipOver ( const uint16_t * pInput,
const uint16_t * pDelimiters )
externnoexcept

Locate the offset of the first non-delimiter in a string.


Calculate the length of a span in pInput, which consists entirely of characters in pDelimiters. If no delimiters are found, the returned value is zero.

Parameters
pInputPointer to the string to scan
pDelimitersPointer to the list of delimiters to look for
Returns
Index of the first non-delimiter found, or zero in no delimiter was found.
See also
Burger::StringSkipOver(const char *,const char *)

◆ StringStopAt() [1/2]

uintptr_t BURGER_API Burger::StringStopAt ( const char * pInput,
const char * pDelimiters )
externnoexcept

Locate the offset of the first delimiter in a string.


Scan pInput until a delimiter is found. Return the offset from the beginning of the string where the delimiter was located. If any of the delimiters are not found, the length of the input string is returned.

Parameters
pInputPointer to the string to scan
pDelimitersPointer to the list of delimiters to look for
Returns
Index of the first delimiter found, or length of the string if no delimiter found.
See also
Burger::StringStopAt(const uint16_t *,const uint16_t *)

◆ StringStopAt() [2/2]

uintptr_t BURGER_API Burger::StringStopAt ( const uint16_t * pInput,
const uint16_t * pDelimiters )
externnoexcept

Locate the offset of a delimiter in a string.


Scan pInput until a delimiter is found. Return the offset from the beginning of the string where the delimiter was located. If any of the delimiters are not found, the length of the input string is returned.

Parameters
pInputPointer to the string to scan
pDelimitersPointer to the list of delimiters to look for
Returns
Index of the first delimiter found, or length of the string if no delimiter found.
See also
Burger::StringStopAt(const char *,const char *)

◆ StringString() [1/3]

char *BURGER_API Burger::StringString ( const char * pInput,
const char * pTest )
externnoexcept

Locate a substring.


Returns a pointer to the first occurrence of pTest in pInput, or a nullptr pointer if pTest is not part of pInput.

The matching process does not include the terminating null-characters, but it stops there.

Parameters
pInputPointer to the string to scan
pTestPointer to the substring to look for
Returns
nullptr if substring was not found or the pointer to the first matching string
See also
Burger::StringCaseString(const char *,const char *)

◆ StringString() [2/3]

char *BURGER_API Burger::StringString ( const char * pInput,
const char * pTest,
uintptr_t uTestLength )
externnoexcept

Locate a substring.


Returns a pointer to the first occurrence of pTest in pInput, or a nullptr pointer if pTest is not part of pInput.

The matching process does not include the terminating null-characters, but it stops there.

Parameters
pInputPointer to the string to scan
pTestPointer to the substring to look for
uTestLengthNumber of elements in the string to match
Returns
nullptr if substring was not found or the pointer to the first matching string
See also
StringString(const char *,const char *)

◆ StringString() [3/3]

uint16_t *BURGER_API Burger::StringString ( const uint16_t * pInput,
const uint16_t * pTest )
externnoexcept

Locate a substring (UTF-16 version)


Returns a pointer to the first occurrence of pTest in pInput, or a nullptr pointer if pTest is not part of pInput.

The matching process does not include the terminating null-characters, but it stops there.

Parameters
pInputPointer to the string to scan
pTestPointer to the substring to look for
Returns
nullptr if substring was not found or the pointer to the first matching string
See also
Burger::StringCaseString(const uint16_t *,const uint16_t *)

◆ StringToIPv4()

Burger::eError BURGER_API Burger::StringToIPv4 ( const char * pInput,
uint32_t * pIP,
uint_t * pPort = 0 )
externnoexcept

Convert a string into an IPv4 address.


Given a an IPv4 address as a string, convert it into a IPv4 address and port.

If the port is not specified, it will be returned as 0

Example input "206.55.132.145:80" becomes 206<<24+55<<16+132<<8+145 port is 80 "127.0.0.1" becomes 127<<24+1 port is 0

Parameters
pInputPointer to a "C" string to parse
pIPPointer to where to store the IPv4 IP address in native endian with the highest 8 bits being the leftmost number
pPortPointer to where to the port number
Returns
Zero if no error, non-zero if any values were out of range or the string was not an IPv4 address string

◆ StringToIPv6()

Burger::eError BURGER_API Burger::StringToIPv6 ( const char * pInput,
uint8_t * pIP,
uint_t * pPort = 0 )
externnoexcept

Convert a string into an IPv6 address.


Given a an IPv6 address as a string, convert it into a IPv6 address and port.

If the port is not specified, it will be returned as 0

Example input "[2604:4080:1122:8430:44ab:4ad8:adfd:a731]:80" "fe80::adfd:a731" "::1"

Parameters
pInputPointer to a "C" string to parse
pIPPointer to where to store the IPv6 IP address
pPortPointer to where to the port number
Returns
Zero if no error, non-zero if any values were out of range or the string was not an IPv6 address string

◆ StringToken() [1/2]

char *BURGER_API Burger::StringToken ( char * pInput,
const char * pDelimiters,
char ** ppSave )
externnoexcept

Split a string into tokens.


On a first call, the function expects a C string as argument for pInput, whose first character is used as the starting location to scan for tokens. In subsequent calls, the function expects a null pointer and uses the position right after the end of the last token as the new starting location for scanning.

Note
This function will destroy the initial input of pInput. pInput must remain in scope while this function and its output are in use. Replaces strtok_r().
Parameters
pInputPointer to the string to scan
pDelimitersPointer to the string of delimiters to scan
ppSavePointer to a char * to save the state
Returns
nullptr if not more tokens are remaining, or a pointer to the first character of the token found which is zero terminated at the delimiter value.
See also
Burger::StringToken(uint16_t *,const uint16_t *, uint16_t **), g_TokenDelimiters

◆ StringToken() [2/2]

uint16_t *BURGER_API Burger::StringToken ( uint16_t * pInput,
const uint16_t * pDelimiters,
uint16_t ** ppSave )
externnoexcept

Split a string into tokens.


On a first call, the function expects a C string as argument for pInput, whose first character is used as the starting location to scan for tokens. In subsequent calls, the function expects a null pointer and uses the position right after the end of the last token as the new starting location for scanning.

Note
This function will destroy the initial input of pInput. pInput must remain in scope while this function and its output are in use. Replaces strtok_r().
Parameters
pInputPointer to the string to scan
pDelimitersPointer to the string of delimiters to scan
ppSavePointer to a char * to save the state
Returns
nullptr if not more tokens are remaining, or a pointer to the first character of the token found which is zero terminated at the delimiter value.
See also
Burger::StringToken(char *,const char *, char **), g_TokenDelimiters16

◆ StringUppercase() [1/2]

void BURGER_API Burger::StringUppercase ( char * pInput)
externnoexcept

Convert a string to upper case.


Convert all 'a'-'z' characters to 'A'-'Z'. No localization is performed and no other characters are altered.

Parameters
pInputPointer to "C" string to modify.
See also
Burger::StringUppercase(char *,const char *) and Burger::StringLowercase(char *)

◆ StringUppercase() [2/2]

void BURGER_API Burger::StringUppercase ( char * pOutput,
const char * pInput )
externnoexcept

Convert a string to upper case into a new buffer.


Copy a string and convert all 'a'-'z' characters to 'A'-'Z'. No localization is performed and no other characters are altered.

Parameters
pOutputPointer to a buffer large enough to hold the input "C" string.
pInputPointer to "C" string to modify.
See also
Burger::StringUppercase(char *) and Burger::StringLowercase(char *,const char *)

◆ StripAllButList()

void BURGER_API Burger::StripAllButList ( char * pInput,
const char * pList )
externnoexcept

Remove all characters except those in a list.


The Input string is scanned and every character that is not in the pList "C" string will be removed and compacted. The resulting string consists only of characters that are found in the pList "C" string.

Note
This code is case sensitive.
Parameters
pInputPointer to the "C" string to purge. nullptr will page fault.
pListPointer to the "C" string that contains the valid characters to allow.
See also
Burger::StripAllFromList(char *,const char *), Burger::StripLeadingSpaces(char *), Burger::StripTrailingSpaces(char *)

◆ StripAllFromList()

void BURGER_API Burger::StripAllFromList ( char * pInput,
const char * pList )
externnoexcept

Remove all characters that match those in a list.


The Input string is scanned and every character that is in the pList "C" string will be removed and compacted. The resulting string consists only of characters that are not found in the pList "C" string.

Note
This code is case sensitive.
Parameters
pInputPointer to the "C" string to purge. nullptr will page fault.
pListPointer to the "C" string that contains the characters to remove. Do not pass a nullptr pointer.
See also
Burger::StripAllButList(char*,const char*), Burger::StripLeadingSpaces(char*), Burger::StripTrailingSpaces(char*)

◆ StripLeading()

void BURGER_API Burger::StripLeading ( char * pInput,
const char * pList )
externnoexcept

Remove characters from the beginning of a string.


Starting from the beginning of a string, see if the character is in the supplied list. If so, then the character is removed by copying the rest of the string up. This is repeated until there are no more characters from the list at the beginning of the string or the string is empty.

Note
This code is case sensitive.
Parameters
pInputPointer to the "C" string to remove beginning characters from. Do not pass a nullptr pointer.
pListPointer to the "C" string that contains the characters to remove. Do not pass a nullptr pointer.
See also
Burger::StripLeadingWhiteSpace(char *), Burger::StripTrailingSpaces(char ), Burger::StripLeading(char *,const char *)

◆ StripLeadingAndTrailingSpaces()

void BURGER_API Burger::StripLeadingAndTrailingSpaces ( char * pInput)
externnoexcept

Remove spaces from the beginning and end of a string.


Starting from the beginning of a string, see if the character is a space. If so then the character is removed by copying the rest of the string up. This is repeated until there are no more spaces at the beginning of the string or the string is empty. Then the process is repeated but from the end of the string. The resulting string will not have any space characters at the beginning or the end.

Example: "   Foo" becomes "Foo", "Foo   " becomes "Foo", "   Foo   " becomes "Foo".

Parameters
pInputPointer to the "C" string to remove beginning and ending spaces from. nullptr will page fault.
See also
Burger::StripTrailingSpaces(char *), Burger::StripLeadingSpaces(char *), Burger::StripLeadingAndTrailingWhiteSpace(char *).

◆ StripLeadingAndTrailingWhiteSpace()

void BURGER_API Burger::StripLeadingAndTrailingWhiteSpace ( char * pInput)
externnoexcept

Remove whitespace from the beginning and end of a string.


Starting from the beginning of a string, see if the character is whitespace. If so then the character is removed by copying the rest of the string up. This is repeated until there are no more whitespace at the beginning of the string or the string is empty. Then the process is repeated but from the end of the string. The resulting string will not have any whitespace characters at the beginning or the end.

Example: " \t Foo" becomes "Foo", "Foo \t " becomes "Foo", " \t Foo \t " becomes "Foo".

Parameters
pInputPointer to the "C" string to remove beginning and ending whitespace from. nullptr will page fault.
See also
Burger::StripTrailingWhiteSpace(char *), Burger::StripLeadingWhiteSpace(char *), Burger::StripLeadingAndTrailingSpaces(char *)

◆ StripLeadingSpaces()

void BURGER_API Burger::StripLeadingSpaces ( char * pInput)
externnoexcept

Remove spaces from the beginning of a string.


Starting from the beginning of a string, see if the character is a space (32). If so, then the character is removed by copying the rest of the string up. This is repeated until there are no more spaces at the beginning of the string or the string is empty.

Example: "   Foo" becomes "Foo", "Foo   " remains "Foo   ", "   Foo   " becomes "Foo   ".

Parameters
pInputPointer to the "C" string to remove beginning spaces from. nullptr will page fault.
See also
Burger::StripLeadingWhiteSpace(char *), Burger::StripTrailingSpaces(char ), Burger::StripLeading(char *,const char *).

◆ StripLeadingWhiteSpace()

void BURGER_API Burger::StripLeadingWhiteSpace ( char * pInput)
externnoexcept

Remove whitespace from the beginning of a string.


Starting from the beginning of a string, see if the character is a space or a tab. If so, then the character is removed by copying the rest of the string up. This is repeated until there are no more spaces or tabs at the beginning of the string or the string is empty.

Example: " \t Foo" becomes "Foo", "Foo \t " remains "Foo \t ", " \t Foo \t " becomes "Foo \t ".

Parameters
pInputPointer to the "C" string to remove beginning whitespace from. nullptr will page fault.
See also
Burger::StripLeadingSpaces(char *), Burger::StripTrailingSpaces(char *), Burger::StripLeading(char *,const char *)

◆ StripTrailing()

void BURGER_API Burger::StripTrailing ( char * pInput,
const char * pList )
externnoexcept

Remove characters from the end of a string.


Starting from the end of a string but before the ending zero, see if the character found is inside the string passed in pList. If so, then the character is removed by zeroing it out and the process begins again until the string is empty or a character that is not in the list is found.

Note
This code is case sensitive.
Parameters
pInputPointer to the "C" string to remove ending characters from. Do not pass a nullptr pointer.
pListPointer to the "C" string that contains the characters to remove. Do not pass a nullptr pointer.
See also
Burger::StripAllButList(char *,const char *), Burger::StripLeadingSpaces(char *) or Burger::StripTrailingSpaces(char )

◆ StripTrailingSpaces()

void BURGER_API Burger::StripTrailingSpaces ( char * pInput)
externnoexcept

Remove spaces from the end of a string.


Starting from the end of a string but before the ending zero, see if the last character is a space. If so, then the character is removed by zeroing it out and the process begins again until the string is empty or a non space character is at the end of the "C" string. For speed purposes, only a single zero is ever written to the "C" string. Do not assume that all the spaces that were removed were actually overwritten with zeros.

Example: "   Foo" remains "   Foo", "   Foo" becomes "Foo", "   Foo   " becomes "   Foo".

Parameters
pInputPointer to the "C" string to remove ending spaces from. nullptr will page fault.
See also
Burger::StripTrailingWhiteSpace(char *), Burger::StripLeadingSpaces(char ), Burger::StripTrailing(char *).

◆ StripTrailingWhiteSpace()

void BURGER_API Burger::StripTrailingWhiteSpace ( char * pInput)
externnoexcept

Remove whitespace from the end of a string.


Starting from the end of a string but before the ending zero, see if the last character is a space or tab. If so, then the character is removed by zeroing it out and the process begins again until the string is empty or a non space or tab character is at the end of the "C" string. For speed purposes, only a single zero is ever written to the "C" string. Do not assume that all the spaces and tabs that were removed were actually overwritten with zeros.

Example: " \t Foo" remains " \t Foo", "Foo \t " becomes "Foo", " \t Foo \t " becomes " \t Foo".

Parameters
pInputPointer to the "C" string to remove ending spaces and tabs from. nullptr will page fault.
See also
Burger::StripTrailingSpaces(char *), Burger::StripLeadingSpaces(char *), Burger::StripTrailing(char *,const char*)

◆ swap_chars_to_bytes() [1/2]

void BURGER_API Burger::swap_chars_to_bytes ( void * pInput,
uintptr_t uLength )
externnoexcept

Add 128 to every byte to convert a char to a byte or vice versa.


Given a pointer to an array of bytes, add 128 to every entry

Parameters
pInputPointer to the array to bytes
uLengthNumber of bytes in the array
See also
swap_chars_to_bytes(void*, const void*, uintptr_t)

◆ swap_chars_to_bytes() [2/2]

void BURGER_API Burger::swap_chars_to_bytes ( void * pOutput,
const void * pInput,
uintptr_t uLength )
externnoexcept

Add 128 to every byte to convert a char to a byte or vice versa.


Given a pointer to an array of bytes, add 128 to every entry and store the result into another array of equal or greater size

Parameters
pOutputPointer to the array to receive the converted data
pInputPointer to the array to bytes
uLengthNumber of bytes in the array
See also
swap_chars_to_bytes(void*, uintptr_t)

◆ swap_endian() [1/6]

void BURGER_API Burger::swap_endian ( uint16_t * pInput,
uintptr_t uElements )
externnoexcept

Reverse the endian of an array of 16-bit integers.


Given a pointer to an array of 16-bit integers, swap the endian of every entry

Parameters
pInputPointer to the array to endian swap
uElementsNumber of elements in the array (Not bytes)
See also
swap_endian(uint16_t *,const uint16_t *,uintptr_t)

◆ swap_endian() [2/6]

void BURGER_API Burger::swap_endian ( uint16_t * pOutput,
const uint16_t * pInput,
uintptr_t uElements )
externnoexcept

Reverse the endian of a copied array of 16-bit integers.


Given a pointer to an array of 16-bit integers, swap the endian of every entry and store the result into another array of equal or greater size

Parameters
pOutputPointer to the array to receive the swapped data
pInputPointer to the array to endian swap
uElementsNumber of elements in the array (Not bytes)
See also
swap_endian(uint16_t *,uintptr_t)

◆ swap_endian() [3/6]

void BURGER_API Burger::swap_endian ( uint32_t * pInput,
uintptr_t uElements )
externnoexcept

Reverse the endian of an array of 32-bit integers.


Given a pointer to an array of 32-bit integers, swap the endian of every entry

Parameters
pInputPointer to the array to endian swap
uElementsNumber of elements in the array (Not bytes)
See also
swap_endian(uint32_t *,const uint32_t *,uintptr_t)

◆ swap_endian() [4/6]

void BURGER_API Burger::swap_endian ( uint32_t * pOutput,
const uint32_t * pInput,
uintptr_t uElements )
externnoexcept

Reverse the endian of a copied array of 32-bit integers.


Given a pointer to an array of 32-bit integers, swap the endian of every entry and store the result into another array of equal or greater size

Parameters
pOutputPointer to the array to receive the swapped data
pInputPointer to the array to endian swap
uElementsNumber of elements in the array (Not bytes)
See also
swap_endian(uint32_t *,uintptr_t)

◆ swap_endian() [5/6]

void BURGER_API Burger::swap_endian ( uint64_t * pInput,
uintptr_t uElements )
externnoexcept

Reverse the endian of an array of 64-bit integers.


Given a pointer to an array of 64-bit integers, swap the endian of every entry

Parameters
pInputPointer to the array to endian swap
uElementsNumber of elements in the array (Not bytes)
See also
swap_endian(uint64_t*, const uint64_t *,uintptr_t)

◆ swap_endian() [6/6]

void BURGER_API Burger::swap_endian ( uint64_t * pOutput,
const uint64_t * pInput,
uintptr_t uElements )
externnoexcept

Reverse the endian of a copied array of 64-bit integers.


Given a pointer to an array of 64-bit integers, swap the endian of every entry and store the result into another array of equal or greater size

Parameters
pOutputPointer to the array to receive the swapped data
pInputPointer to the array to endian swap
uElementsNumber of elements in the array (Not bytes)
See also
swap_endian(uint64_t*, uintptr_t)

◆ tls_data_get()

Burger::ThreadLocalStorage_t *BURGER_API Burger::tls_data_get ( void )
externnoexcept

Get Thread Local Storage.


Scan a private linked list for thread storage records and if found, return the pointer to the ThreadLocalStorageRecord_t that is assigned to the currently running thread.

Returns
The ThreadLocalStorageRecord_t pointer or nullptr
See also
tls_data_set(ThreadLocalStorage_t*)

◆ tls_data_get_fallback()

Burger::ThreadLocalStorage_t *BURGER_API Burger::tls_data_get_fallback ( void )
externnoexcept

Scan for Thread Local Storage (Private)


For really old operating systems, or if the Thread Local Storage on the native operating system is full, this function will perform the same task.

Scan a private linked list for thread storage records and if found, return the pointer to the ThreadLocalStorageRecord_t that is assigned to the currently running thread.

Note
This is a private function, call tls_data_get() instead to use the native platform's version.
Returns
The ThreadLocalStorageRecord_t pointer or nullptr
See also
tls_data_set_fallback(ThreadLocalStorage_t*)

◆ tls_data_set()

Burger::eError BURGER_API Burger::tls_data_set ( ThreadLocalStorage_t * pInput)
externnoexcept

Set a Thread Local Storage entry.


Scan a private linked list for thread storage records and if found, set the pointer to the ThreadLocalStorageRecord_t for the currently running thread. If no record was found, allocate a new record and add the data to this new record.

Parameters
pInputPointer to a ThreadLocalStorage_t or nullptr to delete the record if found
Returns
kErrorNone or kErrorOutOfMemory
See also
tls_data_get(void)

◆ tls_data_set_fallback()

Burger::eError BURGER_API Burger::tls_data_set_fallback ( ThreadLocalStorage_t * pInput)
externnoexcept

Set a Thread Local Storage entry (Private)


For really old operating systems, or if the Thread Local Storage on the native operating system is full, this function will perform the same task.

Scan a private linked list for thread storage records and if found, set the pointer to the ThreadLocalStorageRecord_t for the currently running thread. If no record was found, allocate a new record and add the data to this new record.

Note
This is a private function, call tls_data_set(ThreadLocalStorage_t*) instead to use the native platform's version.
Parameters
pInputPointer to a ThreadLocalStorage_t or nullptr to delete the record if found
Returns
kErrorNone or kErrorOutOfMemory
See also
tls_data_get_fallback()

◆ tls_get()

void *BURGER_API Burger::tls_get ( uint32_t uIndex)
externnoexcept

Get thread local storage for current thread.


Every thread is assigned an array of entries for data that is specific to each thread. Given an index that starts with 1, retrieve data stored by a previous call to tls_set(uint32_t, const void*, TLSShutdownProc).

If the index is out of bounds, or no data entry exists for this thread, a nullptr is returned.

Note
A nullptr doesn't always mean an error, it's possible that a previous call to tls_set(uint32_t, const void*, TLSShutdownProc) passed nullptr as the data.
Parameters
uIndexIndex that starts with 1 or higher.
Returns
Previously stored data pointer or nullptr
See also
TLSShutdownProc, tls_set(uint32_t, const void*, TLSShutdownProc)

◆ tls_new_index()

uint32_t BURGER_API Burger::tls_new_index ( void )
externnoexcept

Create a unique index for Thread Local Storage.


Atomically increment a counter and return the value. This value is used as an index to obtain the thread local storage to the thread that possesses the index.

Note
Once assigned, a number cannot be released. As such, don't create and destroy threads, just create the thread and put it to sleep until it's needed again.
Returns
An index starting with 1, and then increments on each call.
See also
tls_get(uint32_t)

◆ tls_release()

void BURGER_API Burger::tls_release ( void )
externnoexcept

Release Thread Local Storage for current thread.


The function will check if there is Thread Local Storage for the currently executing thread and if found, the record will be deleted. If there is any data stored within, the shutdown function will be called to perform any additional cleanup.

See also
TLSShutdownProc, tls_get(uint32_t), or tls_set(uint32_t, const void*, TLSShutdownProc)

◆ tls_set()

Burger::eError BURGER_API Burger::tls_set ( uint32_t uIndex,
const void * pThis,
TLSShutdownProc pShutdown = nullptr )
externnoexcept

Set thread local storage for current thread.


Every thread is assigned an array of entries for data that is specific to each thread. Given an index that starts with 1, set the data pointer and a possible function to be called once the thread has shut down.

If the index is out of bounds for this thread, the internal data structure is grown in size to accomodate the index.

Parameters
uIndexIndex that starts with 1 or higher
pThisPointer to data to store
pShutdownPointer to a shutdown function to call on thread shutdown, can be nullptr
Returns
0 if no error or, kErrorInvalidParameter or kErrorOutOfMemory
See also
TLSShutdownProc, tls_get(uint32_t), or tls_release()

◆ ToLower()

uint32_t Burger::ToLower ( uint32_t uInput)
inlineconstexprnoexcept

Convert a character to lower case.


Using ASCII encoding, check if the value is between 'A' to 'Z' inclusive and if true, convert to 'a' to 'z'.

Parameters
uInputASCII character to convert to lower case
Returns
Character converted to lower case using ASCII encoding
See also
ToUpper(uint32_t)

◆ ToUpper()

uint32_t Burger::ToUpper ( uint32_t uInput)
inlineconstexprnoexcept

Convert a character to upper case.


Using ASCII encoding, check if the value is between 'a' to 'z' inclusive and if true, convert to 'A' to 'Z'.

Parameters
uInputASCII character to convert to upper case
Returns
Character converted to upper case using ASCII encoding
See also
ToLower(uint32_t)

◆ translate_from_UTF8() [1/3]

uintptr_t BURGER_API Burger::translate_from_UTF8 ( char * pOutput,
uintptr_t uOutputSize,
const char * pInput,
const uint8_t pTranslateTable[128][4] )
externnoexcept

Convert a UTF8 stream into a ISOLatin1 "C" string.


Take a "C" string that is using UTF8 encoding and convert it into a ISOLatin1 encoded "C" string. The function will return the size of the string after encoding. This size is valid, even if it exceeded the output buffer size. The output pointer and size can be nullptr to have this routine calculate the size of the possible output so the application can allocate a buffer large enough to hold it.

Note
This function will ensure that the string is always zero terminated, even if truncation is necessary to get it to fit in the output buffer. Under no circumstances will the output buffer be overrun.
Parameters
pOutputPointer to byte buffer to receive the ISOLatin1 encoded string. nullptr is okay if uOutputSize is zero, otherwise it will page fault.
uOutputSizeSize of the output buffer in bytes.
pInputA UTF8 encoded "C" string. nullptr will page fault.
pTranslateTablePointer to a 128 entry code page lookup table that would convert the code page to UTF8 for a reverse lookup.
Returns
Burger::StringLength() of the potential output. It is valid, even if the output buffer wasn't large enough to contain everything.

◆ translate_from_UTF8() [2/3]

uintptr_t BURGER_API Burger::translate_from_UTF8 ( char * pOutput,
uintptr_t uOutputSize,
const char * pInput,
uintptr_t uInputSize,
const uint8_t pTranslateTable[128][4] )
externnoexcept

Convert a UTF8 stream into a ISOLatin1 byte array.


Take a byte array that is using UTF8 encoding and convert it to a ISOLatin1 encoded "C" string. The function will return the size of the string after encoding. This size is valid, even if it exceeded the output buffer size. The output pointer and size can be nullptr to have this routine calculate the size of the possible output so the application can allocate a buffer large enough to hold it.

Note
This function will ensure that the string is always zero terminated, even if truncation is necessary to get it to fit in the output buffer. Under no circumstances will the output buffer be overrun.
Zeros can be encoded into the stream. This function will not early out if a zero was parsed. Zeros will be placed in the ISOLatin1 stream as is.
Parameters
pOutputPointer to a byte buffer to receive the ISOLatin1 string. nullptr is okay if uOutputSize is zero, otherwise a page fault will occur.
uOutputSizeSize of the output buffer in bytes.
pInputUTF8 encoded byte array. nullptr is okay if uInputSize is zero.
uInputSizeSize of the input byte array.
pTranslateTablePointer to a 128 entry code page lookup table that would convert the code page to UTF8 for a reverse lookup.
Returns
Burger::StringLength() of the potential output. It is valid, even if the output buffer wasn't large enough to contain everything.

◆ translate_from_UTF8() [3/3]

uint32_t BURGER_API Burger::translate_from_UTF8 ( const char * pInput,
const uint8_t pTranslateTable[128][4] )
externnoexcept

Translate a single UTF8 stream character into a mapped 8 bit char.


UTF8 can be a maximum of 4 bytes per character. Scan a 128 entry table for a match and if found, return the index + 128 as the mapped code page. This function is used to convert UTF8 to an 8 bit encoding. kInvalid is returned if there is no match.

The table will have 4 bytes per character, with zeros filling all unused entries in case the entry is 2 or 3 values in length.

Note
This function will not return the number of bytes decoded. Use UTF8::NextToken(const char *) to get the pointer to the next UTF8 entry.
Parameters
pInputPointer to UTF8 buffer that contains the 1 to 4 byte buffer to convert. nullptr will page fault.
pTranslateTablePointer to a 128 entry code page lookup table that would convert the code page to UTF8 for a reverse lookup.
Returns
The unsigned 8 bit character code (0x00-0xFF) or CodePage::kInvalid if the UTF8 value wasn't low ASCII and couldn't be mapped to by the translation table.
See also
UTF8::NextToken(const char *), or UTF8::GetTokenSize(const char *)

◆ UnixGetFlavor()

Burger::eUnixFlavor Burger::UnixGetFlavor ( void )
noexcept

Return Linux flavor.

Do some runtime checks to determine the distribution type of Linux. It will check for Cygwin, MSYS, Windows Subsystem for Linux and default to native Linux.

Note
This is only available on unix/posix compatible platforms
Returns
Type of Linux runtime found.
See also
eUnixFlavor

◆ Unpack16ToFloat() [1/2]

float BURGER_API Burger::Unpack16ToFloat ( int16_t iInput)
extern

Decompress a packed floating point number.


Decompress a 16 bit floating point number, assuming that the range is 0.999999 to -0.999999

Use Burger::PackFloatTo16(float) to create the 16 bit value.

The 16 bits are represented in this manner.

val==0 = The value is zero. val&0x8000 = The value is negative. (val&0x7800)>>11 = 4 bit exponent where 0->111 and 15->126. (val&0x7FF) = 11 bit mantissa.

Parameters
iInput16 bit representation of a floating point number.
Returns
Input decompressed into a true 32 bit float.
See also
Burger::PackFloatTo16(float), Burger::Unpack16ToFloat(int16_t,uint32_t) or Burger::PackFloatTo16(float,uint32_t).

◆ Unpack16ToFloat() [2/2]

float BURGER_API Burger::Unpack16ToFloat ( int16_t iInput,
uint32_t uBaseExponent )
extern

Decompress a packed floating point number with a supplied base exponent.


Decompress a 16 bit floating point number, assuming that the minimum exponent is the one supplied. For 0.999999 you should supply the exponent value of 111. This number must match the value used to compress the value in the first place. This function exists so that floating point compression can scale to different ranges.

Use Burger::PackFloatTo16(float,uint32_t) to create the 16 bit value.

The 16 bits are represented in this manner.

val==0 = The value is zero. val&0x8000 = The value is negative. (val&0x7800)>>11 = 4 bit exponent where 0->111 and 15->126. (val&0x7FF) = 11 bit mantissa.

Parameters
iInput16 bit representation of a floating point number.
uBaseExponentMinimum exponent, should match the value used to apply compression (111 is used for a max value of 0.999999).
Returns
Input decompressed into a true 32 bit float.
See also
Burger::PackFloatTo16(float), Burger::Unpack16ToFloat(int16_t) or Burger::PackFloatTo16(float,uint32_t).

◆ UnpackBytes()

uintptr_t BURGER_API Burger::UnpackBytes ( const uint8_t * pInput,
uintptr_t uInputLength,
uint8_t ** ppOutput,
uintptr_t * pOutputLength )
extern

Decompress data compressed with PackBytes from the Apple IIgs.


This routine will decompress data compressed by the algorithm used by PackBytes() from the Apple IIgs. This function is almost a drop in replacement, with the exception that the handle to the source data is replaced with a pointer and remaining bytes.

The value returned is the number of input bytes consumed, or zero if an error occurred.

Parameters
pInputPointer to the compressed data
uInputLengthNumber of bytes of compressed data
ppOutputPointer to the uint8_t buffer to receive the decompressed data
pOutputLengthPointer to the number of compressed packets to decompress
Returns
Zero on error, or number of compressed bytes consumed

◆ Upload() [1/2]

uint_t BURGER_API Burger::Upload ( IDirectSoundBuffer * pBuffer,
uintptr_t uOffset,
const uint8_t * pInput,
uintptr_t uInputLength )
extern

Upload sound data into a DirectSoundBuffer.


Given a buffer, lock the DirectSoundBuffer and upload the raw data into it. If the DirectSoundBuffer was lost, attempt to restore it and the upload the data.

Note
This function will handle buffer wraparound
This is only available on Windows
Parameters
pBufferPointer to a DirectSoundBuffer
uOffsetOffset into the start of the buffer
pInputPointer to the data to upload
uInputLengthNumber of bytes to upload
Returns
Zero if successful, HRESULT from DirectSound for any error

◆ Upload() [2/2]

uint_t BURGER_API Burger::Upload ( IDirectSoundBuffer * pBuffer,
uintptr_t uOffset,
SoundManager::BufferDecoder * pBufferDecoder,
uintptr_t uInputLength )
extern

Upload compressed sound data into a DirectSoundBuffer.


Given a buffer, lock the DirectSoundBuffer, decompress data from the compressed stream and upload the newly decompressed data into the DirectSoundBuffer. If the DirectSoundBuffer was lost, attempt to restore it and the upload the data.

Note
This function will handle buffer wraparound
This is only available on Windows
Parameters
pBufferPointer to a DirectSoundBuffer
uOffsetOffset into the start of the buffer
pBufferDecoderPointer to the compressed data stream to decode from
uInputLengthNumber of bytes to upload
Returns
Zero if successful, HRESULT from DirectSound for any error

◆ Wildcardcmp()

uint_t BURGER_API Burger::Wildcardcmp ( const char * pInput,
const char * pWildcard )
externnoexcept

Perform a string comparison using the wild card system.


An asterisk "*" denotes that the input is skipped until the character following is found, then the compare continues. If a "*" is the final character, then the input string is considered a match.

A question mark "?" denotes that a single, non-zero character must occupy this location.

Examples for wild cards: .* = All strings that have a single period anywhere in them. = All strings match. .??? = All strings that have a exactly three characters at the end after a period.

Note
Comparisons are case insensitive.
Parameters
pInputPointer to a "C" string to compare against. nullptr will page fault.
pWildcardPointer to a "C" string that has wild card information. nullptr will page fault.
Returns
FALSE if the string matches according to the wild card rules, TRUE if not.
See also
HasWildcard(const char*)

◆ WriteBig() [1/5]

uint_t BURGER_API Burger::WriteBig ( FILE * fp,
double dInput )
extern

Write a big endian 64-bit float to a file.


Given an ANSI FILE *, write a 64-bit float in big endian format into the file stream.

Parameters
fpFILE * to the stream to write to.
dInputData to write.
Returns
Zero if no error, "errno" on error
See also
WriteLittle(FILE *,double) or WriteBig(FILE *,float)

◆ WriteBig() [2/5]

uint_t BURGER_API Burger::WriteBig ( FILE * fp,
float fInput )
extern

Write a big endian 32-bit float to a file.


Given an ANSI FILE *, write a 32-bit float in big endian format into the file stream.

Parameters
fpFILE * to the stream to write to.
fInputData to write.
Returns
Zero if no error, "errno" on error
See also
WriteLittle(FILE *,float) or WriteBig(FILE *,double)

◆ WriteBig() [3/5]

uint_t BURGER_API Burger::WriteBig ( FILE * fp,
uint16_t uInput )
extern

Write a big endian 16-bit integer to a file.


Given an ANSI FILE *, write a 16-bit integer in big endian format into the file stream.

Parameters
fpFILE * to the stream to write to.
uInputData to write.
Returns
Zero if no error, "errno" on error
See also
WriteLittle(FILE *,uint16_t), WriteBig(FILE *,uint32_t) and WriteBig(FILE ,uint64_t)

◆ WriteBig() [4/5]

uint_t BURGER_API Burger::WriteBig ( FILE * fp,
uint32_t uInput )
extern

Write a big endian 32-bit integer to a file.


Given an ANSI FILE *, write a 32-bit integer in big endian format into the file stream.

Parameters
fpFILE * to the stream to write to.
uInputData to write.
Returns
Zero if no error, "errno" on error
See also
WriteLittle(FILE *,uint32_t), WriteBig(FILE *,uint16_t) and WriteBig(FILE ,uint64_t)

◆ WriteBig() [5/5]

uint_t BURGER_API Burger::WriteBig ( FILE * fp,
uint64_t uInput )
extern

Write a big endian 64-bit integer to a file.


Given an ANSI FILE *, write a 64-bit integer in big endian format into the file stream.

Parameters
fpFILE * to the stream to write to.
uInputData to write.
Returns
Zero if no error, "errno" on error
See also
WriteLittle(FILE *,uint64_t), WriteBig(FILE *,uint16_t) and WriteBig(FILE ,uint32_t)

◆ WriteCString()

uint_t BURGER_API Burger::WriteCString ( FILE * fp,
const char * pInput )
extern

Write a "C" string with the terminating zero to a file stream.


Given an ANSI FILE *, write a "C" string with a terminating zero into the file stream.

Parameters
fpFILE * to the stream to write to.
pInputPointer to a "C" string to write.
Returns
Zero if no error, "errno" on error
See also
read_c_string(FILE *,char *,uintptr_t)

◆ WriteLittle() [1/5]

uint_t BURGER_API Burger::WriteLittle ( FILE * fp,
double dInput )
extern

Write a little endian 64-bit float to a file.


Given an ANSI FILE *, write a 64-bit float in little endian format into the file stream.

Parameters
fpFILE * to the stream to write to.
dInputData to write.
Returns
Zero if no error, "errno" on error
See also
WriteBig(FILE *,double) or WriteLittle(FILE *,float)

◆ WriteLittle() [2/5]

uint_t BURGER_API Burger::WriteLittle ( FILE * fp,
float fInput )
extern

Write a little endian 32-bit float to a file.


Given an ANSI FILE *, write a 32-bit float in little endian format into the file stream.

Parameters
fpFILE * to the stream to write to.
fInputData to write.
Returns
Zero if no error, "errno" on error
See also
WriteBig(FILE *,float) or WriteLittle(FILE *,double)

◆ WriteLittle() [3/5]

uint_t BURGER_API Burger::WriteLittle ( FILE * fp,
uint16_t uInput )
extern

Write a little endian 16-bit integer to a file.


Given an ANSI FILE *, write a 16-bit integer in little endian format into the file stream.

Parameters
fpFILE * to the stream to write to.
uInputData to write.
Returns
Zero if no error, "errno" on error
See also
WriteBig(FILE *,uint16_t), WriteLittle(FILE *,uint32_t) and WriteLittle(FILE ,uint64_t)

◆ WriteLittle() [4/5]

uint_t BURGER_API Burger::WriteLittle ( FILE * fp,
uint32_t uInput )
extern

Write a little endian 32-bit integer to a file.


Given an ANSI FILE *, write a 32-bit integer in little endian format into the file stream.

Parameters
fpFILE * to the stream to write to.
uInputData to write.
Returns
Zero if no error, "errno" on error
See also
WriteBig(FILE *,uint32_t), WriteLittle(FILE *,uint16_t) and WriteLittle(FILE ,uint64_t)

◆ WriteLittle() [5/5]

uint_t BURGER_API Burger::WriteLittle ( FILE * fp,
uint64_t uInput )
extern

Write a little endian 64-bit integer to a file.


Given an ANSI FILE *, write a 64-bit integer in little endian format into the file stream.

Parameters
fpFILE * to the stream to write to.
uInputData to write.
Returns
Zero if no error, "errno" on error
See also
WriteBig(FILE *,uint64_t), WriteLittle(FILE *,uint16_t) and WriteLittle(FILE ,uint32_t)

◆ XInputGetGamepadState()

uint_t BURGER_API Burger::XInputGetGamepadState ( uint_t uWhich,
XInputGamePad_t * pXInputGamePad,
eXInputDeadZoneType uDeadZoneType = XINPUTDEADZONE_NONE )
externnoexcept

Read a controller using XInput.


If XInput is available, this function will read in the data from a gamepad controller.

The XInputGamePad_t structure is assumed to be persistent and initialized by the application to zero before calling this function with the data. The function will maintain state using the contents of the XInputGamePad_t structure during successive calls. Calling this function with an XInputGamePad_t structure that had never been initially filled with zeros will yield undefined behavior.

Note
This is only available on Windows
Parameters
uWhichWhich controller to read, 0-3 are valid
pXInputGamePadPointer to a structure that will receive the state.
uDeadZoneTypeType of post processing on the raw thumbstick data.
Returns
Zero if no error. Any other value means an error occurred, ERROR_CALL_NOT_IMPLEMENTED means XInput was not found

◆ XInputStopRumbleOnAllControllers()

uint_t BURGER_API Burger::XInputStopRumbleOnAllControllers ( void )
externnoexcept

Turn off rumbling on XInput managed controllers.


If XInput is available, this function will clear the vibration state to off on all four controllers.

This function is useful when the application is exiting or entering pause mode

Note
This is only available on Windows
Returns
Zero if no error. Any other value means an error occurred, ERROR_CALL_NOT_IMPLEMENTED means XInput was not found

Variable Documentation

◆ g_AsciiTestTable

const uint8_t Burger::g_AsciiTestTable
extern

Table to quickly determine the type of low ASCII character.


This table is used for code to quickly determine if an ASCII code from 0 to 127 is upper case, lower case, whitespace, etc.

Entries 128-255 are all zeros, because they are escape codes for UTF-8 lookup

See also
eASCIITypeFlag

◆ g_AsciiToWord8Table

const uint8_t Burger::g_AsciiToWord8Table
extern

Table to convert ASCII characters into nibbles (0-15).


This table is used for code to quickly map the ASCII values of '0'-'9', 'A'-'F' and 'a'-'f' into the hex digits 0x00-0x0F.

◆ g_CRLFString

const char Burger::g_CRLFString = {'\r', '\n', 0}
extern

"\r\n"


This string is hard coded to have the Win32 CR/LF EOL string. It saves space by having a singular occurrence.

◆ g_CRLFString16

const uint16_t Burger::g_CRLFString16 = {'\r', '\n', 0}
extern

"\r\n" in UTF16


This string is hard coded to have the Win32 CR/LF EOL string. It saves space by having a singular occurrence.

◆ g_CRString

const char Burger::g_CRString = {'\r', 0}
extern

"\r"


This string is hard coded to have the MacOS CR EOL string. It saves space by having a singular occurrence.

◆ g_CRString16

const uint16_t Burger::g_CRString16 = {'\r', 0}
extern

"\r" in UTF16


This string is hard coded to have the MacOS CR EOL string. It saves space by having a singular occurrence.

◆ g_d1Div255

const Burger::uint64_double_t Burger::g_d1Div255 = {0x3F70101010101010ULL}
extern

Constant for 1.0/255.0 in the double format.

◆ g_d1Div3

const Burger::uint64_double_t Burger::g_d1Div3 = {0x3FD5555555555555ULL}
extern

Constant for 1.0/3.0 in the double format.

◆ g_d2Div3

const Burger::uint64_double_t Burger::g_d2Div3 = {0x447696695DBD1CC3ULL}
extern

Constant for 2.0/3.0 in the double format.

◆ g_d65536

const Burger::uint64_double_t Burger::g_d65536 = {0x40f0000000000000ULL}
extern

Constant for 65536.0 in the double format.

◆ g_dCosPiDiv6

const Burger::uint64_double_t Burger::g_dCosPiDiv6 = {0x3FEBB67AE8584CABULL}
extern

Constant for get_cosine(Pi/6.0) in the double format.

◆ g_dDegreesToRadians

const Burger::uint64_double_t Burger::g_dDegreesToRadians
extern
Initial value:
= {
0x3F91DF46A2529D39ULL}

Constant for Pi/180 in the double format.

◆ g_dEpsilon

const Burger::uint64_double_t Burger::g_dEpsilon = {0x3CB0000000000000ULL}
extern

Constant for Epsilon in the double format.

◆ g_dHalf

const Burger::uint64_double_t Burger::g_dHalf = {0x3FE0000000000000ULL}
extern

Constant for 0.5 in the double format.

◆ g_dHalfPi

const Burger::uint64_double_t Burger::g_dHalfPi = {0x3FF921FB54442D18ULL}
extern

Constant for Pi*0.5 in the double format.

◆ g_dInf

const Burger::uint64_double_t Burger::g_dInf = {0x7FF0000000000000ULL}
extern

Constant for Infinity in the double format.

◆ g_dLN10

const Burger::uint64_double_t Burger::g_dLN10 = {0x40026BB1BBB55516ULL}
extern

Constant for ln(10) in the double format.

◆ g_dLN2

const Burger::uint64_double_t Burger::g_dLN2 = {0x3FE62E42FEFA39EFULL}
extern

Constant for ln(2) in the double format.

◆ g_dMax

const Burger::uint64_double_t Burger::g_dMax = {0x7FEFFFFFFFFFFFFFULL}
extern

Constant for the largest number in the double format.

◆ g_dMin

const Burger::uint64_double_t Burger::g_dMin = {0x0010000000000000ULL}
extern

Constant for the smallest number (Non-zero) in the double format.

◆ g_dMinNoInteger

const Burger::uint64_double_t Burger::g_dMinNoInteger = {0x4330000000000000ULL}
extern

Constant for the smallest number that cannot have a fraction 4503599627370496.0.

◆ g_dNan

const Burger::uint64_double_t Burger::g_dNan = {0x7FF7FFFFFFFFFFFFULL}
extern

Constant for signaling Not a Number (NaN) in the double format.

◆ g_dNegCosPiDiv6

const Burger::uint64_double_t Burger::g_dNegCosPiDiv6 = {0xBFEBB67AE8584CABULL}
extern

Constant for -get_cosine(Pi/6.0) in the double format.

◆ g_dNegDegreesToRadians

const Burger::uint64_double_t Burger::g_dNegDegreesToRadians
extern
Initial value:
= {
0xBF91DF46A2529D39ULL}

Constant for -Pi/180 in the double format.

◆ g_dNegEpsilon

const Burger::uint64_double_t Burger::g_dNegEpsilon = {0xBCB0000000000000ULL}
extern

Constant for negative Epsilon in the double format.

◆ g_dNegHalf

const Burger::uint64_double_t Burger::g_dNegHalf = {0xBFE0000000000000ULL}
extern

Constant for -0.5 in the double format.

◆ g_dNegHalfPi

const Burger::uint64_double_t Burger::g_dNegHalfPi = {0xBFF921FB54442D18ULL}
extern

Constant for -Pi*0.5 in the double format.

◆ g_dNegInf

const Burger::uint64_double_t Burger::g_dNegInf = {0xFFF0000000000000ULL}
extern

Constant for -Infinity in the double format.

◆ g_dNegLN10

const Burger::uint64_double_t Burger::g_dNegLN10 = {0xC0026BB1BBB55516ULL}
extern

Constant for -ln(10) in the double format.

◆ g_dNegLN2

const Burger::uint64_double_t Burger::g_dNegLN2 = {0xBFE62E42FEFA39EFULL}
extern

Constant for -ln(2) in the double format.

◆ g_dNegMax

const Burger::uint64_double_t Burger::g_dNegMax = {0xFFEFFFFFFFFFFFFFULL}
extern

Constant for the negative largest number in the double format.

◆ g_dNegMin

const Burger::uint64_double_t Burger::g_dNegMin = {0x8010000000000000ULL}
extern

Constant for the negative smallest number (Non-zero) in the double format.

◆ g_dNegMinNoInteger

const Burger::uint64_double_t Burger::g_dNegMinNoInteger
extern
Initial value:
= {
0xC330000000000000ULL}

Constant for the negative smallest number that cannot have a fraction -4503599627370496.0.

◆ g_dNegNan

const Burger::uint64_double_t Burger::g_dNegNan = {0xFFF7FFFFFFFFFFFFULL}
extern

Constant for negative signaling Not a Number (NaN) in the double format.

◆ g_dNegOne

const Burger::uint64_double_t Burger::g_dNegOne = {0xBFF0000000000000ULL}
extern

Constant for -1.0 in the double format.

◆ g_dNegPi

const Burger::uint64_double_t Burger::g_dNegPi = {0xC00921FB54442D18ULL}
extern

Constant for -Pi in the double format.

◆ g_dNegPi2

const Burger::uint64_double_t Burger::g_dNegPi2 = {0xC01921FB54442D18ULL}
extern

Constant for -Pi*2 in the double format.

◆ g_dNegPi4

const Burger::uint64_double_t Burger::g_dNegPi4 = {0xC02921FB54442D18ULL}
extern

Constant for -Pi*4 in the double format.

◆ g_dNegQNan

const Burger::uint64_double_t Burger::g_dNegQNan = {0xFFFFFFFFFFFFFFFFULL}
extern

Constant for negative non signaling Not a Number (Nan) in the double format.

◆ g_dNegQuarterPi

const Burger::uint64_double_t Burger::g_dNegQuarterPi = {0xBFE921FB54442D18ULL}
extern

Constant for -Pi*0.25 in the double format.

◆ g_dNegRadiansToDegrees

const Burger::uint64_double_t Burger::g_dNegRadiansToDegrees
extern
Initial value:
= {
0xC04CA5DC1A63C1F8ULL}

Constant for -180/Pi in the double format.

◆ g_dNegReciprocalHalfPi

const Burger::uint64_double_t Burger::g_dNegReciprocalHalfPi
extern
Initial value:
= {
0xBFE45F306DC9C883ULL}

Constant for -1/(Pi*0.5) in the double format.

◆ g_dNegReciprocalPi

const Burger::uint64_double_t Burger::g_dNegReciprocalPi
extern
Initial value:
= {
0xBFD45F306DC9C883ULL}

Constant for -1/Pi in the double format.

◆ g_dNegReciprocalPi2

const Burger::uint64_double_t Burger::g_dNegReciprocalPi2
extern
Initial value:
= {
0xBFC45F306DC9C883ULL}

Constant for -1/(Pi*2) in the double format.

◆ g_dNegSqrt2

const Burger::uint64_double_t Burger::g_dNegSqrt2 = {0xBFF6A09E667F3BCDULL}
extern

Constant for -sqrt(2) in the double format.

◆ g_dNegZero

const Burger::uint64_double_t Burger::g_dNegZero = {0x8000000000000000ULL}
extern

Constant for -0.0 in the double format.

◆ g_dOne

const Burger::uint64_double_t Burger::g_dOne = {0x3FF0000000000000ULL}
extern

Constant for 1.0 in the double format.

◆ g_dPi

const Burger::uint64_double_t Burger::g_dPi = {0x400921FB54442D18ULL}
extern

Constant for Pi in the double format.

◆ g_dPi2

const Burger::uint64_double_t Burger::g_dPi2 = {0x401921FB54442D18ULL}
extern

Constant for Pi*2 in the double format.

◆ g_dPi4

const Burger::uint64_double_t Burger::g_dPi4 = {0x402921FB54442D18ULL}
extern

Constant for Pi*4 in the double format.

◆ g_dQNan

const Burger::uint64_double_t Burger::g_dQNan = {0x7FFFFFFFFFFFFFFFULL}
extern

Constant for non signaling Not a Number (Nan) in the double format.

◆ g_dQuarterPi

const Burger::uint64_double_t Burger::g_dQuarterPi = {0x3FE921FB54442D18ULL}
extern

Constant for Pi*0.25 in the double format.

◆ g_dRadiansToDegrees

const Burger::uint64_double_t Burger::g_dRadiansToDegrees
extern
Initial value:
= {
0x404CA5DC1A63C1F8ULL}

Constant for 180/Pi in the double format.

◆ g_dReciprocalHalfPi

const Burger::uint64_double_t Burger::g_dReciprocalHalfPi
extern
Initial value:
= {
0x3FE45F306DC9C883ULL}

Constant for 1/(Pi*0.5) in the double format.

◆ g_dReciprocalPi

const Burger::uint64_double_t Burger::g_dReciprocalPi = {0x3FD45F306DC9C883ULL}
extern

Constant for 1/Pi in the double format.

◆ g_dReciprocalPi2

const Burger::uint64_double_t Burger::g_dReciprocalPi2
extern
Initial value:
= {
0x3FC45F306DC9C883ULL}

Constant for 1/(Pi*2) in the double format.

◆ g_dSqrt2

const Burger::uint64_double_t Burger::g_dSqrt2 = {0x3FF6A09E667F3BCDULL}
extern

Constant for sqrt(2) in the double format.

◆ g_dZero

const Burger::uint64_double_t Burger::g_dZero = {0x0000000000000000ULL}
extern

Constant for 0.0 in the double format.

◆ g_Effect2DDefaultVertexBufferDescription

const Burger::VertexBuffer::VertexAoS_t Burger::g_Effect2DDefaultVertexBufferDescription
extern
Initial value:
= {
g_Vertices2DQuad,sizeof(g_Vertices2DQuad),
NULL,0,
}
@ FLAGAOS_DONTCOPY_VERTICES
For VertexAoS_t, the m_pVertexArray entry is persistent, don't copy it.
Definition burger.h:20488
@ FLAGAOS_DONTCOPY_MEMBERS
For VertexAoS_t, the m_pMembers entry is persistent, don't copy it.
Definition burger.h:20490
const uint_t g_Effect2DMemberDescription[]
Vertex description for Effect2D 2 entries for position 2 entries for UV.
Definition breffect2d.cpp:93

Describe the location for Effect2D.


◆ g_Effect2DMemberDescription

const uint_t Burger::g_Effect2DMemberDescription
extern
Initial value:
= {
}
@ USAGE_POSITION
Data type is a position.
Definition burger.h:20473
@ USAGE_TEXCOORD
Data type is a texture coordinate.
Definition burger.h:20478
@ USAGE_END
End of the data.
Definition burger.h:20494
@ USAGE_FLOAT2
Data chunks is 2 floats.
Definition burger.h:20468

Vertex description for Effect2D 2 entries for position 2 entries for UV.


◆ g_EmptyString

const char Burger::g_EmptyString = {0}
extern

"" This string is hard coded to be an empty string. It saves space by having a singular occurrence.


◆ g_EmptyString16

const uint16_t Burger::g_EmptyString16 = {0}
extern

"" in UTF16


This string is hard coded to be an empty string. It saves space by having a singular occurrence.

◆ g_f1Div255

const Burger::uint32_float_t Burger::g_f1Div255 = {0x3B808081}
extern

Constant for 1.0f/255.f in the float format.

◆ g_f1Div3

const Burger::uint32_float_t Burger::g_f1Div3 = {0x3EAAAAAB}
extern

Constant for 1.0f/3.f in the float format.

◆ g_f2Div3

const Burger::uint32_float_t Burger::g_f2Div3 = {0x3F2AAAAB}
extern

Constant for 2.0f/3.f in the float format.

◆ g_f65536

const Burger::uint32_float_t Burger::g_f65536 = {0x47800000}
extern

Constant for 65536.f in the float float.

◆ g_FalseString

const char Burger::g_FalseString = {'f', 'a', 'l', 's', 'e', 0}
extern

"false"


This string is hard coded to have the string "false". It saves space by having a singular occurrence.

◆ g_FalseString16

const uint16_t Burger::g_FalseString16 = {'f', 'a', 'l', 's', 'e', 0}
extern

"false" in UTF16


This string is hard coded to have the string "false". It saves space by having a singular occurrence.

◆ g_fCosPiDiv6

const Burger::uint32_float_t Burger::g_fCosPiDiv6 = {0x3F5DB3D7}
extern

Constant for get_cosine(Pi/6.0) in the float format.

◆ g_fDegreesToRadians

const Burger::uint32_float_t Burger::g_fDegreesToRadians = {0x3C8EFA35}
extern

Constant for Pi/180 in the float format.

◆ g_fEpsilon

const Burger::uint32_float_t Burger::g_fEpsilon = {0x34000000U}
extern

Constant for Epsilon in the float format.

◆ g_fHalf

const Burger::uint32_float_t Burger::g_fHalf = {0x3F000000U}
extern

Constant for 0.5f in the float format.

◆ g_fHalfPi

const Burger::uint32_float_t Burger::g_fHalfPi = {0x3FC90FDB}
extern

Constant for Pi*0.5f in the float format.

◆ g_fInf

const Burger::uint32_float_t Burger::g_fInf = {0x7F800000U}
extern

Constant for Infinity in the float format.

◆ g_fLN10

const Burger::uint32_float_t Burger::g_fLN10 = {0x40135D8E}
extern

Constant for ln(10) in the float format.

◆ g_fLN2

const Burger::uint32_float_t Burger::g_fLN2 = {0x3F317218}
extern

Constant for ln(2) in the float format.

◆ g_fMax

const Burger::uint32_float_t Burger::g_fMax = {0x7F7FFFFFU}
extern

Constant for largest number in the float format.

◆ g_fMin

const Burger::uint32_float_t Burger::g_fMin = {0x00800000U}
extern

Constant for smallest number (Non-zero) in the float format.

◆ g_fMinNoInteger

const Burger::uint32_float_t Burger::g_fMinNoInteger = {0x4B000000}
extern

Constant for the smallest number that cannot have a fraction 8388608.0f.

◆ g_fNan

const Burger::uint32_float_t Burger::g_fNan = {0x7FBFFFFFU}
extern

Constant for signaling Not a Number (NaN) in the float format.

◆ g_fNegCosPiDiv6

const Burger::uint32_float_t Burger::g_fNegCosPiDiv6 = {0xBF5DB3D7}
extern

Constant for -get_cosine(Pi/6.0) in the float format.

◆ g_fNegDegreesToRadians

const Burger::uint32_float_t Burger::g_fNegDegreesToRadians = {0xBC8EFA35}
extern

Constant for -Pi/180 in the float format.

◆ g_fNegEpsilon

const Burger::uint32_float_t Burger::g_fNegEpsilon = {0xB4000000U}
extern

Constant for negative Epsilon in the float format.

◆ g_fNegHalf

const Burger::uint32_float_t Burger::g_fNegHalf = {0xBF000000U}
extern

Constant for -0.5f in the float format.

◆ g_fNegHalfPi

const Burger::uint32_float_t Burger::g_fNegHalfPi = {0xBFC90FDB}
extern

Constant for -Pi*0.5f in the float format.

◆ g_fNegInf

const Burger::uint32_float_t Burger::g_fNegInf = {0xFF800000U}
extern

Constant for -Infinity in the float format.

◆ g_fNegLN10

const Burger::uint32_float_t Burger::g_fNegLN10 = {0xC0135D8E}
extern

Constant for -ln(10) in the float format.

◆ g_fNegLN2

const Burger::uint32_float_t Burger::g_fNegLN2 = {0xBF317218}
extern

Constant for -ln(2) in the float format.

◆ g_fNegMax

const Burger::uint32_float_t Burger::g_fNegMax = {0xFF7FFFFFU}
extern

Constant for negative largest number in the float format.

◆ g_fNegMin

const Burger::uint32_float_t Burger::g_fNegMin = {0x80800000U}
extern

Constant for negative smallest number (Non-zero) in the float format.

◆ g_fNegMinNoInteger

const Burger::uint32_float_t Burger::g_fNegMinNoInteger = {0xCB000000}
extern

Constant for the negative smallest number that cannot have a fraction -8388608.0f.

◆ g_fNegNan

const Burger::uint32_float_t Burger::g_fNegNan = {0xFFBFFFFFU}
extern

Constant for negative signaling Not a Number (NaN) in the float format.

◆ g_fNegOne

const Burger::uint32_float_t Burger::g_fNegOne = {0xBF800000U}
extern

Constant for -1.0f in the float format.

◆ g_fNegPi

const Burger::uint32_float_t Burger::g_fNegPi = {0xC0490FDB}
extern

Constant for -Pi in the float format.

◆ g_fNegPi2

const Burger::uint32_float_t Burger::g_fNegPi2 = {0xC0C90FDB}
extern

Constant for -Pi*2 in the float format.

◆ g_fNegPi4

const Burger::uint32_float_t Burger::g_fNegPi4 = {0xC1490FDB}
extern

Constant for -Pi*4 in the float format.

◆ g_fNegQNan

const Burger::uint32_float_t Burger::g_fNegQNan = {0xFFFFFFFFU}
extern

Constant for negative non signaling Not a Number in the float format.

◆ g_fNegQuarterPi

const Burger::uint32_float_t Burger::g_fNegQuarterPi = {0xBF490FDB}
extern

Constant for -Pi*0.25f in the float format.

◆ g_fNegRadiansToDegrees

const Burger::uint32_float_t Burger::g_fNegRadiansToDegrees = {0xC2652EE1}
extern

Constant for -180/Pi in the float format.

◆ g_fNegReciprocalHalfPi

const Burger::uint32_float_t Burger::g_fNegReciprocalHalfPi = {0xBF22F983}
extern

Constant for -1/(Pi*0.5f) in the float format.

◆ g_fNegReciprocalPi

const Burger::uint32_float_t Burger::g_fNegReciprocalPi = {0xBEA2F983}
extern

Constant for -1/Pi in the float format.

◆ g_fNegReciprocalPi2

const Burger::uint32_float_t Burger::g_fNegReciprocalPi2 = {0xBE22F983}
extern

Constant for -1/(Pi*2.0f) in the float format.

◆ g_fNegSqrt2

const Burger::uint32_float_t Burger::g_fNegSqrt2 = {0xBFB504F3}
extern

Constant for -sqrt(2) in the float format.

◆ g_fNegZero

const Burger::uint32_float_t Burger::g_fNegZero = {0x80000000U}
extern

Constant for -0.0f in the float format.

◆ g_fOne

const Burger::uint32_float_t Burger::g_fOne = {0x3F800000U}
extern

Constant for 1.0f in the float format.

◆ g_fPi

const Burger::uint32_float_t Burger::g_fPi = {0x40490FDB}
extern

Constant for Pi in the float format.

◆ g_fPi2

const Burger::uint32_float_t Burger::g_fPi2 = {0x40C90FDB}
extern

Constant for Pi*2 in the float format.

◆ g_fPi4

const Burger::uint32_float_t Burger::g_fPi4 = {0x41490FDB}
extern

Constant for Pi*4 in the float format.

◆ g_fQNan

const Burger::uint32_float_t Burger::g_fQNan = {0x7FFFFFFFU}
extern

Constant for non signaling Not a Number (Nan) in the float format.

◆ g_fQuarterPi

const Burger::uint32_float_t Burger::g_fQuarterPi = {0x3F490FDB}
extern

Constant for Pi*0.25f in the float format.

◆ g_fRadiansToDegrees

const Burger::uint32_float_t Burger::g_fRadiansToDegrees = {0x42652EE1}
extern

Constant for 180/Pi in the float format.

◆ g_fReciprocalHalfPi

const Burger::uint32_float_t Burger::g_fReciprocalHalfPi = {0x3F22F983}
extern

Constant for 1/(Pi*0.5f) in the float format.

◆ g_fReciprocalPi

const Burger::uint32_float_t Burger::g_fReciprocalPi = {0x3EA2F983}
extern

Constant for 1/Pi in the float format.

◆ g_fReciprocalPi2

const Burger::uint32_float_t Burger::g_fReciprocalPi2 = {0x3E22F983}
extern

Constant for 1/(Pi*2.0f) in the float format.

◆ g_fSqrt2

const Burger::uint32_float_t Burger::g_fSqrt2 = {0x3FB504F3}
extern

Constant for sqrt(2) in the float format.

◆ g_fZero

const Burger::uint32_float_t Burger::g_fZero = {0x00000000U}
extern

Constant for 0.0f in the float format.

◆ g_glColor

const char Burger::g_glColor[6]
extern

(OpenGL only) "Color"

◆ g_glDiffuseTexture

const char Burger::g_glDiffuseTexture[15]
extern

(OpenGL only) "DiffuseTexture"

◆ g_glPosition

const char Burger::g_glPosition[9]
extern

(OpenGL only) "Position"

◆ g_glTexcoord

const char Burger::g_glTexcoord[9]
extern

(OpenGL only) "Texcoord"

◆ g_glViewProjectionMatrix

const char Burger::g_glViewProjectionMatrix[21]
extern

(OpenGL only) "ViewProjectionMatrix"

◆ g_glXYWidthHeight

const char Burger::g_glXYWidthHeight[14]
extern

(OpenGL only) "XYWidthHeight"

◆ g_GUID_zero

const GUID Burger::g_GUID_zero
extern
Initial value:
= {0x00000000, 0x0000, 0x0000,
{0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00}}

Empty GUID.


A GUID where all values are zero

◆ g_LFString

const char Burger::g_LFString = {'\n', 0}
extern

"\n"


This string is hard coded to have the Linux/Unix LF EOL string. It saves space by having a singular occurrence.

◆ g_LFString16

const uint16_t Burger::g_LFString16 = {'\n', 0}
extern

"\n" in UTF16


This string is hard coded to have the Linux/Unix LF EOL string. It saves space by having a singular occurrence.

◆ g_Matrix3DIdentity

const Burger::Matrix3D_t Burger::g_Matrix3DIdentity
extern
Initial value:
= {
{1.0f,0.0f,0.0f},
{0.0f,1.0f,0.0f},
{0.0f,0.0f,1.0f}
}

Constant 3x3 identity matrix.


◆ g_Months

const char * Burger::g_Months
extern
Initial value:
= {"January", "February", "March", "April",
"May", "June", "July", "August", "September", "October", "November",
"December"}

Months of the year.


An array of twelve strings for the twelve months of the year. Each string is capitalized so they are "January", "February", etc...

◆ g_MP3DCT12Constants

const Burger::uint32_float_t Burger::g_MP3DCT12Constants
extern
Initial value:
= {
{0x3F0483EE},{0x3F3504F3},{0x3FF746EA}
}

MP3 Layer 3 table for 0.5 / cos((Burger::g_dPi * (i*2+1)) / 12.0)


See also
MP3DCT12(float *,float *,float *,const float *,const float *)

◆ g_MP3DCT36Constants

const Burger::uint32_float_t Burger::g_MP3DCT36Constants
extern
Initial value:
= {
{0x3F800000},{0x3F7C1C5C},{0x3F708FB2},{0x3F5DB3D7},
{0x3F441B7D},{0x3F248DBB},{0x3F000000},{0x3EAF1D44},
{0x3E31D0D4},
{0x3F007D2B},{0x3F0483EE},{0x3F0D3B7D},{0x3F1C4257},
{0x3F3504F3},{0x3F5F2944},{0x3F976FD9},{0x3FF746EA},
{0x40B79454}
}

MP3 Layer 3 table for MP3DCT36.


The first 9 entries are cos((BURGER_PI / 18.0) * i) The second 9 entries are 0.5 / cos((Burger::g_dPi * (i*2+1)) / 36.0)

See also
MP3DCT36(float *,float *,float *,const float *,const float *)

◆ g_MP3FHTCosines

const Burger::uint32_float_t Burger::g_MP3FHTCosines
extern
Initial value:
= {
{
{0x3F6C835E},{0x3EC3EF15}
},{
{0x3F7EC46D},{0x3DC8BD36}
},{
{0x3F7FEC43},{0x3CC90AB0}
},{
{0x3F7FFEC4},{0x3BC90F88}
}}

4 pairs of FHT cosine/sine values for MP3 encoding


See also
MP3FHT(float *,uintptr_t)

◆ g_NibbleToAsciiLowercase

const char Burger::g_NibbleToAsciiLowercase
extern
Initial value:
= {'0', '1',
'2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f'}

Table to convert nibbles (0-15) into lower case ASCII characters.


This table is used for code to quickly map the hex values of 0-15 into the digits 0-9 and a-f.

See also
Burger::g_NibbleToAsciiUppercase[16]

◆ g_NibbleToAsciiUppercase

const char Burger::g_NibbleToAsciiUppercase
extern
Initial value:
= {'0', '1',
'2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F'}

Table to convert nibbles (0-15) into upper case ASCII characters.


This table is used for code to quickly map the hex values of 0-15 into the digits 0-9 and A-F.

See also
Burger::g_NibbleToAsciiLowercase[16]

◆ g_NoString

const char Burger::g_NoString = {'n', 'o', 0}
extern

"no"


This string is hard coded to have the string "no". It saves space by having a singular occurrence.

◆ g_NoString16

const uint16_t Burger::g_NoString16 = {'n', 'o', 0}
extern

"no" in UTF16


This string is hard coded to have the string "no". It saves space by having a singular occurrence.

◆ g_NullString

const char Burger::g_NullString = {'(', 'n', 'u', 'l', 'l', ')', 0}
extern

String to print when a NULL pointer is found.


◆ g_pBoolStrings

const char * Burger::g_pBoolStrings
extern
Initial value:
= {
const char g_FalseString[6]
"false"
Definition brstringfunctions.cpp:226
const char g_TrueString[5]
"true"
Definition brstringfunctions.cpp:215

Strings to print for a boolean.


◆ g_pMP3CosinePoints

const Burger::uint32_float_t * Burger::g_pMP3CosinePoints = { g_MP3Cosine64, g_MP3Cosine32, g_MP3Cosine16, g_MP3Cosine8, g_MP3Cosine4 }
extern

Array of cosine points.


Array of pointers to cosine tables used for MP3 decoding in the order of 16 entry, 8 entry, 4 entry, 2 entry and 1 entry in that order.

◆ g_pscclr4360

const uint32_t Burger::g_pscclr4360[]
extern

◆ g_pscclr4dx9

const uint8_t Burger::g_pscclr4dx9[]
extern

◆ g_pscclr4gl

const char Burger::g_pscclr4gl[]
extern

◆ g_pstex2clr4360

const uint32_t Burger::g_pstex2clr4360[]
extern

◆ g_pstex2clr4dx9

const uint8_t Burger::g_pstex2clr4dx9[]
extern

◆ g_pstex2clr4gl

const char Burger::g_pstex2clr4gl[]
extern

◆ g_pstexture360

const uint32_t Burger::g_pstexture360[]
extern

◆ g_pstexturecolor360

const uint32_t Burger::g_pstexturecolor360[]
extern

◆ g_pstexturecolordx9

const uint8_t Burger::g_pstexturecolordx9[]
extern

◆ g_pstexturecolorgl

const char Burger::g_pstexturecolorgl[]
extern

◆ g_pstexturecolorvitaimage

const uint8_t Burger::g_pstexturecolorvitaimage[]
extern

◆ g_pstexturedx9

const uint8_t Burger::g_pstexturedx9[]
extern

◆ g_pstexturegl

const char Burger::g_pstexturegl[]
extern

◆ g_pstexturevitaimage

const uint8_t Burger::g_pstexturevitaimage[]
extern

◆ g_reverse_bits

const uint8_t Burger::g_reverse_bits
extern

Table to reverse the bit order of a byte.


This table will take the a uint8_t used as an index and return the bit reversed value of that index. 0x80 -> 0x01, 0xAA -> 0x55, 0x32 -> 0x4C.

◆ g_Shader2DCColorDefaultVertexBufferDescription

const Burger::VertexBuffer::VertexAoS_t Burger::g_Shader2DCColorDefaultVertexBufferDescription
extern
Initial value:
= {
g_Vertices2DQuad,sizeof(g_Vertices2DQuad),
NULL,0,
}
const uint_t g_Shader2DCColorMemberDescription[]
Vertex description for Shader2DCColor 2 entries for position.
Definition brshader2dccolor.cpp:90

Describe the location for Shader2DCColor.


◆ g_Shader2DCColorMemberDescription

const uint_t Burger::g_Shader2DCColorMemberDescription
extern
Initial value:

Vertex description for Shader2DCColor 2 entries for position.


◆ g_Shader2DColorVertexDefaultVertexBufferDescription

const Burger::VertexBuffer::VertexAoS_t Burger::g_Shader2DColorVertexDefaultVertexBufferDescription
extern
Initial value:
= {
g_Vertices2DQuad,sizeof(g_Vertices2DQuad),
NULL,0,
}
const uint_t g_Shader2DColorVertexMemberDescription[]
Vertex description for Shader2DColorVertex 2 entries for position 2 entries for UV 4 entries for colo...
Definition brshader2dcolorvertex.cpp:94

Describe the location for Shader2DColorVertex.


◆ g_Shader2DColorVertexMemberDescription

const uint_t Burger::g_Shader2DColorVertexMemberDescription
extern
Initial value:

Vertex description for Shader2DColorVertex 2 entries for position 2 entries for UV 4 entries for color.


◆ g_TensTable32

const uint32_t Burger::g_TensTable32
extern
Initial value:
= {
1,
10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000, 1000000000}

Table used for testing powers of ten for 32 bit integer to ASCII conversion.


This table is used for code to test a 32 bit integer against a power of ten for divisionless conversion of an integer to ASCII text.

◆ g_TensTable64

const uint64_t Burger::g_TensTable64
extern
Initial value:
= {
1ULL,
10ULL, 100ULL, 1000ULL, 10000ULL, 100000ULL, 1000000ULL, 10000000ULL,
100000000ULL, 1000000000ULL, 10000000000ULL, 100000000000ULL,
1000000000000ULL, 10000000000000ULL, 100000000000000ULL,
1000000000000000ULL, 10000000000000000ULL, 100000000000000000ULL,
1000000000000000000ULL, 10000000000000000000ULL}

Table used for testing powers of ten for 64 bit integer to ASCII conversion.


This table is used for code to test a 64 bit integer against a power of ten for divisionless conversion of an integer to ASCII text.

◆ g_TokenDelimiters

const char Burger::g_TokenDelimiters = {' ', '\t', '\r', '\n', 0}
extern

" \t\r\n"


This is used for StringToken(char *, const char *, char **) to parse tokens using default white space.

See also
g_TokenDelimiters16

◆ g_TokenDelimiters16

const uint16_t Burger::g_TokenDelimiters16 = {' ', '\t', '\r', '\n', 0}
extern

" \t\r\n" in UTF16


This is used for StringToken(uint16_t *, const uint16_t *, uint16_t **) to parse tokens using default white space.

See also
g_TokenDelimiters

◆ g_TrueString

const char Burger::g_TrueString = {'t', 'r', 'u', 'e', 0}
extern

"true"


This string is hard coded to have the string "true". It saves space by having a singular occurrence.

◆ g_TrueString16

const uint16_t Burger::g_TrueString16 = {'t', 'r', 'u', 'e', 0}
extern

"true" in UTF16


This string is hard coded to have the string "true". It saves space by having a singular occurrence.

◆ g_u8087RoundToInfinity

const uint16_t Burger::g_u8087RoundToInfinity = 0x0B7F
extern

8087 control word to set rounding to +infinity

◆ g_u8087RoundToNegativeInfinity

const uint16_t Burger::g_u8087RoundToNegativeInfinity = 0x077F
extern

8087 control word to set rounding to -infinity

◆ g_u8087RoundToZero

const uint16_t Burger::g_u8087RoundToZero = 0x0F7F
extern

8087 control word to set rounding to zero

◆ g_Vector2DInfinity

const Burger::Word32ToVector2D_t Burger::g_Vector2DInfinity
extern
Initial value:
= {
{0x7F800000U, 0x7F800000U}}

Constant of Burger::g_fInf,Burger::g_fInf.

◆ g_Vector2DMax

const Burger::Word32ToVector2D_t Burger::g_Vector2DMax
extern
Initial value:
= {
{0x7F7FFFFFU, 0x7F7FFFFFU}}

Constant of Burger::g_fMax,Burger::g_fMax.

◆ g_Vector2DOne

const Burger::Vector2D_t Burger::g_Vector2DOne = {1.0f, 1.0f}
extern

Constant of 1.0f,1.0f.

◆ g_Vector2DOneX

const Burger::Vector2D_t Burger::g_Vector2DOneX = {1.0f, 0.0f}
extern

Constant of 1.0f,0.0f.

◆ g_Vector2DOneY

const Burger::Vector2D_t Burger::g_Vector2DOneY = {0.0f, 1.0f}
extern

Constant of 0.0f,1.0f.

◆ g_Vector2DZero

const Burger::Vector2D_t Burger::g_Vector2DZero = {0.0f, 0.0f}
extern

Constant of 0.0f,0.0f.

◆ g_Vector3DInfinity

const Burger::Word32ToVector3D_t Burger::g_Vector3DInfinity
extern
Initial value:
= {
{0x7F800000U, 0x7F800000U, 0x7F800000U}}

Constant of Burger::g_fInf,Burger::g_fInf,Burger::g_fInf.

◆ g_Vector3DMax

const Burger::Word32ToVector3D_t Burger::g_Vector3DMax
extern
Initial value:
= {
{0x7F7FFFFFU, 0x7F7FFFFFU, 0x7F7FFFFFU}}

Constant of Burger::g_fMax,Burger::g_fMax,Burger::g_fMax.

◆ g_Vector3DOne

const Burger::Vector3D_t Burger::g_Vector3DOne = {1.0f, 1.0f, 1.0f}
extern

Constant of 1.0f,1.0f,1.0f.

◆ g_Vector3DOneX

const Burger::Vector3D_t Burger::g_Vector3DOneX = {1.0f, 0.0f, 0.0f}
extern

Constant of 1.0f,0.0f,0.0f.

◆ g_Vector3DOneY

const Burger::Vector3D_t Burger::g_Vector3DOneY = {0.0f, 1.0f, 0.0f}
extern

Constant of 0.0f,1.0f,0.0f.

◆ g_Vector3DOneZ

const Burger::Vector3D_t Burger::g_Vector3DOneZ = {0.0f, 0.0f, 1.0f}
extern

Constant of 0.0f,0.0f,1.0f.

◆ g_Vector3DZero

const Burger::Vector3D_t Burger::g_Vector3DZero = {0.0f, 0.0f, 0.0f}
extern

Constant of 0.0f,0.0f,0.0f.

◆ g_Vector4DOne

const Burger::Vector4D_t Burger::g_Vector4DOne = {1.0f,1.0f,1.0f,1.0f}
extern

Constant of 1.0f,1.0f,1.0f,1.0f.

◆ g_Vector4DOneW

const Burger::Vector4D_t Burger::g_Vector4DOneW = {0.0f,0.0f,0.0f,1.0f}
extern

Constant of 0.0f,0.0f,0.0f,1.0f.

◆ g_Vector4DOneX

const Burger::Vector4D_t Burger::g_Vector4DOneX = {1.0f,0.0f,0.0f,0.0f}
extern

Constant of 1.0f,0.0f,0.0f,0.0f.

◆ g_Vector4DOneY

const Burger::Vector4D_t Burger::g_Vector4DOneY = {0.0f,1.0f,0.0f,0.0f}
extern

Constant of 0.0f,1.0f,0.0f,0.0f.

◆ g_Vector4DOneZ

const Burger::Vector4D_t Burger::g_Vector4DOneZ = {0.0f,0.0f,1.0f,0.0f}
extern

Constant of 0.0f,0.0f,1.0f,0.0f.

◆ g_Vector4DZero

const Burger::Vector4D_t Burger::g_Vector4DZero = {0.0f,0.0f,0.0f,0.0f}
extern

Constant of 0.0f,0.0f,0.0f,0.0f.

◆ g_VolumePrefixes

const char * Burger::g_VolumePrefixes
extern
Initial value:
= {g_VolumeLinux,
g_VolumeLinux, g_VolumeMSYS2, g_VolumeLinux, g_VolumeCygwin, g_VolumeDarwin,
g_VolumeDarwin, g_VolumeLinux, g_VolumeLinux}

Folder for mounted volumes.


Every flavor of Unix uses a different folder for where all the mounted volumes are located. This array contains all the base folders for every flavor of unix supported by Burgerlib.

Note
This is only available on unix/posix compatible platforms
See also
eUnixFlavor or UnixGetFlavor()

◆ g_vs20pos22d360

const uint32_t Burger::g_vs20pos22d360[]
extern

◆ g_vs20pos22ddx9

const uint8_t Burger::g_vs20pos22ddx9[]
extern

◆ g_vs20pos22dgl

const char Burger::g_vs20pos22dgl[]
extern

◆ g_vs20pos2tex2clr42d360

const uint32_t Burger::g_vs20pos2tex2clr42d360[]
extern

◆ g_vs20pos2tex2clr42ddx9

const uint8_t Burger::g_vs20pos2tex2clr42ddx9[]
extern

◆ g_vs20pos2tex2clr42dgl

const char Burger::g_vs20pos2tex2clr42dgl[]
extern

◆ g_vs20sprite2d360

const uint32_t Burger::g_vs20sprite2d360[]
extern

◆ g_vs20sprite2ddx9

const uint8_t Burger::g_vs20sprite2ddx9[]
extern

◆ g_vs20sprite2dgl

const char Burger::g_vs20sprite2dgl[]
extern

◆ g_vs20sprite2dvitaimage

const uint8_t Burger::g_vs20sprite2dvitaimage[]
extern

◆ g_vsstaticposition360

const uint32_t Burger::g_vsstaticposition360[]
extern

◆ g_vsstaticpositiondx9

const uint8_t Burger::g_vsstaticpositiondx9[]
extern

◆ g_vsstaticpositiongl

const char Burger::g_vsstaticpositiongl[]
extern

◆ g_vsstaticpositionvitaimage

const uint8_t Burger::g_vsstaticpositionvitaimage[]
extern

◆ g_WeekDays

const char * Burger::g_WeekDays
extern
Initial value:
= {"Sunday", "Monday", "Tuesday", "Wednesday",
"Thursday", "Friday", "Saturday"}

Days of the week.


An array of seven strings for the seven days of the week. Each string is capitalized so they are "Sunday", "Monday", etc...

◆ g_X86HalfAndNegHalf

const Burger::uint32_float_t Burger::g_X86HalfAndNegHalf
extern
Initial value:
= {
{0x3F000000U}, {0xBF000000U}}

0.5f,-0.5f for roundup / rounddown

◆ g_YesString

const char Burger::g_YesString = {'y', 'e', 's', 0}
extern

"yes"


This string is hard coded to have the string "yes". It saves space by having a singular occurrence.

◆ g_YesString16

const uint16_t Burger::g_YesString16 = {'y', 'e', 's', 0}
extern

"yes" in UTF16


This string is hard coded to have the string "yes". It saves space by having a singular occurrence.

◆ kMaxFixed32

constexpr const Fixed32 Burger::kMaxFixed32 = 0x7FFFFFFF
constexpr

Maximum value for Fixed32.

◆ kMaxFrac32

constexpr const Frac32 Burger::kMaxFrac32 = 0x7FFFFFFF
constexpr

Maximum value for Frac32.

◆ kMinFixed32

constexpr const Fixed32 Burger::kMinFixed32 = (-0x7FFFFFFF) - 1
constexpr

Minimum value for Fixed32.

◆ kMinFrac32

constexpr const Frac32 Burger::kMinFrac32 = (-0x7FFFFFFF) - 1
constexpr

Minimum value for Frac32.

◆ kPiFixed32

constexpr const Fixed32 Burger::kPiFixed32 = 0x003243F
constexpr

Pi in Fixed32 format (3.141... * 65536 = 205887.416)

◆ s_FixedMatrix3DIdentity

const Burger::FixedMatrix3D_t Burger::s_FixedMatrix3DIdentity
extern
Initial value:

Constant 3x3 fixed point identity matrix.


◆ s_FixedMatrix4DIdentity

const Burger::FixedMatrix4D_t Burger::s_FixedMatrix4DIdentity
extern

◆ s_FixedVector3DOne

const Burger::FixedVector3D_t Burger::s_FixedVector3DOne = {BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f)}
extern

Constant of 1.0f,1.0f,1.0f in fixed point.

◆ s_FixedVector3DOneX

const Burger::FixedVector3D_t Burger::s_FixedVector3DOneX = {BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
extern

Constant of 1.0f,0.0f,0.0f in fixed point.

◆ s_FixedVector3DOneY

const Burger::FixedVector3D_t Burger::s_FixedVector3DOneY = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
extern

Constant of 0.0f,1.0f,0.0f in fixed point.

◆ s_FixedVector3DOneZ

const Burger::FixedVector3D_t Burger::s_FixedVector3DOneZ = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f)}
extern

Constant of 0.0f,0.0f,1.0f in fixed point.

◆ s_FixedVector3DZero

const Burger::FixedVector3D_t Burger::s_FixedVector3DZero = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
extern

Constant of 0.0f,0.0f,0.0f in fixed point.

◆ s_FixedVector4DOne

const Burger::FixedVector4D_t Burger::s_FixedVector4DOne = {BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(1.0f)}
extern

Constant of 1.0f,1.0f,1.0f,1.0f in fixed point.

◆ s_FixedVector4DOneW

const Burger::FixedVector4D_t Burger::s_FixedVector4DOneW = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f)}
extern

Constant of 0.0f,0.0f,0.0f,1.0f in fixed point.

◆ s_FixedVector4DOneX

const Burger::FixedVector4D_t Burger::s_FixedVector4DOneX = {BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
extern

Constant of 1.0f,0.0f,0.0f,0.0f in fixed point.

◆ s_FixedVector4DOneY

const Burger::FixedVector4D_t Burger::s_FixedVector4DOneY = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
extern

Constant of 0.0f,1.0f,0.0f,0.0f in fixed point.

◆ s_FixedVector4DOneZ

const Burger::FixedVector4D_t Burger::s_FixedVector4DOneZ = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(1.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
extern

Constant of 0.0f,0.0f,1.0f,0.0f in fixed point.

◆ s_FixedVector4DZero

const Burger::FixedVector4D_t Burger::s_FixedVector4DZero = {BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f),BURGER_FLOAT_TO_FIXED(0.0f)}
extern

Constant of 0.0f,0.0f,0.0f,0.0f in fixed point.

◆ s_Matrix4DIdentity

const Burger::Matrix4D_t Burger::s_Matrix4DIdentity
extern
Initial value:
= {{1.0f, 0.0f, 0.0f, 0.0f},
{0.0f, 1.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 1.0f, 0.0f},
{0.0f, 0.0f, 0.0f, 1.0f}}

Constant 4x4 identity matrix.