Add Mrntt component; init globalMind in mrntt.initializeReq
This makes the initialization sequence much cleaner and conceptually well encapsulated. We also now dynamically allocate the Mind objects. They're allocated dynamically by Mrntt inside of initializeReq. This means that we no longer have to worry about jolting and cleaning up the running threads of global mind object even when we never explicitly called Mind.initializeReq. Along with other conceptual improvements to our abstractions, this patch also gets us to a real "end of program initialization" point for the first time.
This commit is contained in:
@@ -2,15 +2,25 @@
|
||||
#define SIMULATOR_H
|
||||
|
||||
#include <config.h>
|
||||
#include <component.h>
|
||||
#include <simulator/scene.h>
|
||||
|
||||
namespace smo {
|
||||
|
||||
class Mind;
|
||||
class ComponentThread;
|
||||
|
||||
namespace simulator {
|
||||
|
||||
class Simulator {
|
||||
class Simulator
|
||||
: public MindComponent
|
||||
{
|
||||
public:
|
||||
Simulator() = default;
|
||||
~Simulator() = default;
|
||||
Simulator(Mind &parent, const std::shared_ptr<ComponentThread> &thread)
|
||||
: MindComponent(parent, thread)
|
||||
{}
|
||||
|
||||
~Simulator() = default;
|
||||
|
||||
void initialize();
|
||||
void loadScene(Scene::Id sceneId, Scene &scene);
|
||||
|
||||
Reference in New Issue
Block a user