33 #ifndef DART_UTILS_PACKAGERESOURCERETRIEVER_HPP_
34 #define DART_UTILS_PACKAGERESOURCERETRIEVER_HPP_
36 #include <unordered_map>
86 const std::string& _packageDirectory);
99 std::unordered_map<std::string, std::vector<std::string> >
mPackageMap;
102 const std::string& _packageName)
const;
104 std::string& _packageName, std::string& _relativePath)
const;
ResourceRetriever provides methods for testing for the existance of and accessing the content of a re...
Definition: ResourceRetriever.hpp:47
Retrieve local resources specified by package:// URIs by: (1) resolving the package path and (2) pass...
Definition: PackageResourceRetriever.hpp:49
std::string getFilePath(const common::Uri &uri) override
Returns absolute file path to uri; an empty string if unavailable.
Definition: PackageResourceRetriever.cpp:107
std::unordered_map< std::string, std::vector< std::string > > mPackageMap
Definition: PackageResourceRetriever.hpp:99
void addPackageDirectory(const std::string &_packageName, const std::string &_packageDirectory)
Specify the directory of a ROS package.
Definition: PackageResourceRetriever.cpp:55
virtual ~PackageResourceRetriever()=default
common::ResourcePtr retrieve(const common::Uri &_uri) override
Returns the resource specified by a URI or nullptr on failure.
Definition: PackageResourceRetriever.cpp:89
bool exists(const common::Uri &_uri) override
Returns whether the resource specified by a URI exists.
Definition: PackageResourceRetriever.cpp:70
const std::vector< std::string > & getPackagePaths(const std::string &_packageName) const
Definition: PackageResourceRetriever.cpp:129
PackageResourceRetriever(const common::ResourceRetrieverPtr &_localRetriever=nullptr)
Construct a PackageResourceRetriever that uses the specified _localRetriever to load resolved URIs.
Definition: PackageResourceRetriever.cpp:45
common::ResourceRetrieverPtr mLocalRetriever
Definition: PackageResourceRetriever.hpp:98
bool resolvePackageUri(const common::Uri &_uri, std::string &_packageName, std::string &_relativePath) const
Definition: PackageResourceRetriever.cpp:148
std::shared_ptr< Resource > ResourcePtr
Definition: Resource.hpp:88
std::shared_ptr< ResourceRetriever > ResourceRetrieverPtr
Definition: ResourceRetriever.hpp:76
std::shared_ptr< PackageResourceRetriever > PackageResourceRetrieverPtr
Definition: PackageResourceRetriever.hpp:107
Definition: BulletCollisionDetector.cpp:63
The Uri struct provides URI parsing and merging functionality based on RFC 3986.
Definition: Uri.hpp:87