33 #ifndef DART_UTILS_DARTRESOURCERETRIEVER_HPP_
34 #define DART_UTILS_DARTRESOURCERETRIEVER_HPP_
36 #include <unordered_map>
66 template <
typename... Args>
67 static std::shared_ptr<DartResourceRetriever>
create(Args&&... args)
69 return std::make_shared<DartResourceRetriever>(
70 std::forward<Args>(args)...);
ResourceRetriever provides methods for testing for the existance of and accessing the content of a re...
Definition: ResourceRetriever.hpp:47
Retrieve local resources from sample data files given file URI.
Definition: DartResourceRetriever.hpp:64
void addDataDirectory(const std::string &packageDirectory)
Definition: DartResourceRetriever.cpp:167
bool resolveDataUri(const common::Uri &uri, std::string &relativePath) const
Definition: DartResourceRetriever.cpp:186
static std::shared_ptr< DartResourceRetriever > create(Args &&... args)
Definition: DartResourceRetriever.hpp:67
DartResourceRetriever()
Constructor.
Definition: DartResourceRetriever.cpp:46
common::ResourceRetrieverPtr mLocalRetriever
Definition: DartResourceRetriever.hpp:95
std::string getFilePath(const common::Uri &uri) override
Returns absolute file path to uri; an empty string if unavailable.
Definition: DartResourceRetriever.cpp:129
bool exists(const common::Uri &uri) override
Returns whether the resource specified by a URI exists.
Definition: DartResourceRetriever.cpp:65
common::ResourcePtr retrieve(const common::Uri &uri) override
Returns the resource specified by a URI or nullptr on failure.
Definition: DartResourceRetriever.cpp:97
std::vector< std::string > mDataDirectories
Definition: DartResourceRetriever.hpp:97
~DartResourceRetriever() override=default
Destructor.
std::shared_ptr< Resource > ResourcePtr
Definition: Resource.hpp:88
std::shared_ptr< ResourceRetriever > ResourceRetrieverPtr
Definition: ResourceRetriever.hpp:76
std::shared_ptr< DartResourceRetriever > DartResourceRetrieverPtr
Definition: DartResourceRetriever.hpp:100
Definition: BulletCollisionDetector.cpp:63
The Uri struct provides URI parsing and merging functionality based on RFC 3986.
Definition: Uri.hpp:87