Public Member Functions | Static Public Member Functions

base::WildcardT< charT, traits > Class Template Reference

File name matching by wildcard. More...

#include <libppbase/base/Wildcard.h>

List of all members.

Public Member Functions

 WildcardT ()
 Construct empty object.
 WildcardT (const StringT< charT, traits > &wildcard)
 Construct object with wildcard.
const StringT< charT, traits > & get () const
 Gets wildcard pattern.
bool match (const StringT< charT, traits > &filename, bool icase=BASE_ICASE) const
 Matches a file name against a pattern.
void set (const StringT< charT, traits > &wildcard)
 Sets wildcard pattern.

Static Public Member Functions

static bool match (const charT *wildcard, const charT *filename, bool icase=BASE_ICASE)
 Matches a file name against a pattern.

Detailed Description

template<class charT, class traits = CharTraits<charT>>
class base::WildcardT< charT, traits >

File name matching by wildcard.

Author:
Christoph Schwarz
Version:
$Id: Wildcard.h 21 2010-09-05 04:18:17Z cschwarz1 $

Constructor & Destructor Documentation

template<class charT , class traits = CharTraits<charT>>
base::WildcardT< charT, traits >::WildcardT ( const StringT< charT, traits > &  wildcard  )  [inline]

Construct object with wildcard.

Parameters:
wildcard given pattern

Member Function Documentation

template<class charT , class traits = CharTraits<charT>>
const StringT<charT, traits>& base::WildcardT< charT, traits >::get (  )  const [inline]

Gets wildcard pattern.

Returns:
wildcard pattern
template<class charT , class traits >
bool base::WildcardT< charT, traits >::match ( const charT *  wildcard,
const charT *  filename,
bool  icase = BASE_ICASE 
) [static]

Matches a file name against a pattern.

Parameters:
wildcard given pattern
filename given file name
icase flag: ignore case

Referenced by base::WildcardT< charT, traits >::match().

template<class charT , class traits >
bool base::WildcardT< charT, traits >::match ( const StringT< charT, traits > &  filename,
bool  icase = BASE_ICASE 
) const

Matches a file name against a pattern.

Parameters:
filename given file name
icase flag: ignore case

References base::StringT< charT, traits >::c_str(), and base::WildcardT< charT, traits >::match().

template<class charT , class traits = CharTraits<charT>>
void base::WildcardT< charT, traits >::set ( const StringT< charT, traits > &  wildcard  )  [inline]

Sets wildcard pattern.

Parameters:
wildcard given pattern

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