Public Types | Public Member Functions | Private Attributes | Friends | List of all members
resolver Class Reference

Simple class for resolving paths on Linux/Windows/Mac OS. More...

#include <resolver.h>

Public Types

typedef std::vector< path >::const_iterator const_iterator
 
typedef std::vector< path >::iterator iterator
 

Public Member Functions

void append (const path &path)
 
iterator begin ()
 
const_iterator begin () const
 
iterator end ()
 
const_iterator end () const
 
void erase (iterator it)
 
const pathoperator[] (size_t index) const
 
pathoperator[] (size_t index)
 
void prepend (const path &path)
 
path resolve (const path &value) const
 
 resolver ()
 
size_t size () const
 

Private Attributes

std::vector< pathm_paths
 

Friends

std::ostream & operator<< (std::ostream &os, const resolver &r)
 

Detailed Description

Simple class for resolving paths on Linux/Windows/Mac OS.

This convenience class looks for a file or directory given its name and a set of search paths. The implementation walks through the search paths in order and stops once the file is found.

Definition at line 23 of file resolver.h.

Member Typedef Documentation

◆ const_iterator

Definition at line 26 of file resolver.h.

◆ iterator

typedef std::vector<path>::iterator resolver::iterator

Definition at line 25 of file resolver.h.

Constructor & Destructor Documentation

◆ resolver()

resolver::resolver ( )
inline

Definition at line 28 of file resolver.h.

Member Function Documentation

◆ append()

void resolver::append ( const path path)
inline

Definition at line 43 of file resolver.h.

◆ begin() [1/2]

iterator resolver::begin ( )
inline

Definition at line 34 of file resolver.h.

◆ begin() [2/2]

const_iterator resolver::begin ( ) const
inline

Definition at line 37 of file resolver.h.

◆ end() [1/2]

iterator resolver::end ( )
inline

Definition at line 35 of file resolver.h.

◆ end() [2/2]

const_iterator resolver::end ( ) const
inline

Definition at line 38 of file resolver.h.

◆ erase()

void resolver::erase ( iterator  it)
inline

Definition at line 40 of file resolver.h.

◆ operator[]() [1/2]

const path& resolver::operator[] ( size_t  index) const
inline

Definition at line 44 of file resolver.h.

◆ operator[]() [2/2]

path& resolver::operator[] ( size_t  index)
inline

Definition at line 45 of file resolver.h.

◆ prepend()

void resolver::prepend ( const path path)
inline

Definition at line 42 of file resolver.h.

◆ resolve()

path resolver::resolve ( const path value) const
inline

Definition at line 47 of file resolver.h.

◆ size()

size_t resolver::size ( ) const
inline

Definition at line 32 of file resolver.h.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const resolver r 
)
friend

Definition at line 56 of file resolver.h.

Member Data Documentation

◆ m_paths

std::vector<path> resolver::m_paths
private

Definition at line 69 of file resolver.h.


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


behaviortree_cpp_v3
Author(s): Michele Colledanchise, Davide Faconti
autogenerated on Mon Jul 3 2023 02:50:14