Kinetis Bootloader Host  2.0.0
Host Tools for Kinetis devices
src/blfwk/ExcludesListMatcher.h
1 /*
2  * File: ExcludesListMatcher.h
3  *
4  * Copyright (c) Freescale Semiconductor, Inc. All rights reserved.
5  * See included license file for license details.
6  */
7 #if !defined(_ExcludesListMatcher_h_)
8 #define _ExcludesListMatcher_h_
9 
10 #include "GlobMatcher.h"
11 #include <vector>
12 #include <string>
13 
14 namespace blfwk
15 {
35 {
36 public:
39 
42 
44 
45  void addPattern(bool isInclude, const std::string &pattern);
48 
50  virtual bool match(const std::string &testValue);
51 
52 protected:
55  {
56  bool m_isInclude;
57  std::string m_glob;
58  };
59 
60  typedef std::vector<glob_list_item_t> glob_list_t;
61  glob_list_t m_patterns;
62 };
63 
64 }; // namespace blfwk
65 
66 #endif // _ExcludesListMatcher_h_
virtual bool match(const std::string &testValue)
Performs a single string match test against testValue.
Definition: src/blfwk/src/ExcludesListMatcher.cpp:38
Definition: BlfwkErrors.h:16
std::string m_glob
The glob pattern to match.
Definition: src/blfwk/ExcludesListMatcher.h:57
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
Information about one glob pattern entry in a match list.
Definition: src/blfwk/ExcludesListMatcher.h:54
bool m_isInclude
True if include, false if exclude.
Definition: src/blfwk/ExcludesListMatcher.h:56
Matches strings using a series of include and exclude glob patterns.
Definition: src/blfwk/ExcludesListMatcher.h:34
This class uses glob pattern matching to match strings.
Definition: src/blfwk/GlobMatcher.h:37
~ExcludesListMatcher()
Destructor.
Definition: src/blfwk/src/ExcludesListMatcher.cpp:17
ExcludesListMatcher()
Default constructor.
Definition: src/blfwk/src/ExcludesListMatcher.cpp:12
glob_list_t m_patterns
Ordered list of include and exclude patterns.
Definition: src/blfwk/ExcludesListMatcher.h:61