summaryrefslogtreecommitdiffstats
path: root/src/uscxml/URL.h
diff options
context:
space:
mode:
authorStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-01-16 00:31:12 (GMT)
committerStefan Radomski <radomski@tk.informatik.tu-darmstadt.de>2013-01-16 00:31:12 (GMT)
commit57b7b1cb196ea9f51aebaba1a838b9a86a9f83fe (patch)
treed2ae2a83f1357b66c9712b741a2ad048444caa06 /src/uscxml/URL.h
parent1088a76a715ef8a2728ad3fa8cde02bde4eec760 (diff)
downloaduscxml-57b7b1cb196ea9f51aebaba1a838b9a86a9f83fe.zip
uscxml-57b7b1cb196ea9f51aebaba1a838b9a86a9f83fe.tar.gz
uscxml-57b7b1cb196ea9f51aebaba1a838b9a86a9f83fe.tar.bz2
More work on Prolog datamodel
Diffstat (limited to 'src/uscxml/URL.h')
-rw-r--r--src/uscxml/URL.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/uscxml/URL.h b/src/uscxml/URL.h
index 07921f3..5bcbd27 100644
--- a/src/uscxml/URL.h
+++ b/src/uscxml/URL.h
@@ -22,6 +22,8 @@ public:
const bool toAbsolute(const std::string& baseUrl);
const std::string asLocalFile(const std::string& suffix, bool reload = false);
+ static boost::shared_ptr<URLImpl> toLocalFile(const std::string& content, const std::string& suffix);
+
const bool isAbsolute() const { return _uri.is_absolute(); }
const std::string scheme() const { return _uri.scheme(); }
const std::string host() const { return _uri.host(); }
@@ -30,6 +32,8 @@ public:
const std::string asString() const { return _uri.as_string(); }
private:
+ std::string getLocalFilename(const std::string& suffix);
+
Arabica::io::URI _uri;
std::string _localFile;
};
@@ -41,6 +45,11 @@ public:
URL(boost::shared_ptr<URLImpl> const impl) : _impl(impl) { }
URL(const URL& other) : _impl(other._impl) { }
virtual ~URL() {};
+
+ static URL toLocalFile(const std::string& content, const std::string& suffix) {
+ boost::shared_ptr<URLImpl> impl = URLImpl::toLocalFile(content, suffix);
+ return URL(impl);
+ }
operator bool() const { return _impl;}
bool operator< (const URL& other) const { return _impl < other._impl; }