Common System 0.2.0
Common interfaces and patterns for system integration
Loading...
Searching...
No Matches
feature_system_deps.h File Reference

System module integration flags. More...

Include dependency graph for feature_system_deps.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define KCENON_WITH_COMMON_SYSTEM   1
 Indicates that common_system types are available.
 
#define KCENON_WITH_THREAD_SYSTEM   0
 Enable integration with thread_system module.
 
#define KCENON_WITH_LOGGER_SYSTEM   0
 Enable integration with logger_system module.
 
#define KCENON_WITH_MONITORING_SYSTEM   0
 Enable integration with monitoring_system module.
 
#define KCENON_WITH_CONTAINER_SYSTEM   0
 Enable integration with container_system module.
 
#define KCENON_WITH_NETWORK_SYSTEM   0
 Enable integration with network_system module.
 
#define KCENON_NETWORK_SSL   0
 Enable SSL/TLS support in network_system.
 
#define KCENON_NETWORK_COMPRESSION   0
 Enable compression support in network_system.
 
#define KCENON_WITH_DATABASE_SYSTEM   0
 Enable integration with database_system module.
 
#define KCENON_DATABASE_MYSQL   0
 Database backend support flags.
 
#define KCENON_DATABASE_POSTGRESQL   0
 
#define KCENON_DATABASE_SQLITE   0
 
#define KCENON_DATABASE_MONGODB   0
 
#define KCENON_DATABASE_REDIS   0
 
#define KCENON_WITH_MESSAGING_SYSTEM   0
 Enable integration with messaging_system module.
 
#define KCENON_ENABLE_TESTING   0
 Enable unit tests.
 
#define KCENON_ENABLE_BENCHMARKS   0
 Enable benchmarks.
 
#define KCENON_ENABLE_EXAMPLES   0
 Enable example applications.
 
#define KCENON_ENABLE_ASAN   0
 Address Sanitizer enabled.
 
#define KCENON_ENABLE_TSAN   0
 Thread Sanitizer enabled.
 
#define KCENON_ENABLE_UBSAN   0
 Undefined Behavior Sanitizer enabled.
 

Detailed Description

System module integration flags.

This file provides KCENON_* macros for detecting and controlling integration with other system modules (thread_system, logger_system, etc.). These flags are typically set via CMake and propagated as compile definitions.

Integration flags:

  • KCENON_WITH_THREAD_SYSTEM
  • KCENON_WITH_LOGGER_SYSTEM
  • KCENON_WITH_MONITORING_SYSTEM
  • KCENON_WITH_CONTAINER_SYSTEM
  • KCENON_WITH_NETWORK_SYSTEM
  • KCENON_WITH_DATABASE_SYSTEM
  • KCENON_WITH_MESSAGING_SYSTEM
Note
These macros are designed to be set via CMake's target_compile_definitions() or features.cmake configuration.

Definition in file feature_system_deps.h.

Macro Definition Documentation

◆ KCENON_DATABASE_MONGODB

#define KCENON_DATABASE_MONGODB   0

Definition at line 216 of file feature_system_deps.h.

◆ KCENON_DATABASE_MYSQL

#define KCENON_DATABASE_MYSQL   0

Database backend support flags.

Definition at line 192 of file feature_system_deps.h.

◆ KCENON_DATABASE_POSTGRESQL

#define KCENON_DATABASE_POSTGRESQL   0

Definition at line 200 of file feature_system_deps.h.

◆ KCENON_DATABASE_REDIS

#define KCENON_DATABASE_REDIS   0

Definition at line 224 of file feature_system_deps.h.

◆ KCENON_DATABASE_SQLITE

#define KCENON_DATABASE_SQLITE   0

Definition at line 208 of file feature_system_deps.h.

◆ KCENON_ENABLE_ASAN

#define KCENON_ENABLE_ASAN   0

Address Sanitizer enabled.

Definition at line 293 of file feature_system_deps.h.

◆ KCENON_ENABLE_BENCHMARKS

#define KCENON_ENABLE_BENCHMARKS   0

Enable benchmarks.

Definition at line 267 of file feature_system_deps.h.

◆ KCENON_ENABLE_EXAMPLES

#define KCENON_ENABLE_EXAMPLES   0

Enable example applications.

Definition at line 278 of file feature_system_deps.h.

◆ KCENON_ENABLE_TESTING

#define KCENON_ENABLE_TESTING   0

Enable unit tests.

Definition at line 256 of file feature_system_deps.h.

◆ KCENON_ENABLE_TSAN

#define KCENON_ENABLE_TSAN   0

Thread Sanitizer enabled.

Definition at line 304 of file feature_system_deps.h.

◆ KCENON_ENABLE_UBSAN

#define KCENON_ENABLE_UBSAN   0

Undefined Behavior Sanitizer enabled.

Definition at line 315 of file feature_system_deps.h.

◆ KCENON_NETWORK_COMPRESSION

#define KCENON_NETWORK_COMPRESSION   0

Enable compression support in network_system.

Definition at line 166 of file feature_system_deps.h.

◆ KCENON_NETWORK_SSL

#define KCENON_NETWORK_SSL   0

Enable SSL/TLS support in network_system.

Definition at line 155 of file feature_system_deps.h.

◆ KCENON_WITH_COMMON_SYSTEM

#define KCENON_WITH_COMMON_SYSTEM   1

Indicates that common_system types are available.

When feature_flags.h is included, this macro is automatically defined to 1. Downstream projects (e.g., network_system) can use this to detect whether common_system types like kcenon::common::Result<T> are available.

This prevents ABI incompatibility issues where:

  • Project A includes common_system headers and expects kcenon::common::Result<T>
  • Project B is built without the flag and uses a local fallback type
  • Linking causes symbol mismatches or heap corruption
Note
This flag is always set to 1 when feature_flags.h is included. It is not configurable since including this header implies common_system is available.
#ifdef KCENON_WITH_COMMON_SYSTEM
using result_type = kcenon::common::Result<T>;
#else
using result_type = local::Result<T>; // fallback
#endif
Result type for error handling with member function support.
Definition core.cppm:165

Definition at line 59 of file feature_system_deps.h.

◆ KCENON_WITH_CONTAINER_SYSTEM

#define KCENON_WITH_CONTAINER_SYSTEM   0

Enable integration with container_system module.

When enabled, specialized containers like concurrent queues are available.

Definition at line 127 of file feature_system_deps.h.

◆ KCENON_WITH_DATABASE_SYSTEM

#define KCENON_WITH_DATABASE_SYSTEM   0

Enable integration with database_system module.

Definition at line 181 of file feature_system_deps.h.

◆ KCENON_WITH_LOGGER_SYSTEM

#define KCENON_WITH_LOGGER_SYSTEM   0

Enable integration with logger_system module.

When enabled, structured logging, log levels, and log sinks are available.

Definition at line 93 of file feature_system_deps.h.

◆ KCENON_WITH_MESSAGING_SYSTEM

#define KCENON_WITH_MESSAGING_SYSTEM   0

Enable integration with messaging_system module.

When enabled, message queuing and pub/sub features are available.

Definition at line 241 of file feature_system_deps.h.

◆ KCENON_WITH_MONITORING_SYSTEM

#define KCENON_WITH_MONITORING_SYSTEM   0

Enable integration with monitoring_system module.

When enabled, metrics collection, health checks, and alerting are available.

Definition at line 110 of file feature_system_deps.h.

◆ KCENON_WITH_NETWORK_SYSTEM

#define KCENON_WITH_NETWORK_SYSTEM   0

Enable integration with network_system module.

When enabled, network communication features are available.

Definition at line 144 of file feature_system_deps.h.

◆ KCENON_WITH_THREAD_SYSTEM

#define KCENON_WITH_THREAD_SYSTEM   0

Enable integration with thread_system module.

When enabled, features like jthread wrappers, thread pools, and cooperative cancellation are available.

Definition at line 76 of file feature_system_deps.h.