Merge pull request #9342 from lioncash/system
Core: Add initial System class
This commit is contained in:
commit
c582fb098d
|
@ -41,6 +41,8 @@ add_library(core
|
||||||
SyncIdentifier.h
|
SyncIdentifier.h
|
||||||
SysConf.cpp
|
SysConf.cpp
|
||||||
SysConf.h
|
SysConf.h
|
||||||
|
System.cpp
|
||||||
|
System.h
|
||||||
TitleDatabase.cpp
|
TitleDatabase.cpp
|
||||||
TitleDatabase.h
|
TitleDatabase.h
|
||||||
WiiRoot.cpp
|
WiiRoot.cpp
|
||||||
|
|
|
@ -371,6 +371,7 @@
|
||||||
<ClCompile Include="PowerPC\SignatureDB\SignatureDB.cpp" />
|
<ClCompile Include="PowerPC\SignatureDB\SignatureDB.cpp" />
|
||||||
<ClCompile Include="State.cpp" />
|
<ClCompile Include="State.cpp" />
|
||||||
<ClCompile Include="SysConf.cpp" />
|
<ClCompile Include="SysConf.cpp" />
|
||||||
|
<ClCompile Include="System.cpp" />
|
||||||
<ClCompile Include="TitleDatabase.cpp" />
|
<ClCompile Include="TitleDatabase.cpp" />
|
||||||
<ClCompile Include="WiiRoot.cpp" />
|
<ClCompile Include="WiiRoot.cpp" />
|
||||||
<ClCompile Include="WiiUtils.cpp" />
|
<ClCompile Include="WiiUtils.cpp" />
|
||||||
|
@ -678,6 +679,7 @@
|
||||||
<ClInclude Include="State.h" />
|
<ClInclude Include="State.h" />
|
||||||
<ClInclude Include="SyncIdentifier.h" />
|
<ClInclude Include="SyncIdentifier.h" />
|
||||||
<ClInclude Include="SysConf.h" />
|
<ClInclude Include="SysConf.h" />
|
||||||
|
<ClInclude Include="System.h" />
|
||||||
<ClInclude Include="Titles.h" />
|
<ClInclude Include="Titles.h" />
|
||||||
<ClInclude Include="TitleDatabase.h" />
|
<ClInclude Include="TitleDatabase.h" />
|
||||||
<ClInclude Include="WiiRoot.h" />
|
<ClInclude Include="WiiRoot.h" />
|
||||||
|
|
|
@ -187,6 +187,7 @@
|
||||||
<ClCompile Include="PatchEngine.cpp" />
|
<ClCompile Include="PatchEngine.cpp" />
|
||||||
<ClCompile Include="State.cpp" />
|
<ClCompile Include="State.cpp" />
|
||||||
<ClCompile Include="SysConf.cpp" />
|
<ClCompile Include="SysConf.cpp" />
|
||||||
|
<ClCompile Include="System.cpp" />
|
||||||
<ClCompile Include="TitleDatabase.cpp" />
|
<ClCompile Include="TitleDatabase.cpp" />
|
||||||
<ClCompile Include="WiiRoot.cpp" />
|
<ClCompile Include="WiiRoot.cpp" />
|
||||||
<ClCompile Include="WiiUtils.cpp" />
|
<ClCompile Include="WiiUtils.cpp" />
|
||||||
|
@ -1022,6 +1023,7 @@
|
||||||
<ClInclude Include="PatchEngine.h" />
|
<ClInclude Include="PatchEngine.h" />
|
||||||
<ClInclude Include="State.h" />
|
<ClInclude Include="State.h" />
|
||||||
<ClInclude Include="SysConf.h" />
|
<ClInclude Include="SysConf.h" />
|
||||||
|
<ClInclude Include="System.h" />
|
||||||
<ClInclude Include="Titles.h" />
|
<ClInclude Include="Titles.h" />
|
||||||
<ClInclude Include="TitleDatabase.h" />
|
<ClInclude Include="TitleDatabase.h" />
|
||||||
<ClInclude Include="WiiRoot.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
|
Loading…
Reference in New Issue