SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
ApplicationBuilder.h
1#pragma once
2
3#include "spark/core/Application.h"
4
5namespace spark::core
6{
7 namespace details::application_tags
8 {
9 struct set_name_called {};
10
11 struct set_size_called {};
12
14 }
15
16 template <typename... Tags>
18 {
19 template <typename... Args>
20 friend class ApplicationBuilder;
21
22 public:
27 explicit ApplicationBuilder();
28
35
42 ApplicationBuilder<details::application_tags::set_size_called, Tags...> setSize(unsigned int width, unsigned int height);
43
50
55 std::unique_ptr<Application> build();
56
57 private:
59 Application::Settings m_settings = {};
60
63 };
64}
65
66#include "spark/core/impl/ApplicationBuilder.h"
Definition ApplicationBuilder.h:18
ApplicationBuilder< details::application_tags::set_resize_policy, Tags... > setResizable(bool resizable)
Sets whether the application window is resizable.
Definition ApplicationBuilder.h:40
ApplicationBuilder< details::application_tags::set_size_called, Tags... > setSize(unsigned int width, unsigned int height)
Sets the size of the application window.
Definition ApplicationBuilder.h:30
ApplicationBuilder< details::application_tags::set_name_called, Tags... > setName(std::string name)
Sets the name of the application.
Definition ApplicationBuilder.h:21
std::unique_ptr< Application > build()
Builds the application with the given settings.
Definition ApplicationBuilder.h:48
A struct containing the settings for the application.
Definition Application.h:30