src/blfwk/ExcludesListMatcher.h
/*
* File: ExcludesListMatcher.h
*
* Copyright (c) Freescale Semiconductor, Inc. All rights reserved.
* See included license file for license details.
*/
#if !defined(_ExcludesListMatcher_h_)
#define _ExcludesListMatcher_h_
#include "GlobMatcher.h"
#include <vector>
#include <string>
namespace blfwk
{
class ExcludesListMatcher : public GlobMatcher
{
public:
ExcludesListMatcher();
~ExcludesListMatcher();
void addPattern(bool isInclude, const std::string &pattern);
virtual bool match(const std::string &testValue);
protected:
struct glob_list_item_t
{
bool m_isInclude;
std::string m_glob;
};
typedef std::vector<glob_list_item_t> glob_list_t;
glob_list_t m_patterns;
};
}; // namespace blfwk
#endif // _ExcludesListMatcher_h_
blfwk::ExcludesListMatcher::match
virtual bool match(const std::string &testValue)
Performs a single string match test against testValue.
Definition: src/blfwk/src/ExcludesListMatcher.cpp:38
blfwk
Definition: BlfwkErrors.h:16
blfwk::ExcludesListMatcher::glob_list_item_t::m_glob
std::string m_glob
The glob pattern to match.
Definition: src/blfwk/ExcludesListMatcher.h:57
blfwk::ExcludesListMatcher::addPattern
void addPattern(bool isInclude, const std::string &pattern)
Add one include or exclude pattern to the end of the match list.
Definition: src/blfwk/src/ExcludesListMatcher.cpp:23
blfwk::ExcludesListMatcher::glob_list_item_t
Information about one glob pattern entry in a match list.
Definition: src/blfwk/ExcludesListMatcher.h:54
blfwk::ExcludesListMatcher::glob_list_item_t::m_isInclude
bool m_isInclude
True if include, false if exclude.
Definition: src/blfwk/ExcludesListMatcher.h:56
blfwk::ExcludesListMatcher
Matches strings using a series of include and exclude glob patterns.
Definition: src/blfwk/ExcludesListMatcher.h:34
blfwk::GlobMatcher
This class uses glob pattern matching to match strings.
Definition: src/blfwk/GlobMatcher.h:37
blfwk::ExcludesListMatcher::~ExcludesListMatcher
~ExcludesListMatcher()
Destructor.
Definition: src/blfwk/src/ExcludesListMatcher.cpp:17
blfwk::ExcludesListMatcher::ExcludesListMatcher
ExcludesListMatcher()
Default constructor.
Definition: src/blfwk/src/ExcludesListMatcher.cpp:12
blfwk::ExcludesListMatcher::m_patterns
glob_list_t m_patterns
Ordered list of include and exclude patterns.
Definition: src/blfwk/ExcludesListMatcher.h:61