Loading...
Searching...
No Matches
EntryPoint.h
Go to the documentation of this file.
1
//
2
// Created by denzel on 22/10/2025.
3
//
4
5
#
pragma
once
6
7
#
include
"hellfire/core/Application.h"
8
9
namespace
hellfire
{
10
/**
11
* @brief Application configuration interface
12
*
13
* Application using the Hellfire engine should implement this interface
14
* to configure their application instance.
15
*/
16
17
class
IApplicationConfig
{
18
public
:
19
virtual
~
IApplicationConfig
() =
default
;
20
21
/**
22
* @brief Get the window width
23
*/
24
virtual
int
get_window_width
() = 0;
25
26
/**
27
* @brief Get the window height
28
*/
29
virtual
int
get_window_height
() = 0;
30
31
/**
32
* @brief Get the application title
33
*/
34
virtual
const
std::string
get_title
()
const
= 0;
35
36
/**
37
* @brief Register application-specific plugins
38
* @param app The application instance to register plugins with
39
*/
40
virtual
void
register_plugins
(
Application
&app) = 0;
41
};
42
}
// namespace hellfire
43
44
// Forward declaration - must be implemented by the application
45
extern
std
::
unique_ptr
<
hellfire
::
IApplicationConfig
>
create_application_config
();
46
47
#
ifndef
HELLFIRE_ENTRYPOINT_DEFINED
48
#
define
HELLFIRE_ENTRYPOINT_DEFINED
49
50
int
main
() {
51
const
auto
config = create_application_config();
52
53
hellfire
::
Application
app(config->get_window_width(),
54
config->get_window_height(),
55
config->get_title());
56
57
58
config->register_plugins(app);
59
60
app
.
initialize
(
)
;
61
app
.
run
(
)
;
62
63
return
0;
64
}
65
66
#
endif
// HELLFIRE_ENTRYPOINT_DEFINED
main
int main()
Definition
EntryPoint.h:50
create_application_config
std::unique_ptr< hellfire::IApplicationConfig > create_application_config()
hellfire::Application
Definition
Application.h:43
hellfire::Application::initialize
void initialize()
Definition
Application.cpp:69
hellfire::Application::run
void run()
Definition
Application.cpp:102
hellfire::IApplicationConfig
Application configuration interface.
Definition
EntryPoint.h:17
hellfire::IApplicationConfig::get_window_height
virtual int get_window_height()=0
Get the window height.
hellfire::IApplicationConfig::~IApplicationConfig
virtual ~IApplicationConfig()=default
hellfire::IApplicationConfig::register_plugins
virtual void register_plugins(Application &app)=0
Register application-specific plugins.
hellfire::IApplicationConfig::get_window_width
virtual int get_window_width()=0
Get the window width.
hellfire::IApplicationConfig::get_title
virtual const std::string get_title() const =0
Get the application title.
hellfire
Definition
AssetManager.cpp:10
engine
src
hellfire
EntryPoint.h
Generated by
1.9.8