Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Merge pull request #9342 from lioncash/system
Core: Add initial System class
- Loading branch information
Showing
5 changed files
with
60 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -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 |