LiteFX 0.4.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
Contains the version of an App.
Definition app_api.hpp:50
virtual ~AppVersion() noexcept
Definition app.hpp:6
BackendState
Definition app_api.hpp:42
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
Platform
Definition app_api.hpp:29