summaryrefslogtreecommitdiff
path: root/src/core/model
diff options
context:
space:
mode:
authorAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-25 18:57:19 +0100
committerAndreas Stöckel <astoecke@techfak.uni-bielefeld.de>2015-01-25 18:57:19 +0100
commit67c3618e593f88eb8177404475586735902d693f (patch)
tree274bbc603aa2ec3bdb5b23294b090bf6d137f560 /src/core/model
parent1a6236c184d7ffe3551d417b656aee31b15d1948 (diff)
Restructures parser classes a little, removed Registry from ParserContext, gave a ResourceManager instance to the Project, using ResourceRequest when including or linking files, thought through how "including" and "linking" are handled
Diffstat (limited to 'src/core/model')
-rw-r--r--src/core/model/Project.cpp4
-rw-r--r--src/core/model/Project.hpp20
2 files changed, 19 insertions, 5 deletions
diff --git a/src/core/model/Project.cpp b/src/core/model/Project.cpp
index 45a5c69..a298ffc 100644
--- a/src/core/model/Project.cpp
+++ b/src/core/model/Project.cpp
@@ -25,9 +25,9 @@
namespace ousia {
-
-Project::Project(Manager &mgr)
+Project::Project(Manager &mgr, Registry &registry)
: Node(mgr),
+ registry(registry),
systemTypesystem(acquire(new SystemTypesystem(mgr))),
documents(this)
{
diff --git a/src/core/model/Project.hpp b/src/core/model/Project.hpp
index 642059c..2c50f49 100644
--- a/src/core/model/Project.hpp
+++ b/src/core/model/Project.hpp
@@ -28,6 +28,8 @@
#ifndef _OUSIA_PROJECT_HPP_
#define _OUSIA_PROJECT_HPP_
+#include <core/resource/ResourceManager.hpp>
+
#include "Node.hpp"
namespace ousia {
@@ -35,8 +37,8 @@ namespace ousia {
// Forward declarations
class Logger;
class Rtti;
-
-
+class Registry;
+class ParserContext;
class SystemTypesystem;
class Typesystem;
class Document;
@@ -50,6 +52,11 @@ class Domain;
class Project : public Node {
private:
/**
+ * Reference at the internally used Registry instance.
+ */
+ Registry &registry;
+
+ /**
* Private instance of the system typesystem which is distributed as a
* reference to all child typesystems.
*/
@@ -60,6 +67,11 @@ private:
*/
NodeVector<Document> documents;
+ /**
+ * ResourceManager used to manage all resources used by the project.
+ */
+ ResourceManager resourceManager;
+
protected:
/**
* Validates the project and all parts it consists of.
@@ -73,8 +85,10 @@ public:
* Constructor of the Project class.
*
* @param mgr is the manager instance used for managing this Node.
+ * @param registry is the registry instance that should be used for locating
+ * files and finding parsers for these files.
*/
- Project(Manager &mgr);
+ Project(Manager &mgr, Registry &registry);
/**
* Returns a reference to the internal system typesystem.