Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
#5231: Refactor StartupMapLoader into a standalone module in the UI b…
…inary.
- Loading branch information
1 parent
1a565a0
commit 2e1d3ea
Showing
8 changed files
with
82 additions
and
48 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
15 changes: 9 additions & 6 deletions
15
radiantcore/map/StartupMapLoader.h → radiant/map/StartupMapLoader.h
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 |
---|---|---|
@@ -1,25 +1,28 @@ | ||
#pragma once | ||
|
||
#include "iradiant.h" | ||
#include "imodule.h" | ||
#include <memory> | ||
|
||
namespace map { | ||
namespace map | ||
{ | ||
|
||
class StartupMapLoader : | ||
public sigc::trackable | ||
class StartupMapLoader : | ||
public RegisterableModule | ||
{ | ||
public: | ||
StartupMapLoader(); | ||
const std::string& getName() const override; | ||
const StringSet& getDependencies() const override; | ||
void initialiseModule(const ApplicationContext& ctx) override; | ||
|
||
private: | ||
// This gets called as soon as the mainframe starts up | ||
void onRadiantStartup(); | ||
|
||
// Called when the mainframe shuts down | ||
void onRadiantShutdown(); | ||
|
||
private: | ||
void loadMapSafe(const std::string& map); | ||
}; | ||
typedef std::shared_ptr<StartupMapLoader> StartupMapLoaderPtr; | ||
|
||
} // namespace map |
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
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