LiteFX 0.5.1.2025
Computer Graphics Engine
Loading...
Searching...
No Matches
app_api.hpp
1#pragma once
2
3#include <litefx/config.h>
4
5#if !defined (LITEFX_APPMODEL_API)
6# if defined(LiteFX_AppModel_EXPORTS) && (defined _WIN32 || defined WINCE)
7# define LITEFX_APPMODEL_API __declspec(dllexport)
8# elif (defined(LiteFX_AppModel_EXPORTS) || defined(__APPLE__)) && defined __GNUC__ && __GNUC__ >= 4
9# define LITEFX_APPMODEL_API __attribute__ ((visibility ("default")))
10# elif !defined(LiteFX_AppModel_EXPORTS) && (defined _WIN32 || defined WINCE)
11# define LITEFX_APPMODEL_API __declspec(dllimport)
12# endif
13#endif
14
15#ifndef LITEFX_APPMODEL_API
16# define LITEFX_APPMODEL_API
17#endif
18
19#include <litefx/core.h>
20#include <litefx/logging.hpp>
21
22namespace LiteFX {
23
24 class IBackend;
25 class AppVersion;
26 class App;
27 class AppBuilder;
28
29 enum class Platform : std::uint8_t {
30 None = 0x00,
31 Win32 = 0x01,
32 Other = 0xFF
33 };
34
35 enum class BackendType : std::uint8_t {
36 Rendering = 0x01,
37 Other = 0xFF
38 };
39
41
42 enum class BackendState : std::uint8_t {
43 Inactive = 0x01,
44 Active = 0x02
45 };
46
50 class LITEFX_APPMODEL_API AppVersion {
51 LITEFX_IMPLEMENTATION(AppVersionImpl);
52
53 public:
61 explicit AppVersion(int major = 1, int minor = 0, int patch = 0, int revision = 0) noexcept;
62 virtual ~AppVersion() noexcept;
63
64 AppVersion(const AppVersion& _other) = delete;
65 AppVersion(AppVersion&& _other) noexcept = delete;
66 AppVersion& operator=(const AppVersion&) = delete;
67 AppVersion& operator=(AppVersion&&) noexcept = delete;
68
69 public:
74 int major() const noexcept;
75
80 int minor() const noexcept;
81
86 int patch() const noexcept;
87
92 int revision() const noexcept;
93
98 int engineMajor() const noexcept;
99
104 int engineMinor() const noexcept;
105
110 int engineRevision() const noexcept;
111
116 int engineStatus() const noexcept;
117
122 StringView engineIdentifier() const noexcept;
123
128 StringView engineVersion() const noexcept;
129 };
130
131}
Definition appversion.cpp:9
Creates a new builder for an App.
Definition app.hpp:690
The base class for an application.
Definition app.hpp:402
Contains the version of an App.
Definition app_api.hpp:50
int engineRevision() const noexcept
Gets the revision of the engine build.
Definition appversion.cpp:70
StringView engineVersion() const noexcept
Gets the version string of the engine build.
Definition appversion.cpp:85
int engineMinor() const noexcept
Gets the minor version of the engine build.
Definition appversion.cpp:65
int major() const noexcept
Gets the major version of the app.
Definition appversion.cpp:40
int patch() const noexcept
Gets the patch number of the app.
Definition appversion.cpp:50
int revision() const noexcept
Gets the revision of the app.
Definition appversion.cpp:55
virtual ~AppVersion() noexcept
int engineMajor() const noexcept
Gets the major version of the engine build.
Definition appversion.cpp:60
int minor() const noexcept
Gets the minor version of the app.
Definition appversion.cpp:45
int engineStatus() const noexcept
Gets the status of the engine build.
Definition appversion.cpp:75
StringView engineIdentifier() const noexcept
Gets the identifier of the engine build.
Definition appversion.cpp:80
AppVersion(int major=1, int minor=0, int patch=0, int revision=0) noexcept
Creates a new app version instance.
Definition appversion.cpp:33
The base class for an app backend.
Definition app.hpp:18
Definition dx12.hpp:11
Definition app.hpp:6
BackendState
Definition app_api.hpp:42
@ Inactive
Definition app_api.hpp:43
@ Active
Definition app_api.hpp:44
constexpr std::array VALID_BACKEND_TYPES
Definition app_api.hpp:40
std::string_view StringView
Definition string.hpp:26
BackendType
Definition app_api.hpp:35
@ Rendering
Definition app_api.hpp:36
Platform
Definition app_api.hpp:29
@ Other
Definition app_api.hpp:32
@ None
Definition app_api.hpp:30
@ Win32
Definition app_api.hpp:31