GNU Octave  4.4.1
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 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 (const glob_match &gm)
 
 ~glob_match (void)=default
 
string_vector glob (void) const
 
bool match (const std::string &str) const
 
Array< boolmatch (const string_vector &str) const
 
glob_matchoperator= (const glob_match &gm)
 
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 fnmatch_flags
 
string_vector pat
 

Detailed Description

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

Member Enumeration Documentation

◆ opts

Enumerator
pathname 
noescape 
period 

Definition at line 39 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 46 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 50 of file glob-match.h.

◆ glob_match() [3/3]

glob_match::glob_match ( const glob_match gm)
inline

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

◆ ~glob_match()

glob_match::~glob_match ( void  )
default

Member Function Documentation

◆ glob()

string_vector glob_match::glob ( void  ) const

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

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

◆ match() [1/2]

bool glob_match::match ( const std::string str) const

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

References octave::sys::fnmatch(), fnmatch_flags, pat, and str.

Referenced by octave::symbol_scope_rep::glob(), and save_fields().

◆ match() [2/2]

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

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

References i, retval, and str.

◆ operator=()

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

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

References fnmatch_flags, and pat.

◆ 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 69 of file glob-match.h.

References p.

◆ set_pattern() [2/2]

void glob_match::set_pattern ( const string_vector p)
inline

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

References p.

Member Data Documentation

◆ fnmatch_flags

int glob_match::fnmatch_flags
private

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

Referenced by match(), and operator=().

◆ pat

string_vector glob_match::pat
private

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

Referenced by glob(), match(), and operator=().


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