diff options
author | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-28 01:11:27 +0100 |
---|---|---|
committer | Andreas Stöckel <astoecke@techfak.uni-bielefeld.de> | 2015-01-28 01:11:27 +0100 |
commit | c6fecd21e3a41b520a86b929aed04f4a4e61fcb2 (patch) | |
tree | a982805ccc1c10499e5a2225c2c7fbfbbd87c0b1 /src/core/parser | |
parent | f330623143d76e56a9bd95e4c1658dd3fcf69ac6 (diff) |
Returning again a single node as result of the import function (as this is already explicitly checked for).
Diffstat (limited to 'src/core/parser')
-rw-r--r-- | src/core/parser/ParserContext.cpp | 2 | ||||
-rw-r--r-- | src/core/parser/ParserContext.hpp | 12 |
2 files changed, 8 insertions, 6 deletions
diff --git a/src/core/parser/ParserContext.cpp b/src/core/parser/ParserContext.cpp index b4e2a9a..14b02df 100644 --- a/src/core/parser/ParserContext.cpp +++ b/src/core/parser/ParserContext.cpp @@ -39,7 +39,7 @@ ParserContext::ParserContext(Registry ®istry, { } -NodeVector<Node> ParserContext::import(const std::string &path, +Rooted<Node> ParserContext::import(const std::string &path, const std::string mimetype, const std::string rel, const RttiSet &supportedTypes) diff --git a/src/core/parser/ParserContext.hpp b/src/core/parser/ParserContext.hpp index 2787225..1b889b1 100644 --- a/src/core/parser/ParserContext.hpp +++ b/src/core/parser/ParserContext.hpp @@ -117,8 +117,8 @@ public: * checked, not the actual result. * @return the parsed node or nullptr if something goes wrong. */ - NodeVector<Node> import(const std::string &path, const std::string mimetype, - const std::string rel, const RttiSet &supportedTypes); + Rooted<Node> import(const std::string &path, const std::string mimetype, + const std::string rel, const RttiSet &supportedTypes); /** * Parses a file with ParserContext and the current ParserScope. In contrast @@ -136,10 +136,12 @@ public: * @param supportedTypes contains the types of the returned Node the caller * can deal with. Note that only the types the parser claims to return are * checked, not the actual result. - * @return the parsed node or nullptr if something goes wrong. + * @return the parsed nodes or an empty list if something goes wrong (or + * there were indeed no objects to be parsed). */ - NodeVector<Node> include(const std::string &path, const std::string mimetype, - const std::string rel, const RttiSet &supportedTypes); + NodeVector<Node> include(const std::string &path, + const std::string mimetype, const std::string rel, + const RttiSet &supportedTypes); /** * Clones the ParserContext instance but exchanges the ParserScope instance |