diff options
author | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-30 14:12:32 +0100 |
---|---|---|
committer | Benjamin Paassen <bpaassen@techfak.uni-bielefeld.de> | 2015-01-30 14:12:32 +0100 |
commit | 00dcccce979243fa9721e5be27eedc136ad439e5 (patch) | |
tree | 0c4fd4a3240dbf6c486531b1cf3295f98ffaaa25 /src/core/resource/ResourceManager.hpp | |
parent | 8a17a5fae586e86278a74800e1a3fd5e70e4e8c3 (diff) |
some formatting stuff and cycle detection in include as well as repeated import detection.
Diffstat (limited to 'src/core/resource/ResourceManager.hpp')
-rw-r--r-- | src/core/resource/ResourceManager.hpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/core/resource/ResourceManager.hpp b/src/core/resource/ResourceManager.hpp index 1279bee..186ce42 100644 --- a/src/core/resource/ResourceManager.hpp +++ b/src/core/resource/ResourceManager.hpp @@ -82,6 +82,11 @@ private: std::unordered_map<SourceId, ManagedUid> nodes; /** + * The set of SourceIds for which resources are currently being parsed. + */ + std::unordered_set<SourceId> currentlyParsing; + + /** * Map containing SourceContextReader instances which are -- as their name * suggests -- used to produce SourceContext structures describing the * source code at a given SourceLocation. @@ -132,8 +137,8 @@ private: * @return the parsed nodes or an empty list if something went wrong. */ NodeVector<Node> parse(ParserContext &ctx, const std::string &path, - const std::string &mimetype, const std::string &rel, - const RttiSet &supportedTypes, ParseMode mode); + const std::string &mimetype, const std::string &rel, + const RttiSet &supportedTypes, ParseMode mode); public: /** @@ -161,8 +166,8 @@ public: * @return the parsed node or nullptr if something went wrong. */ Rooted<Node> import(ParserContext &ctx, const std::string &path, - const std::string &mimetype, const std::string &rel, - const RttiSet &supportedTypes); + const std::string &mimetype, const std::string &rel, + const RttiSet &supportedTypes); /** * Resolves the reference to the file specified by the given path and parses @@ -192,8 +197,9 @@ public: * @return the parsed nodes or an empty list if something went wrong. */ NodeVector<Node> include(ParserContext &ctx, const std::string &path, - const std::string &mimetype, const std::string &rel, - const RttiSet &supportedTypes); + const std::string &mimetype, + const std::string &rel, + const RttiSet &supportedTypes); /** * Creates and returns a SourceContext structure containing information |