GNU Octave  8.1.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
directory_path Class Reference

#include "pathsearch.h"

Collaboration diagram for directory_path:

Public Member Functions

 directory_path (const directory_path &)=default
 
 directory_path (const std::string &s="")
 
 ~directory_path (void)=default
 
std::list< std::string > all_directories (void)
 
std::list< std::string > elements (void)
 
std::string find (const std::string &nm)
 
std::list< std::string > find_all (const std::string &)
 
std::list< std::string > find_all_first_of (const std::list< std::string > &names)
 
std::string find_first (const std::string &)
 
std::string find_first_of (const std::list< std::string > &names)
 
directory_pathoperator= (const directory_path &)=default
 
void rehash (void)
 
void set (const std::string &s)
 

Static Public Member Functions

static bool is_path_sep (char c)
 
static char path_sep_char (void)
 
static std::string path_sep_str (void)
 

Private Member Functions

void init (void)
 

Private Attributes

std::string m_expanded_path
 
bool m_initialized
 
std::string m_orig_path
 
std::list< std::string > m_path_elements
 

Detailed Description

Definition at line 36 of file pathsearch.h.

Constructor & Destructor Documentation

◆ directory_path() [1/2]

directory_path::directory_path ( const std::string &  s = "")

Definition at line 42 of file pathsearch.cc.

◆ directory_path() [2/2]

directory_path::directory_path ( const directory_path )
default

◆ ~directory_path()

directory_path::~directory_path ( void  )
default

Member Function Documentation

◆ all_directories()

std::list< std::string > directory_path::all_directories ( void  )

Definition at line 55 of file pathsearch.cc.

References kpse_element_dir(), m_initialized, and m_path_elements.

◆ elements()

std::list< std::string > directory_path::elements ( void  )

Definition at line 50 of file pathsearch.cc.

References m_initialized, and m_path_elements.

◆ find()

std::string directory_path::find ( const std::string &  nm)
inline

Definition at line 63 of file pathsearch.h.

◆ find_all()

std::list< std::string > directory_path::find_all ( const std::string &  nm)

Definition at line 78 of file pathsearch.cc.

References kpse_all_path_search(), m_expanded_path, and m_initialized.

◆ find_all_first_of()

std::list< std::string > directory_path::find_all_first_of ( const std::list< std::string > &  names)

Definition at line 93 of file pathsearch.cc.

References kpse_all_path_find_first_of(), m_expanded_path, and m_initialized.

Referenced by search_path_for_all_files().

◆ find_first()

std::string directory_path::find_first ( const std::string &  nm)

Definition at line 73 of file pathsearch.cc.

References kpse_path_search(), m_expanded_path, and m_initialized.

◆ find_first_of()

std::string directory_path::find_first_of ( const std::list< std::string > &  names)

Definition at line 86 of file pathsearch.cc.

References kpse_path_find_first_of(), m_expanded_path, and m_initialized.

Referenced by search_path_for_file().

◆ init()

void directory_path::init ( void  )
private

◆ is_path_sep()

static bool directory_path::is_path_sep ( char  c)
inlinestatic

Definition at line 84 of file pathsearch.h.

◆ operator=()

directory_path& directory_path::operator= ( const directory_path )
default

◆ path_sep_char()

char directory_path::path_sep_char ( void  )
static

Definition at line 122 of file pathsearch.cc.

Referenced by in_path_list(), and split_path().

◆ path_sep_str()

◆ rehash()

void directory_path::rehash ( void  )
inline

Definition at line 72 of file pathsearch.h.

◆ set()

void directory_path::set ( const std::string &  s)
inline

Definition at line 50 of file pathsearch.h.

Member Data Documentation

◆ m_expanded_path

std::string directory_path::m_expanded_path
private

Definition at line 96 of file pathsearch.h.

Referenced by find_all(), find_all_first_of(), find_first(), find_first_of(), and init().

◆ m_initialized

bool directory_path::m_initialized
private

◆ m_orig_path

std::string directory_path::m_orig_path
private

Definition at line 89 of file pathsearch.h.

Referenced by init().

◆ m_path_elements

std::list<std::string> directory_path::m_path_elements
private

Definition at line 99 of file pathsearch.h.

Referenced by all_directories(), elements(), and init().


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