Core Components
This chapter introduces the core modules of the LibXR framework, providing cross-platform general-purpose data types, error handling, operation encapsulation, time utilities, and terminal formatting support. These components form the foundational support for the entire system.
Module Overview
libxr_def: Common macro definitions, error codes, and basic constantslibxr_assert: Assertion mechanism and fatal error callbackslibxr_cb: Type-safe callback mechanismlibxr_type: Raw data encapsulation and type identificationlibxr_mem: Memory copy, clear, and compare helperslibxr_string: Fixed-length safe stringlibxr_color: Terminal output formatting and ANSI controlprint: Compile-time formatting output and sink / bounded-buffer wrapperslibxr_time: Microsecond/millisecond-level timestamps and time differenceslibxr_rw: General read/write interfaces and operation encapsulationOperation: Asynchronous completion-feedback modelPipe: Unidirectional pipe built on a shared byte queue
Each module will be introduced in detail in the following pages.