Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

dlgAddMatchFiles::MatchPattern Class Reference

Represent a match pattern used by the 'Add match files' dialog. More...

#include <dlgAddMatchFiles.hpp>

List of all members.

Public Member Functions

void addPatterns (const wxString &patterns)
 Adds the given patterns to this pattern.

int compareDepth (const MatchPattern &cmp) const
 Compare the depths of this pattern and the given one.

int getDepth () const
 Gets the depth.

wxString getDirectory () const
 Gets the directory.

wxString getPattern () const
 Gets the pattern.

wxArrayString getPatterns () const
 Gets the patterns.

bool isIncludingAllPatterns (const wxString &patterns) const
 Indicates if the pattern includes all the given patterns.

 MatchPattern (const MatchPattern &source)
 Copy constructor.

 MatchPattern (const wxString &dir, const wxString &pat, const int dep)
 Constructor.

 MatchPattern ()
 Default constructor.

MatchPatternoperator= (const MatchPattern &source)
 Assignment operator.

bool operator== (const MatchPattern &cmp) const
 Compare two matching patterns.

void removePatterns (const wxString &patterns)
 Remove the given patterns from this pattern.

void setDepth (const int newDepth)
 Sets the depth.

void setDirectory (const wxString &newDir)
 Sets the directory.

void setPattern (const wxString &newPattern)
 Sets the pattern.


Protected Member Functions

void clone (const MatchPattern &source)
 Clones the source instance in this instance.


Protected Attributes

int depth
 search depth.

wxString directory
 directory of the match pattern.

wxString pattern
 match pattern.


Detailed Description

Represent a match pattern used by the 'Add match files' dialog.

It contains:

Definition at line 219 of file dlgAddMatchFiles.hpp.


Constructor & Destructor Documentation

dlgAddMatchFiles::MatchPattern::MatchPattern  )  [inline]
 

Default constructor.

Definition at line 231 of file dlgAddMatchFiles.hpp.

References depth.

dlgAddMatchFiles::MatchPattern::MatchPattern const wxString &  dir,
const wxString &  pat,
const int  dep
 

Constructor.

Parameters:
dir The directory.
pat The pattern.
dep The depth.

Definition at line 77 of file dlgAddMatchFiles.cpp.

References setDepth(), setDirectory(), and setPattern().

dlgAddMatchFiles::MatchPattern::MatchPattern const MatchPattern source  )  [inline]
 

Copy constructor.

Parameters:
source Source instance.

Definition at line 241 of file dlgAddMatchFiles.hpp.


Member Function Documentation

void dlgAddMatchFiles::MatchPattern::addPatterns const wxString &  patterns  ) 
 

Adds the given patterns to this pattern.

Parameters:
patterns The patterns to add.

Definition at line 141 of file dlgAddMatchFiles.cpp.

References addPatterns(), getPattern(), getPatterns(), and setPattern().

Referenced by dlgAddMatchFiles::ArrayMatchPattern::add(), and addPatterns().

void dlgAddMatchFiles::MatchPattern::clone const MatchPattern source  )  [protected]
 

Clones the source instance in this instance.

Parameters:
source Source instance.

Definition at line 92 of file dlgAddMatchFiles.cpp.

References clone(), depth, directory, and pattern.

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

int dlgAddMatchFiles::MatchPattern::compareDepth const MatchPattern cmp  )  const
 

Compare the depths of this pattern and the given one.

A depth of 0 is infinite (i.e. bigger that any other depth).

Parameters:
cmp Pattern to compare the depth.
Returns:
A number < 0 if the depth of this pattern < the depth of cmp, 0 if the depth of this pattern == the depth of cmp, > 0 if the depth of this pattern > the depth of cmp.

Definition at line 277 of file dlgAddMatchFiles.cpp.

References compareDepth(), and getDepth().

Referenced by dlgAddMatchFiles::ArrayMatchPattern::add(), compareDepth(), and operator==().

int dlgAddMatchFiles::MatchPattern::getDepth  )  const [inline]
 

Gets the depth.

Returns:
The depth.

Definition at line 295 of file dlgAddMatchFiles.hpp.

References depth.

Referenced by dlgAddMatchFiles::addPatternToListView(), compareDepth(), and dlgAddMatchFiles::PatternsListValidator::TransferToWindow().

wxString dlgAddMatchFiles::MatchPattern::getDirectory  )  const [inline]
 

Gets the directory.

Returns:
The directory.

Definition at line 255 of file dlgAddMatchFiles.hpp.

References directory.

Referenced by dlgAddMatchFiles::ArrayMatchPattern::add(), dlgAddMatchFiles::addPatternToListView(), operator==(), and dlgAddMatchFiles::PatternsListValidator::TransferToWindow().

wxString dlgAddMatchFiles::MatchPattern::getPattern  )  const [inline]
 

Gets the pattern.

Returns:
The pattern.

Definition at line 275 of file dlgAddMatchFiles.hpp.

References pattern.

Referenced by dlgAddMatchFiles::ArrayMatchPattern::add(), addPatterns(), dlgAddMatchFiles::addPatternToListView(), getPatterns(), operator==(), and dlgAddMatchFiles::PatternsListValidator::TransferToWindow().

wxArrayString dlgAddMatchFiles::MatchPattern::getPatterns  )  const
 

Gets the patterns.

Returns:
The patterns in a array of strings.

Definition at line 123 of file dlgAddMatchFiles.cpp.

References getPattern().

Referenced by addPatterns(), isIncludingAllPatterns(), and removePatterns().

bool dlgAddMatchFiles::MatchPattern::isIncludingAllPatterns const wxString &  patterns  )  const
 

Indicates if the pattern includes all the given patterns.

Parameters:
patterns Patterns to check if they are in this pattern.
Returns:
true if all the given patterns are in this pattern. false otherwise.

Definition at line 234 of file dlgAddMatchFiles.cpp.

References getPatterns(), and isIncludingAllPatterns().

Referenced by dlgAddMatchFiles::ArrayMatchPattern::add(), isIncludingAllPatterns(), and operator==().

dlgAddMatchFiles::MatchPattern & dlgAddMatchFiles::MatchPattern::operator= const MatchPattern source  ) 
 

Assignment operator.

Parameters:
source Source instance.
Returns:
A reference on the instance.

Definition at line 110 of file dlgAddMatchFiles.cpp.

References clone(), and operator=().

Referenced by operator=().

bool dlgAddMatchFiles::MatchPattern::operator== const MatchPattern cmp  )  const
 

Compare two matching patterns.

The matching patterns are equals if:

  • They have the same depth.
  • They have the same directory
  • The first pattern includes all the patterns of the second.
  • The second pattern includes all the patterns of the first.

Parameters:
cmp Matching pattern to compare with this matching pattern.
Returns:
true if the patterns are equals, false otherwise.

Definition at line 304 of file dlgAddMatchFiles.cpp.

References compareDepth(), getDirectory(), getPattern(), isIncludingAllPatterns(), and operator==().

Referenced by operator==().

void dlgAddMatchFiles::MatchPattern::removePatterns const wxString &  patterns  ) 
 

Remove the given patterns from this pattern.

Parameters:
patterns Patterns to remove.

Definition at line 184 of file dlgAddMatchFiles.cpp.

References getPatterns(), removePatterns(), and setPattern().

Referenced by dlgAddMatchFiles::ArrayMatchPattern::add(), and removePatterns().

void dlgAddMatchFiles::MatchPattern::setDepth const int  newDepth  )  [inline]
 

Sets the depth.

Parameters:
newDepth The new depth.

Definition at line 305 of file dlgAddMatchFiles.hpp.

References depth, and setDepth().

Referenced by dlgAddMatchFiles::addPatternToListView(), MatchPattern(), setDepth(), and dlgAddMatchFiles::PatternsListValidator::TransferToWindow().

void dlgAddMatchFiles::MatchPattern::setDirectory const wxString &  newDir  )  [inline]
 

Sets the directory.

Parameters:
newDir New directory.

Definition at line 265 of file dlgAddMatchFiles.hpp.

References directory, and setDirectory().

Referenced by dlgAddMatchFiles::addPatternToListView(), MatchPattern(), setDirectory(), and dlgAddMatchFiles::PatternsListValidator::TransferToWindow().

void dlgAddMatchFiles::MatchPattern::setPattern const wxString &  newPattern  )  [inline]
 

Sets the pattern.

Parameters:
newPattern The new pattern.

Definition at line 285 of file dlgAddMatchFiles.hpp.

References pattern, and setPattern().

Referenced by addPatterns(), dlgAddMatchFiles::addPatternToListView(), MatchPattern(), removePatterns(), setPattern(), and dlgAddMatchFiles::PatternsListValidator::TransferToWindow().


Member Data Documentation

int dlgAddMatchFiles::MatchPattern::depth [protected]
 

search depth.

Definition at line 224 of file dlgAddMatchFiles.hpp.

Referenced by clone(), getDepth(), MatchPattern(), and setDepth().

wxString dlgAddMatchFiles::MatchPattern::directory [protected]
 

directory of the match pattern.

Definition at line 222 of file dlgAddMatchFiles.hpp.

Referenced by clone(), getDirectory(), and setDirectory().

wxString dlgAddMatchFiles::MatchPattern::pattern [protected]
 

match pattern.

Definition at line 223 of file dlgAddMatchFiles.hpp.

Referenced by clone(), getPattern(), and setPattern().


The documentation for this class was generated from the following files:
Generated on Sun May 30 13:38:03 2004 for wxChecksums by doxygen 1.3.7