| 3122 | public: |
| 3123 | |
| 3124 | WildcardPattern( std::string const& pattern, CaseSensitive::Choice caseSensitivity ) |
| 3125 | : m_caseSensitivity( caseSensitivity ), |
| 3126 | m_wildcard( NoWildcard ), |
| 3127 | m_pattern( adjustCase( pattern ) ) |
| 3128 | { |
| 3129 | if( startsWith( m_pattern, "*" ) ) { |
| 3130 | m_pattern = m_pattern.substr( 1 ); |
| 3131 | m_wildcard = WildcardAtStart; |
| 3132 | } |
| 3133 | if( endsWith( m_pattern, "*" ) ) { |
| 3134 | m_pattern = m_pattern.substr( 0, m_pattern.size()-1 ); |
| 3135 | m_wildcard = static_cast<WildcardPosition>( m_wildcard | WildcardAtEnd ); |
| 3136 | } |
| 3137 | } |
| 3138 | virtual ~WildcardPattern(); |
| 3139 | virtual bool matches( std::string const& str ) const { |
| 3140 | switch( m_wildcard ) { |
nothing calls this directly
no test coverage detected