ply-system.h
System
ply-system.h provides cross-platform support for essential operating system services, including memory management, timers, filesystems, threads and processes, in a single header file.
Features are organized into the following categories:
- Preprocessor Macros: Platform identification, assertions and other macros.
- Numeric Functions and Types: Fixed-sized integers and primitive functions.
- Memory Management: Primitive data structures with a built-in heap.
- Functors: Class template for dynamic callback functions.
- Generic Algorithms: Searching and sorting.
- Random Numbers: Fast, well-distributed pseudorandom number generation.
- Time and Date: System clock and performance timer.
- Input/Output: Pipes, streams and Unicode conversion.
- File System: File and path manipulation with directory watcher.
- Multithreading: Thread-local variables, atomics, mutexes, condition variables, read-write locks, semaphores.
- Processes: Spawn subprocesses and read/write directly to their standard I/O ports.
Configuration Options
You can customize this module by defining any of the following preprocessor macros in your project's build settings:
| Name | Description | Default |
|---|---|---|
PLY_CONFIG_FILE |
The path to another file that will be included by ply-system.h. Additional configuration options can be put here. |
None |
PLY_WITH_ASSERTS |
Controls whether assertions are enabled. | 1 in Debug builds; 0 otherwise |
PLY_OVERRIDE_NEW |
Controls whether C++'s built-in new and delete operators should allocate from Plywood's built-in heap. Projects already having their own new/delete overloads should set this to 0. |
1 |
PLY_WITH_DIRECTORY_WATCHER |
Enables the optional DirectoryWatcher feature. |
0 |