Skip to main content

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 constants
  • libxr_assert: Assertion mechanism and fatal error callbacks
  • libxr_cb: Type-safe callback mechanism
  • libxr_type: Raw data encapsulation and type identification
  • libxr_string: Fixed-length safe string
  • libxr_color: Terminal output formatting and ANSI control
  • libxr_time: Microsecond/millisecond-level timestamps and time differences
  • libxr_rw: General read/write interfaces and operation encapsulation

Each module will be introduced in detail in the following pages.