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

#include "pathsearch.h"

Collaboration diagram for octave::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]

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

Definition at line 42 of file pathsearch.cc.

References init(), and m_orig_path.

◆ directory_path() [2/2]

octave::directory_path::directory_path ( const directory_path )
default

◆ ~directory_path()

octave::directory_path::~directory_path ( void  )
default

Member Function Documentation

◆ all_directories()

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

Definition at line 55 of file pathsearch.cc.

References kpse_element_dir(), m_initialized, m_path_elements, and retval.

◆ elements()

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

Definition at line 50 of file pathsearch.cc.

References m_initialized, and m_path_elements.

◆ find()

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

Definition at line 63 of file pathsearch.h.

◆ find_all()

std::list< std::string > octave::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 > octave::directory_path::find_all_first_of ( const std::list< std::string > &  names)

◆ find_first()

std::string octave::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 octave::directory_path::find_first_of ( const std::list< std::string > &  names)

◆ init()

void octave::directory_path::init ( void  )
private

◆ is_path_sep()

static bool octave::directory_path::is_path_sep ( char  c)
inlinestatic

Definition at line 84 of file pathsearch.h.

Referenced by kpse_path_iterator::next(), and kpse_path_iterator::set_end().

◆ operator=()

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

◆ path_sep_char()

char octave::directory_path::path_sep_char ( void  )
static

Definition at line 122 of file pathsearch.cc.

Referenced by octave::in_path_list(), and octave::split_path().

◆ path_sep_str()

◆ rehash()

void octave::directory_path::rehash ( void  )
inline

Definition at line 72 of file pathsearch.h.

◆ set()

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

Definition at line 50 of file pathsearch.h.

Member Data Documentation

◆ m_expanded_path

std::string octave::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 octave::directory_path::m_initialized
private

◆ m_orig_path

std::string octave::directory_path::m_orig_path
private

Definition at line 89 of file pathsearch.h.

Referenced by directory_path(), and init().

◆ m_path_elements

std::list<std::string> octave::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: