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

#include "glob-match.h"

Collaboration diagram for glob_match:

Public Types

enum  opts { pathname = 1 , noescape = 2 , period = 4 }
 

Public Member Functions

 glob_match (const glob_match &gm)=default
 
 glob_match (const std::string &p, unsigned int xopts=pathname|noescape|period)
 
 glob_match (const string_vector &p=string_vector(), unsigned int xopts=pathname|noescape|period)
 
 ~glob_match (void)=default
 
string_vector glob (void) const
 
bool match (const std::string &str) const
 
Array< bool > match (const string_vector &str) const
 
glob_matchoperator= (const glob_match &gm)=default
 
void set_pattern (const std::string &p)
 
void set_pattern (const string_vector &p)
 

Private Member Functions

int opts_to_fnmatch_flags (unsigned int xopts) const
 

Private Attributes

int m_fnmatch_flags
 
string_vector m_pat
 

Detailed Description

Definition at line 36 of file glob-match.h.

Member Enumeration Documentation

◆ opts

Enumerator
pathname 
noescape 
period 

Definition at line 42 of file glob-match.h.

Constructor & Destructor Documentation

◆ glob_match() [1/3]

glob_match::glob_match ( const std::string &  p,
unsigned int  xopts = pathname | noescape | period 
)
inline

Definition at line 49 of file glob-match.h.

◆ glob_match() [2/3]

glob_match::glob_match ( const string_vector p = string_vector (),
unsigned int  xopts = pathname | noescape | period 
)
inline

Definition at line 54 of file glob-match.h.

◆ glob_match() [3/3]

glob_match::glob_match ( const glob_match gm)
default

◆ ~glob_match()

glob_match::~glob_match ( void  )
default

Member Function Documentation

◆ glob()

string_vector glob_match::glob ( void  ) const

Definition at line 41 of file glob-match.cc.

References octave::sys::glob(), and m_pat.

Referenced by F__ftp_mput__(), Fglob(), and octave::xzip().

◆ match() [1/2]

◆ match() [2/2]

Array<bool> glob_match::match ( const string_vector str) const
inline

Definition at line 71 of file glob-match.h.

References n, string_vector::numel(), and retval.

◆ operator=()

glob_match& glob_match::operator= ( const glob_match gm)
default

◆ opts_to_fnmatch_flags()

int glob_match::opts_to_fnmatch_flags ( unsigned int  xopts) const
private

◆ set_pattern() [1/2]

void glob_match::set_pattern ( const std::string &  p)
inline

Definition at line 65 of file glob-match.h.

◆ set_pattern() [2/2]

void glob_match::set_pattern ( const string_vector p)
inline

Definition at line 67 of file glob-match.h.

Member Data Documentation

◆ m_fnmatch_flags

int glob_match::m_fnmatch_flags
private

Definition at line 94 of file glob-match.h.

Referenced by match().

◆ m_pat

string_vector glob_match::m_pat
private

Definition at line 91 of file glob-match.h.

Referenced by glob(), and match().


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