Skip to content
Permalink
Browse files
Merge pull request #9342 from lioncash/system
Core: Add initial System class
  • Loading branch information
JosJuice committed Dec 20, 2020
2 parents 5493a86 + 142406f commit c582fb0
Show file tree
Hide file tree
Showing 5 changed files with 60 additions and 0 deletions.
@@ -41,6 +41,8 @@ add_library(core
SyncIdentifier.h
SysConf.cpp
SysConf.h
System.cpp
System.h
TitleDatabase.cpp
TitleDatabase.h
WiiRoot.cpp
@@ -371,6 +371,7 @@
<ClCompile Include="PowerPC\SignatureDB\SignatureDB.cpp" />
<ClCompile Include="State.cpp" />
<ClCompile Include="SysConf.cpp" />
<ClCompile Include="System.cpp" />
<ClCompile Include="TitleDatabase.cpp" />
<ClCompile Include="WiiRoot.cpp" />
<ClCompile Include="WiiUtils.cpp" />
@@ -678,6 +679,7 @@
<ClInclude Include="State.h" />
<ClInclude Include="SyncIdentifier.h" />
<ClInclude Include="SysConf.h" />
<ClInclude Include="System.h" />
<ClInclude Include="Titles.h" />
<ClInclude Include="TitleDatabase.h" />
<ClInclude Include="WiiRoot.h" />
@@ -187,6 +187,7 @@
<ClCompile Include="PatchEngine.cpp" />
<ClCompile Include="State.cpp" />
<ClCompile Include="SysConf.cpp" />
<ClCompile Include="System.cpp" />
<ClCompile Include="TitleDatabase.cpp" />
<ClCompile Include="WiiRoot.cpp" />
<ClCompile Include="WiiUtils.cpp" />
@@ -1022,6 +1023,7 @@
<ClInclude Include="PatchEngine.h" />
<ClInclude Include="State.h" />
<ClInclude Include="SysConf.h" />
<ClInclude Include="System.h" />
<ClInclude Include="Titles.h" />
<ClInclude Include="TitleDatabase.h" />
<ClInclude Include="WiiRoot.h" />
@@ -0,0 +1,18 @@
// Copyright 2020 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#include "Core/System.h"

namespace Core
{
struct System::Impl
{
};

System::System() : m_impl{std::make_unique<Impl>()}
{
}

System::~System() = default;
} // namespace Core
@@ -0,0 +1,36 @@
// Copyright 2020 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.

#pragma once

#include <memory>

namespace Core
{
// Central class that encapsulates the running system.
class System
{
public:
~System();

System(const System&) = delete;
System& operator=(const System&) = delete;

System(System&&) = delete;
System& operator=(System&&) = delete;

// Intermediate instance accessor until global state is eliminated.
static System& GetInstance()
{
static System instance;
return instance;
}

private:
System();

struct Impl;
std::unique_ptr<Impl> m_impl;
};
} // namespace Core

0 comments on commit c582fb0

Please sign in to comment.