apps/elftosb/common/GlobMatcher.h
/*
* File: GlobMatcher.h
*
* Copyright (c) Freescale Semiconductor, Inc. All rights reserved.
* See included license file for license details.
*/
#if !defined(_GlobMatcher_h_)
#define _GlobMatcher_h_
#include "StringMatcher.h"
namespace elftosb
{
class GlobMatcher : public StringMatcher
{
public:
GlobMatcher(const std::string &pattern)
: StringMatcher()
, m_pattern(pattern)
{
}
virtual bool match(const std::string &testValue);
protected:
std::string m_pattern;
bool globMatch(const char *str, const char *p);
};
}; // namespace elftosb
#endif // _GlobMatcher_h_
elftosb::GlobMatcher::m_pattern
std::string m_pattern
The glob pattern to match against.
Definition: apps/elftosb/common/GlobMatcher.h:51
elftosb::GlobMatcher
This class uses glob pattern matching to match strings.
Definition: apps/elftosb/common/GlobMatcher.h:37
elftosb::GlobMatcher::GlobMatcher
GlobMatcher(const std::string &pattern)
Constructor.
Definition: apps/elftosb/common/GlobMatcher.h:41
elftosb
Definition: BootImage.h:13
elftosb::GlobMatcher::globMatch
bool globMatch(const char *str, const char *p)
Glob implementation.
Definition: apps/elftosb/common/GlobMatcher.cpp:29
elftosb::StringMatcher
Abstract interface class used to select strings by name.
Definition: apps/elftosb/common/StringMatcher.h:17
elftosb::GlobMatcher::match
virtual bool match(const std::string &testValue)
Returns whether testValue matches the glob pattern.
Definition: apps/elftosb/common/GlobMatcher.cpp:22