Remove IInitable class
This commit is contained in:
@@ -1,14 +1,20 @@
|
||||
/*
|
||||
* This Source Code Form is subject to the terms of the Mozilla Public
|
||||
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <string>
|
||||
#include "IInitable.hpp"
|
||||
|
||||
#include "ITickable.hpp"
|
||||
#include "ICloseable.hpp"
|
||||
#include <string>
|
||||
|
||||
namespace openVulkanoCpp
|
||||
{
|
||||
class IGraphicsAppManager;
|
||||
|
||||
class IGraphicsApp : public IInitable, public ITickable, public ICloseable
|
||||
class IGraphicsApp : public ITickable, public ICloseable
|
||||
{
|
||||
private:
|
||||
IGraphicsAppManager* manager = nullptr;
|
||||
@@ -16,6 +22,7 @@ namespace openVulkanoCpp
|
||||
public:
|
||||
virtual ~IGraphicsApp() = default;
|
||||
|
||||
virtual void Init() = 0;
|
||||
IGraphicsAppManager* GetGraphicsAppManager() const { return manager; }
|
||||
void SetGraphicsAppManager(IGraphicsAppManager* manager) { this->manager = manager; }
|
||||
virtual std::string GetAppName() = 0;
|
||||
|
||||
@@ -1,12 +0,0 @@
|
||||
#pragma once
|
||||
|
||||
namespace openVulkanoCpp
|
||||
{
|
||||
class IInitable
|
||||
{
|
||||
public:
|
||||
virtual ~IInitable() = default;
|
||||
|
||||
virtual void Init() = 0;
|
||||
};
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
#pragma once
|
||||
|
||||
#include "IInitable.hpp"
|
||||
#include "ITickable.hpp"
|
||||
#include "ICloseable.hpp"
|
||||
#include "UI/IWindow.hpp"
|
||||
@@ -13,9 +12,11 @@ namespace openVulkanoCpp
|
||||
PlatformInitFailedException(char const* const message) : runtime_error(message) {}
|
||||
};
|
||||
|
||||
class IPlatform : public IInitable, public ITickable, public ICloseable
|
||||
class IPlatform : public ITickable, public ICloseable
|
||||
{
|
||||
public:
|
||||
virtual void Init() = 0;
|
||||
|
||||
virtual IWindow* MakeWindow() = 0;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Base/IInitable.hpp"
|
||||
#include "Base/ITickable.hpp"
|
||||
#include "Base/ICloseable.hpp"
|
||||
#include "Base/IPlatform.hpp"
|
||||
@@ -19,7 +18,7 @@ namespace openVulkanoCpp
|
||||
{
|
||||
class WindowGLFW;
|
||||
|
||||
class InputProviderGLFW final : public IInitable, public ITickable, public ICloseable
|
||||
class InputProviderGLFW final : public ITickable, public ICloseable
|
||||
{
|
||||
friend WindowGLFW;
|
||||
static InputProviderGLFW* INSTANCE;
|
||||
@@ -31,7 +30,7 @@ namespace openVulkanoCpp
|
||||
bool activeWindowChanged = false;
|
||||
|
||||
public:
|
||||
void Init() override;
|
||||
void Init();
|
||||
|
||||
void Close() override;
|
||||
|
||||
|
||||
@@ -30,7 +30,7 @@ namespace openVulkanoCpp
|
||||
|
||||
[[nodiscard]] bool IsInitialized() const { return initialized; }
|
||||
|
||||
void Init() override;
|
||||
void Init();
|
||||
|
||||
void Tick() override;
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ namespace openVulkanoCpp
|
||||
UINT16 = sizeof(uint16_t), UINT32 = sizeof(uint32_t)
|
||||
};
|
||||
|
||||
class Geometry : public virtual ICloseable
|
||||
class Geometry : public ICloseable
|
||||
{
|
||||
public:
|
||||
uint32_t vertexCount = 0, indexCount = 0;
|
||||
|
||||
@@ -6,7 +6,6 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include "Base/IInitable.hpp"
|
||||
#include "Base/ICloseable.hpp"
|
||||
#include "Math/Math.hpp"
|
||||
#include "Drawable.hpp"
|
||||
@@ -18,7 +17,7 @@ namespace openVulkanoCpp::Scene
|
||||
{
|
||||
class Scene;
|
||||
|
||||
class Node : public virtual IInitable, public virtual ICloseable
|
||||
class Node : public ICloseable
|
||||
{
|
||||
friend Scene;
|
||||
|
||||
@@ -37,7 +36,7 @@ namespace openVulkanoCpp::Scene
|
||||
|
||||
~Node() override;
|
||||
|
||||
void Init() override;
|
||||
void Init();
|
||||
|
||||
void Close() override;
|
||||
|
||||
|
||||
@@ -15,7 +15,7 @@ namespace openVulkanoCpp
|
||||
{
|
||||
namespace Scene
|
||||
{
|
||||
class Scene : virtual public IInitable, virtual public ICloseable
|
||||
class Scene : public ICloseable
|
||||
{
|
||||
public:
|
||||
Node* root;
|
||||
@@ -30,7 +30,7 @@ namespace openVulkanoCpp
|
||||
if (root) Scene::Close();
|
||||
}
|
||||
|
||||
void Init() override
|
||||
void Init()
|
||||
{
|
||||
Node* newRoot = new Node();
|
||||
newRoot->Init();
|
||||
|
||||
Reference in New Issue
Block a user