33#ifndef DART_UTILS_COMPOSITERESOURCERETRIEVER_HPP_
34#define DART_UTILS_COMPOSITERESOURCERETRIEVER_HPP_
36#include <unordered_map>
68 const std::string& _schema,
84 std::unordered_map<std::string, std::vector<common::ResourceRetrieverPtr> >
91 = std::shared_ptr<CompositeResourceRetriever>;
#define DART_DECLARE_CLASS_WITH_VIRTUAL_BASE_END
Definition ClassWithVirtualBase.hpp:44
#define DART_DECLARE_CLASS_WITH_VIRTUAL_BASE_BEGIN
Definition ClassWithVirtualBase.hpp:43
ResourceRetriever provides methods for testing for the existance of and accessing the content of a re...
Definition ResourceRetriever.hpp:47
CompositeResourceRetriever allows multiple ResourceRetriever to be used interchangably by: (1) associ...
Definition CompositeResourceRetriever.hpp:50
bool addSchemaRetriever(const std::string &_schema, const common::ResourceRetrieverPtr &_resourceRetriever)
Add a default ResourceRetriever for _schema This ResourceRetriever will be called after URIs that mat...
Definition CompositeResourceRetriever.cpp:49
std::string getFilePath(const common::Uri &uri) override
Returns absolute file path to uri; an empty string if unavailable.
Definition CompositeResourceRetriever.cpp:105
void addDefaultRetriever(const common::ResourceRetrieverPtr &_resourceRetriever)
Add a default ResourceRetriever for all URIs.
Definition CompositeResourceRetriever.cpp:42
std::unordered_map< std::string, std::vector< common::ResourceRetrieverPtr > > mResourceRetrievers
Definition CompositeResourceRetriever.hpp:85
virtual ~CompositeResourceRetriever()=default
std::vector< common::ResourceRetrieverPtr > mDefaultResourceRetrievers
Definition CompositeResourceRetriever.hpp:86
bool exists(const common::Uri &_uri) override
Returns whether the resource specified by a URI exists.
Definition CompositeResourceRetriever.cpp:74
common::ResourcePtr retrieve(const common::Uri &_uri) override
Returns the resource specified by a URI or nullptr on failure.
Definition CompositeResourceRetriever.cpp:86
std::vector< common::ResourceRetrieverPtr > getRetrievers(const common::Uri &_uri) const
Definition CompositeResourceRetriever.cpp:119
std::shared_ptr< Resource > ResourcePtr
Definition Resource.hpp:90
std::shared_ptr< ResourceRetriever > ResourceRetrieverPtr
Definition ResourceRetriever.hpp:76
std::shared_ptr< CompositeResourceRetriever > CompositeResourceRetrieverPtr
Definition CompositeResourceRetriever.hpp:91
Definition BulletCollisionDetector.cpp:65
The Uri struct provides URI parsing and merging functionality based on RFC 3986.
Definition Uri.hpp:87