Nazara Engine  0.4
A fast, complete, cross-platform API designed for game development
Initializer.hpp
1 // Copyright (C) 2017 Jérôme Leclercq
2 // This file is part of the "Nazara Engine - Core module"
3 // For conditions of distribution and use, see copyright notice in Config.hpp
4 
5 #pragma once
6 
7 #ifndef NAZARA_INITIALIZER_HPP
8 #define NAZARA_INITIALIZER_HPP
9 
10 #include <Nazara/Prerequesites.hpp>
11 
12 namespace Nz
13 {
14  template<typename... Args>
16  {
17  public:
18  Initializer(bool initialize = true);
19  Initializer(const Initializer&) = delete;
20  Initializer(Initializer&&) = delete;
21  ~Initializer();
22 
23  bool Initialize();
24  bool IsInitialized() const;
25  void Uninitialize();
26 
27  explicit operator bool() const;
28 
29  Initializer& operator=(const Initializer&) = delete;
30  Initializer& operator=(Initializer&&) = delete;
31 
32  private:
33  bool m_initialized;
34  };
35 }
36 
37 #include <Nazara/Core/Initializer.inl>
38 
39 #endif // NAZARA_INITIALIZER_HPP
TODO: Inherit SoundEmitter from Node.
Definition: Algorithm.hpp:12
Core class that represents a module initializer.
Definition: Initializer.hpp:15
Initializer(bool initialize=true)
Constructs a Initializer object with a boolean.
Definition: Initializer.inl:62
bool Initialize()
Initialize the module.
Definition: Initializer.inl:86
bool IsInitialized() const
Checks whether the module is initialized.
Definition: Initializer.inl:99
~Initializer()
TODO.
Definition: Initializer.inl:75
void Uninitialize()
Uninitialize the module.
Definition: Initializer.inl:110