dePatternList Class Reference

List of file patterns. More...

#include <dePatternList.h>

List of all members.

Public Member Functions

Constructors and Destructors
 dePatternList ()
 Creates a new pattern list.
 ~dePatternList ()
 Cleans up the pattern list.
Management
int GetPatternCount () const
 Retrieves the number of patterns.
const char * GetPatternAt (int index) const
 Retrieves the pattern at the given position.
int IndexOfPattern (const char *pattern) const
 Retrieves the index of the pattern or -1 if not found.
bool HasPattern (const char *pattern) const
 Determines if a pattern exists.
void AddPattern (const char *pattern)
 Adds a pattern.
void RemovePattern (const char *pattern)
 Removes a pattern.
void RemoveAllPatterns ()
 Removes all pattern.
void SortPatternByLength ()
 Sorts the patterns by length from the longest pattern to the shortest one.
bool PathMatches (const char *path) const
 Determines if the given path matches a pattern.
int IndexOfPatternMatchingPath (const char *path) const
 Retrieves the index of the pattern matching the given path or -1 if none matches.

Detailed Description

List of file patterns.

Manages a list of patterns used for searching files in virtual file system containers. The patterns in the list are of the form '.X' where X is any kind of extension including additional periods. There is no '*' in front of the pattern.

Author:
Plüss Roland
Version:
1.0
Date:
2008

Constructor & Destructor Documentation

dePatternList::dePatternList (  )

Creates a new pattern list.

dePatternList::~dePatternList (  )

Cleans up the pattern list.


Member Function Documentation

void dePatternList::AddPattern ( const char *  pattern )

Adds a pattern.

const char* dePatternList::GetPatternAt ( int  index ) const

Retrieves the pattern at the given position.

int dePatternList::GetPatternCount (  ) const [inline]

Retrieves the number of patterns.

bool dePatternList::HasPattern ( const char *  pattern ) const

Determines if a pattern exists.

int dePatternList::IndexOfPattern ( const char *  pattern ) const

Retrieves the index of the pattern or -1 if not found.

int dePatternList::IndexOfPatternMatchingPath ( const char *  path ) const

Retrieves the index of the pattern matching the given path or -1 if none matches.

bool dePatternList::PathMatches ( const char *  path ) const

Determines if the given path matches a pattern.

void dePatternList::RemoveAllPatterns (  )

Removes all pattern.

void dePatternList::RemovePattern ( const char *  pattern )

Removes a pattern.

void dePatternList::SortPatternByLength (  )

Sorts the patterns by length from the longest pattern to the shortest one.


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