TRLC Platform Library  1.0.0
Header-only C++ library for compile-time platform detection and abstraction
trlc::platform::PlatformInfo Struct Reference

Platform information structure. More...

#include <trlc/platform/platform.hpp>

Static Public Member Functions

static bool isPosix () const
 Checks if the platform supports POSIX APIs. More...
 
static bool isUnix () const
 Checks if the platform is Unix-like. More...
 
static bool isWindows () const
 Checks if the platform is Windows-based. More...
 

Public Attributes

OperatingSystem os
 Detected operating system. More...
 
EnvironmentType environment
 Detected environment type. More...
 
const char * os_name
 Human-readable OS name. More...
 
const char * kernel_family
 Kernel family: "nt", "posix", "unix". More...
 

Detailed Description

Platform information structure.

Contains comprehensive information about the detected platform, including operating system, environment, and kernel family.

Definition at line 55 of file platform.hpp.

Member Function Documentation

◆ isPosix()

static bool trlc::platform::PlatformInfo::isPosix ( ) const
inlinestatic

Checks if the platform supports POSIX APIs.

Returns
true if platform is POSIX-compliant
Examples
/home/tranglc/sources/trlc-platform/include/trlc/platform/core.hpp.

Definition at line 65 of file platform.hpp.

◆ isUnix()

static bool trlc::platform::PlatformInfo::isUnix ( ) const
inlinestatic

Checks if the platform is Unix-like.

Returns
true if platform is Unix-based

Definition at line 74 of file platform.hpp.

◆ isWindows()

static bool trlc::platform::PlatformInfo::isWindows ( ) const
inlinestatic

Checks if the platform is Windows-based.

Returns
true if platform is Windows
Examples
/home/tranglc/sources/trlc-platform/include/trlc/platform/core.hpp.

Definition at line 86 of file platform.hpp.

Member Data Documentation

◆ environment

EnvironmentType trlc::platform::PlatformInfo::environment

Detected environment type.

Examples
/home/tranglc/sources/trlc-platform/include/trlc/platform/core.hpp.

Definition at line 57 of file platform.hpp.

◆ kernel_family

const char* trlc::platform::PlatformInfo::kernel_family

Kernel family: "nt", "posix", "unix".

Examples
/home/tranglc/sources/trlc-platform/include/trlc/platform/core.hpp.

Definition at line 59 of file platform.hpp.

◆ os

OperatingSystem trlc::platform::PlatformInfo::os

Detected operating system.

Definition at line 56 of file platform.hpp.

◆ os_name

const char* trlc::platform::PlatformInfo::os_name

Human-readable OS name.

Examples
/home/tranglc/sources/trlc-platform/include/trlc/platform/core.hpp.

Definition at line 58 of file platform.hpp.


The documentation for this struct was generated from the following file: