Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
tesseract_common::GeneralResourceLocator Class Reference

A general resource loaders using environment variable. More...

#include <resource_locator.h>

Inheritance diagram for tesseract_common::GeneralResourceLocator:
Inheritance graph
[legend]
Collaboration diagram for tesseract_common::GeneralResourceLocator:
Collaboration graph
[legend]

Public Types

using Ptr = std::shared_ptr< GeneralResourceLocator >
 
using ConstPtr = std::shared_ptr< const GeneralResourceLocator >
 
- Public Types inherited from tesseract_common::ResourceLocator
using Ptr = std::shared_ptr< ResourceLocator >
 
using ConstPtr = std::shared_ptr< const ResourceLocator >
 

Public Member Functions

 GeneralResourceLocator ()
 
 GeneralResourceLocator (const GeneralResourceLocator &)=default
 
GeneralResourceLocatoroperator= (const GeneralResourceLocator &)=default
 
 GeneralResourceLocator (GeneralResourceLocator &&)=default
 
GeneralResourceLocatoroperator= (GeneralResourceLocator &&)=default
 
 ~GeneralResourceLocator () override=default
 
std::shared_ptr< ResourcelocateResource (const std::string &url) const override
 Locate a resource based on a URL. More...
 
bool operator== (const GeneralResourceLocator &rhs) const
 
bool operator!= (const GeneralResourceLocator &rhs) const
 
- Public Member Functions inherited from tesseract_common::ResourceLocator
virtual ~ResourceLocator ()=default
 
virtual std::shared_ptr< ResourcelocateResource (const std::string &url) const =0
 Locate a resource based on a URL. More...
 
bool operator== (const ResourceLocator &rhs) const
 
bool operator!= (const ResourceLocator &rhs) const
 

Private Member Functions

template<class Archive >
void serialize (Archive &ar, const unsigned int version)
 

Private Attributes

std::unordered_map< std::string, std::string > package_paths_
 

Friends

class boost::serialization::access
 

Detailed Description

A general resource loaders using environment variable.

Also can set this environment variable TESSERACT_RESOURCE_PATH with ':' separated directories and then use the directires as package names

Member Typedef Documentation

◆ ConstPtr

◆ Ptr

Constructor & Destructor Documentation

◆ GeneralResourceLocator() [1/3]

tesseract_common::GeneralResourceLocator::GeneralResourceLocator ( )

◆ GeneralResourceLocator() [2/3]

tesseract_common::GeneralResourceLocator::GeneralResourceLocator ( const GeneralResourceLocator )
default

◆ GeneralResourceLocator() [3/3]

tesseract_common::GeneralResourceLocator::GeneralResourceLocator ( GeneralResourceLocator &&  )
default

◆ ~GeneralResourceLocator()

tesseract_common::GeneralResourceLocator::~GeneralResourceLocator ( )
overridedefault

Member Function Documentation

◆ locateResource()

std::shared_ptr< Resource > tesseract_common::GeneralResourceLocator::locateResource ( const std::string &  url) const
overridevirtual

Locate a resource based on a URL.

Parameters
urlThe URL of the resource
Returns
A shared pointer to a Resource instance, or nullptr if not found

Implements tesseract_common::ResourceLocator.

◆ operator!=()

bool tesseract_common::GeneralResourceLocator::operator!= ( const GeneralResourceLocator rhs) const

◆ operator=() [1/2]

GeneralResourceLocator & tesseract_common::GeneralResourceLocator::operator= ( const GeneralResourceLocator )
default

◆ operator=() [2/2]

GeneralResourceLocator & tesseract_common::GeneralResourceLocator::operator= ( GeneralResourceLocator &&  )
default

◆ operator==()

bool tesseract_common::GeneralResourceLocator::operator== ( const GeneralResourceLocator rhs) const

◆ serialize()

template<class Archive >
void tesseract_common::GeneralResourceLocator::serialize ( Archive &  ar,
const unsigned int  version 
)
private

Friends And Related Function Documentation

◆ boost::serialization::access

friend class boost::serialization::access
friend

Member Data Documentation

◆ package_paths_

std::unordered_map<std::string, std::string> tesseract_common::GeneralResourceLocator::package_paths_
private

The documentation for this class was generated from the following files: