-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathapplication.hpp
53 lines (40 loc) · 1.5 KB
/
application.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#ifndef SYSTEM_APPLICATION_HPP
#define SYSTEM_APPLICATION_HPP
#include <mutex>
#include <string>
namespace framework::system
{
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @addtogroup system_application_class
/// @{
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @brief Application class.
///
/// Singleton class with global application specific parameters.
class Application
{
public:
/// @brief Sets the formal name of the application.
///
/// @param name Application name.
static void set_name(const std::string& name);
/// @brief The formal name of the application.
///
/// Used in window creation to name window class on some OS.
///
/// @return Application name.
static const std::string& name();
Application(const Application&) = delete;
Application& operator=(const Application&) = delete;
private:
static Application& instance();
Application() = default;
~Application() = default;
static std::mutex m_data_mutex;
std::string m_name = "Neutrino application"; ///< Default application name.
};
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
/// @}
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
} // namespace framework::system
#endif