From 7477cd0f968fa4c8446972b711b0d66252ab3431 Mon Sep 17 00:00:00 2001 From: Andreas Stöckel Date: Mon, 16 Feb 2015 18:57:19 +0100 Subject: Using autocomplete in ResourceRequest to determine filename if no extension is given --- src/core/resource/ResourceRequest.hpp | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) (limited to 'src/core/resource/ResourceRequest.hpp') diff --git a/src/core/resource/ResourceRequest.hpp b/src/core/resource/ResourceRequest.hpp index 9d5728f..a06d360 100644 --- a/src/core/resource/ResourceRequest.hpp +++ b/src/core/resource/ResourceRequest.hpp @@ -76,6 +76,11 @@ private: */ RttiSet parserTypes; + /** + * The resource relative to which this resource is to be located. + */ + Resource relativeTo; + /** * ResourceType as deduced from the user provided values. */ @@ -101,9 +106,12 @@ public: * @param supportedTypes specifies the types of the Node that may result * from the resource once it has been parsed. This value is not directly * provided by the user, but by the calling code. + * @param relativeTo is another resource relative to which the Resource + * should be looked up. */ ResourceRequest(const std::string &path, const std::string &mimetype, - const std::string &rel, const RttiSet &supportedTypes); + const std::string &rel, const RttiSet &supportedTypes, + const Resource &relativeTo = NullResource); /** * Tries to deduce all possible information and produces log messages for @@ -127,13 +135,10 @@ public: * logged. * @param resource is the Resource descriptor that should be filled with the * actual location. - * @param relativeTo is another resource relative to which the Resource - * should be looked up. * @return true if a resource was found, false otherwise. Equivalent to * the value of resource.isValid(). */ - bool locate(Registry ®istry, Logger &logger, Resource &resource, - const Resource &relativeTo = NullResource) const; + bool locate(Registry ®istry, Logger &logger, Resource &resource) const; /** * Returns the requested path of the file that should be included. -- cgit v1.2.3