CPUnit 0.95 (beta)
The REAL C++ port of JUnit.
|
#include <cpunit_GlobMatcher.hpp>
Public Member Functions | |
GlobMatcher (const std::string _pattern) | |
virtual | ~GlobMatcher () |
bool | matches (const std::string &s) const |
Private Member Functions | |
bool | attempt_match (const std::string &s, const std::size_t si, const std::size_t pi) const |
Attempt to match the substring 's.substr(si)' with the pattern 'pattern.substring(pi)'. | |
bool | on_wildcard (const std::string &s, const std::size_t si, const std::size_t wci) const |
s - the string under concideration si - the index in the string to consider next wci - the wildcard index in the pattern | |
Static Private Member Functions | |
static std::string | contract_wildcards (const std::string &s) |
Contracts consecutive sequences of wildcards to one wildcard. | |
Private Attributes | |
const std::string | pattern |
Static Private Attributes | |
static const char | wc |
Definition at line 40 of file cpunit_GlobMatcher.hpp.
cpunit::GlobMatcher::GlobMatcher | ( | const std::string | _pattern | ) |
Definition at line 46 of file cpunit_GlobMatcher.cpp.
cpunit::GlobMatcher::~GlobMatcher | ( | ) | [virtual] |
Definition at line 52 of file cpunit_GlobMatcher.cpp.
bool cpunit::GlobMatcher::attempt_match | ( | const std::string & | s, |
const std::size_t | si, | ||
const std::size_t | pi | ||
) | const [private] |
Attempt to match the substring 's.substr(si)' with the pattern 'pattern.substring(pi)'.
Definition at line 76 of file cpunit_GlobMatcher.cpp.
std::string cpunit::GlobMatcher::contract_wildcards | ( | const std::string & | s | ) | [static, private] |
Contracts consecutive sequences of wildcards to one wildcard.
Definition at line 56 of file cpunit_GlobMatcher.cpp.
bool cpunit::GlobMatcher::matches | ( | const std::string & | s | ) | const |
Definition at line 70 of file cpunit_GlobMatcher.cpp.
bool cpunit::GlobMatcher::on_wildcard | ( | const std::string & | s, |
const std::size_t | si, | ||
const std::size_t | wci | ||
) | const [private] |
s - the string under concideration si - the index in the string to consider next wci - the wildcard index in the pattern
Definition at line 94 of file cpunit_GlobMatcher.cpp.
const std::string cpunit::GlobMatcher::pattern [private] |
Definition at line 42 of file cpunit_GlobMatcher.hpp.
const char cpunit::GlobMatcher::wc [static, private] |
Definition at line 41 of file cpunit_GlobMatcher.hpp.