SPARK  0.1.0
A general purpose game engine written in C++.
Loading...
Searching...
No Matches
spark::core::ApplicationBuilder< Tags > Class Template Reference

Public Member Functions

 ApplicationBuilder ()
 Constructs a new builder with default settings.
 
ApplicationBuilder< details::application_tags::set_name_called, Tags... > setName (std::string name)
 Sets the name of the application.
 
ApplicationBuilder< details::application_tags::set_size_called, Tags... > setSize (unsigned int width, unsigned int height)
 Sets the size of the application window.
 
ApplicationBuilder< details::application_tags::set_resize_policy, Tags... > setResizable (bool resizable)
 Sets whether the application window is resizable.
 
std::unique_ptr< Applicationbuild ()
 Builds the application with the given settings.
 

Constructor & Destructor Documentation

◆ ApplicationBuilder()

template<typename... Tags>
spark::core::ApplicationBuilder< Tags >::ApplicationBuilder ( )
explicit

Constructs a new builder with default settings.

Exceptions
spark::base::DuplicatedApplicationExceptionIf an application was already created before.

Member Function Documentation

◆ build()

template<typename... Tags>
std::unique_ptr< Application > spark::core::ApplicationBuilder< Tags >::build ( )

Builds the application with the given settings.

Returns
A std::unique_ptr to the newly created application.

◆ setName()

template<typename... Tags>
ApplicationBuilder< details::application_tags::set_name_called, Tags... > spark::core::ApplicationBuilder< Tags >::setName ( std::string name)

Sets the name of the application.

Parameters
nameA std::string containing the name of the application.
Returns
A new builder used to continue building the application.

◆ setResizable()

template<typename... Tags>
ApplicationBuilder< details::application_tags::set_resize_policy, Tags... > spark::core::ApplicationBuilder< Tags >::setResizable ( bool resizable)

Sets whether the application window is resizable.

Parameters
resizabletrue if the window should be resizable, false otherwise.
Returns
A new builder used to continue building the application.

◆ setSize()

template<typename... Tags>
ApplicationBuilder< details::application_tags::set_size_called, Tags... > spark::core::ApplicationBuilder< Tags >::setSize ( unsigned int width,
unsigned int height )

Sets the size of the application window.

Parameters
widthThe width of the window.
heightThe height of the window.
Returns
A new builder used to continue building the application.