Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

PathReplace::Entry Class Reference

List of all members.

Public Member Functions

 Entry (const string &orig_prefix, const string &replacement_prefix)
 Entry (const Entry &copy)
void operator= (const Entry &copy)
bool try_match (const Filename &filename, Filename &new_filename) const
 Considers whether the indicated filename matches this entry's prefix.

size_t r_try_match (const vector_string &components, size_t oi, size_t ci) const
 The recursive implementation of try_match().


Public Attributes

string _orig_prefix
Components _orig_components
bool _is_local
string _replacement_prefix

Constructor & Destructor Documentation

PathReplace::Entry::Entry const string &  orig_prefix,
const string &  replacement_prefix
 

Definition at line 227 of file pathReplace.cxx.

References _is_local, _replacement_prefix, Filename::extract_components(), Filename::is_local(), r_try_match(), and size_t.

PathReplace::Entry::Entry const Entry &  copy  )  [inline]
 

Definition at line 187 of file pathReplace.I.


Member Function Documentation

void PathReplace::Entry::operator= const Entry &  copy  )  [inline]
 

Definition at line 204 of file pathReplace.I.

size_t PathReplace::Entry::r_try_match const vector_string &  components,
size_t  oi,
size_t  ci
const
 

The recursive implementation of try_match().

Actually, this is doubly-recursive, to implement the "**" feature.

The return value is the number of the "components" vector that successfully matched against all of the orig_components. (It's a variable number because there might be one or more "**" entries.)

Definition at line 315 of file pathReplace.cxx.

Referenced by Entry(), and try_match().

bool PathReplace::Entry::try_match const Filename filename,
Filename new_filename
const
 

Considers whether the indicated filename matches this entry's prefix.

If so, switches the prefix and stores the result in new_filename, and returns true; otherwise, returns false.

Definition at line 267 of file pathReplace.cxx.

References PathReplace::Component::_double_star, _orig_components, PathReplace::Component::_orig_prefix, GlobPattern::matches(), r_try_match(), and size_t.

Referenced by PathReplace::~PathReplace().


Member Data Documentation

bool PathReplace::Entry::_is_local
 

Definition at line 112 of file pathReplace.h.

Referenced by Entry().

Components PathReplace::Entry::_orig_components
 

Definition at line 111 of file pathReplace.h.

Referenced by try_match().

string PathReplace::Entry::_orig_prefix
 

Definition at line 110 of file pathReplace.h.

string PathReplace::Entry::_replacement_prefix
 

Definition at line 113 of file pathReplace.h.

Referenced by Entry().


The documentation for this class was generated from the following files:
Generated on Fri May 2 03:27:47 2003 for Panda-Tool by doxygen1.3