https://github.com/gsemac/hvn3-environment
Utilities for getting information about the current platform
https://github.com/gsemac/hvn3-environment
Last synced: 8 months ago
JSON representation
Utilities for getting information about the current platform
- Host: GitHub
- URL: https://github.com/gsemac/hvn3-environment
- Owner: gsemac
- Created: 2017-08-12T05:28:50.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-08-22T21:16:45.000Z (almost 9 years ago)
- Last Synced: 2025-06-26T22:04:02.862Z (12 months ago)
- Language: C++
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## hvn3-environment
This is a standalone component of [hvn3-engine](https://github.com/gsemac/hvn3-engine) intended for getting information about the runtime environment of the program.
#### OperatingSystemDefs.h
`OperatingSystemDefs.h` defines `HVN3_OS_WINDOWS` on Windows, `HVN3_OS_MACOS` on MacOS, `HVN3_OS_LINUX` on Linux, `HVN3_OS_UNIX` on Unix, and `HVN3_OS_FREEBSD` on FreeBSD, providing an easy way to determine the current operating system without having to check for various standard and non-standard definitions.
It also defines `HVN3_OS_X64` on 64-bit operating systems, and `HVN3_OS_X86` on 32-bit operating systems. To detect Unix-based operating systems generically, `HVN3_OS_UNIX_BASED` is also defined on Unix-based platforms.
#### Environment.h
`Environment.h` offers a cross-platform interface for getting information about the runtime environment, including the current user's user name, the number of processors on the current machine, and the amount of memory mapped to the current process.
#### OperatingSystem.h
`OperatingSystem.h` contains declarations for platform enumeration types and the `PlatformInfo` class. The `OperatingSystemInfo` function returns a `PlatformInfo` instance containing information such as the current platform, platform name, and platform version.