Olympe Engine
2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Source
main_test.cpp
Go to the documentation of this file.
1
// Source/main_test.cpp — Olympe Engine Version Stamp Usage Example
2
//
3
// This file demonstrates correct integration of the VersionStamp system.
4
// It is NOT the production main.cpp; it is an educational reference showing:
5
// 1. How to include version.h
6
// 2. How to call PrintVersionInfo() as the first startup operation
7
// 3. How to access individual version fields programmatically
8
//
9
// Expected output (Debug build):
10
// [VersionStamp] Olympe Engine v0.24.0
11
// [VersionStamp] Build timestamp : 2026-03-17 10:07:51 UTC
12
// [VersionStamp] Git commit SHA : 0000000000000000000000000000000000000000
13
// [VersionStamp] Git branch : master
14
// [VersionStamp] PR reference : #000
15
// [VersionStamp] Phase : 24-0-VersionStamp
16
// [VersionStamp] Build config : Debug
17
// [VersionStamp] Full version : OLYMPE_VERSION:0.24.0|BUILD:2026-03-17 10:07:51 UTC|...
18
//
19
// Binary verification (after build):
20
// strings OlympeEngine.exe | grep OLYMPE_VERSION
21
// -> OLYMPE_VERSION:0.24.0|BUILD:...|SHA:...|BRANCH:master|PR:#000|PHASE:...|CONFIG:Debug
22
23
#include "
System/version.h
"
24
25
int
main
()
26
{
27
// IMPORTANT: Version info must be logged first, before any other startup logs.
28
Olympe::VersionStamp::PrintVersionInfo
();
29
30
// Access individual version fields programmatically when needed.
31
// Example: conditional behaviour based on build configuration.
32
const
char
*
config
=
Olympe::VersionStamp::BUILD_CONFIG
;
33
SYSTEM_LOG
<<
"[main_test] Running in "
<<
config
<<
" mode"
<< std::endl;
34
35
// Example: log the current phase for diagnostic purposes.
36
SYSTEM_LOG
<<
"[main_test] Active phase : "
<<
Olympe::VersionStamp::PHASE
<< std::endl;
37
38
// Example: access the full searchable version string.
39
SYSTEM_LOG
<<
"[main_test] Version tag : "
<<
Olympe::VersionStamp::FULL_VERSION_STRING
<< std::endl;
40
41
return
0;
42
}
GetComponentTypeID_Static
ComponentTypeID GetComponentTypeID_Static()
Definition
ECS_Entity.h:56
main
int main()
Definition
main_test.cpp:25
Olympe::VersionStamp::BUILD_CONFIG
static constexpr const char * BUILD_CONFIG
Definition
version.h:33
Olympe::VersionStamp::PHASE
static constexpr const char * PHASE
Definition
version.h:32
Olympe::VersionStamp::PrintVersionInfo
static void PrintVersionInfo()
Definition
version.h:44
Olympe::VersionStamp::FULL_VERSION_STRING
static constexpr const char * FULL_VERSION_STRING
Definition
version.h:36
SYSTEM_LOG
#define SYSTEM_LOG
Definition
system_utils.h:23
version.h
Generated on Mon Apr 13 2026 08:15:20 for Olympe Engine by
1.9.8