7 #if !defined(_StringMatcher_h_) 8 #define _StringMatcher_h_ 24 virtual bool match(
const std::string &testValue) = 0;
34 virtual bool match(
const std::string &testValue) {
return true; }
53 virtual bool match(
const std::string &testValue) {
return testValue == m_value; }
60 #endif // _StringMatcher_h_ String matcher subclass that matches all test strings.
Definition: apps/elftosb/common/StringMatcher.h:30
virtual bool match(const std::string &testValue)=0
Performs a single string match test against testValue.
virtual bool match(const std::string &testValue)
Always returns true, indicating a positive match.
Definition: apps/elftosb/common/StringMatcher.h:34
virtual bool match(const std::string &testValue)
Returns whether testValue is the same as the value passed to the constructor.
Definition: apps/elftosb/common/StringMatcher.h:53
const std::string & m_value
The section name to look for.
Definition: apps/elftosb/common/StringMatcher.h:55
Definition: BootImage.h:13
Simple string matcher that compares against a fixed value.
Definition: apps/elftosb/common/StringMatcher.h:40
Abstract interface class used to select strings by name.
Definition: apps/elftosb/common/StringMatcher.h:17
FixedMatcher(const std::string &fixedValue)
Constructor. Sets the string to compare against to be fixedValue.
Definition: apps/elftosb/common/StringMatcher.h:44