logic: moved Storage into Project
Moved Storage instantiation into the Project. Storage access is still handled via the GraphAccess and LocationAccess interfaces, but the ComponentFactory now only serves proxy implementations of these access classes. Project is responsible for setting the subject of the proxies to the current Storage instance.
This commit is contained in:
+8
-4
@@ -6,12 +6,13 @@
|
||||
#include "data/Storage.h"
|
||||
#include "ProjectSettings.h"
|
||||
|
||||
class GraphAccessProxy;
|
||||
class LocationAccessProxy;
|
||||
|
||||
class Project
|
||||
{
|
||||
public:
|
||||
static std::shared_ptr<Project> create(
|
||||
std::shared_ptr<Storage> storage
|
||||
);
|
||||
static std::shared_ptr<Project> create(GraphAccessProxy* graphAccessProxy, LocationAccessProxy* locationAccessProxy);
|
||||
|
||||
~Project();
|
||||
|
||||
@@ -23,10 +24,13 @@ public:
|
||||
void parseCode();
|
||||
|
||||
private:
|
||||
Project();
|
||||
Project(GraphAccessProxy* graphAccessProxy, LocationAccessProxy* locationAccessProxy);
|
||||
Project(const Project&);
|
||||
Project operator=(const Project&);
|
||||
|
||||
GraphAccessProxy* const m_graphAccessProxy;
|
||||
LocationAccessProxy* const m_locationAccessProxy;
|
||||
|
||||
std::shared_ptr<Storage> m_storage;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user