TRLC Platform Library  1.0.0
Header-only C++ library for compile-time platform detection and abstraction
core.hpp File Reference

Main entry point for TRLC platform detection and abstraction. More...

#include <atomic>
#include <iostream>
#include <sstream>
#include <string>
#include <thread>
#include <type_traits>
#include "trlc/platform/architecture.hpp"
#include "trlc/platform/compiler.hpp"
#include "trlc/platform/cpp_standard.hpp"
#include "trlc/platform/endianness.hpp"
#include "trlc/platform/features.hpp"
#include "trlc/platform/macros.hpp"
#include "trlc/platform/platform.hpp"
#include "trlc/platform/typeinfo.hpp"
#include "trlc/platform/debug.hpp"

Go to the source code of this file.

Classes

struct  trlc::platform::Version
 Library version information. More...
 
struct  trlc::platform::PlatformReport
 Consolidated platform information structure. More...
 

Namespaces

 trlc
 
 trlc::platform
 
 trlc::platform::detail
 

Macros

#define TRLC_PLATFORM_INCLUDED
 Master include guard indicating that TRLC platform library has been included. More...
 
#define TRLC_PLATFORM_VERSION_MAJOR   (trlc::platform::Version::MAJOR)
 Library version macros for preprocessor use. More...
 
#define TRLC_PLATFORM_VERSION_MINOR   (trlc::platform::Version::MINOR)
 
#define TRLC_PLATFORM_VERSION_PATCH   (trlc::platform::Version::PATCH)
 
#define TRLC_PLATFORM_VERSION_STRING   (trlc::platform::Version::STRING)
 
#define TRLC_PLATFORM_VERSION_ATLEAST(major, minor, patch)    (trlc::platform::Version::isAtLeast(major, minor, patch))
 Check if platform version is at least the specified version. More...
 

Functions

PlatformReport trlc::platform::getPlatformReport ()
 
void trlc::platform::initializePlatform ()
 
bool trlc::platform::isPlatformInitialized ()
 
std::string trlc::platform::getBriefPlatformSummary ()
 
void trlc::platform::printPlatformReport ()
 

Variables

std::atomic< bool > trlc::platform::detail::g_platform_initialized {false}
 Internal initialization state tracking (inline to avoid ODR violations) More...
 
std::atomic< bool > trlc::platform::detail::g_initialization_in_progress {false}
 

Detailed Description

Main entry point for TRLC platform detection and abstraction.

This header serves as the primary interface for the TRLC platform library. It includes all platform detection modules in the correct dependency order and provides consolidated reporting and initialization functionality.

The core module aggregates information from all other modules into a unified PlatformReport structure that can generate human-readable reports about the detected platform, compiler, architecture, and features.

Features:

  • Consolidated platform information reporting
  • Optional debug utilities (when enabled)
  • Runtime feature initialization
  • Version information and library metadata
  • Thread-safe initialization for runtime features
Author
TRLC Platform Team
Version
1.0.0

Definition in file core.hpp.

Macro Definition Documentation

◆ TRLC_PLATFORM_INCLUDED

#define TRLC_PLATFORM_INCLUDED

Master include guard indicating that TRLC platform library has been included.

Definition at line 495 of file core.hpp.

◆ TRLC_PLATFORM_VERSION_ATLEAST

#define TRLC_PLATFORM_VERSION_ATLEAST (   major,
  minor,
  patch 
)     (trlc::platform::Version::isAtLeast(major, minor, patch))

Check if platform version is at least the specified version.

Definition at line 504 of file core.hpp.

◆ TRLC_PLATFORM_VERSION_MAJOR

#define TRLC_PLATFORM_VERSION_MAJOR   (trlc::platform::Version::MAJOR)

Library version macros for preprocessor use.

Definition at line 498 of file core.hpp.

◆ TRLC_PLATFORM_VERSION_MINOR

#define TRLC_PLATFORM_VERSION_MINOR   (trlc::platform::Version::MINOR)

Definition at line 499 of file core.hpp.

◆ TRLC_PLATFORM_VERSION_PATCH

#define TRLC_PLATFORM_VERSION_PATCH   (trlc::platform::Version::PATCH)

Definition at line 500 of file core.hpp.

◆ TRLC_PLATFORM_VERSION_STRING

#define TRLC_PLATFORM_VERSION_STRING   (trlc::platform::Version::STRING)

Definition at line 501 of file core.hpp.