![]() |
CernVM-FS
2.12.0
|
#include <pathspec_pattern.h>
Classes | |
class | PlaceholderSubPattern |
class | PlaintextSubPattern |
class | SubPattern |
class | WildcardSubPattern |
Public Member Functions | |
PathspecElementPattern (const std::string::const_iterator begin, const std::string::const_iterator &end) | |
PathspecElementPattern (const PathspecElementPattern &other) | |
PathspecElementPattern & | operator= (const PathspecElementPattern &other) |
~PathspecElementPattern () | |
std::string | GenerateRegularExpression (const bool is_relaxed=false) const |
std::string | GenerateGlobString () const |
bool | IsValid () const |
bool | operator== (const PathspecElementPattern &other) const |
bool | operator!= (const PathspecElementPattern &other) const |
Protected Member Functions | |
void | Parse (const std::string::const_iterator &begin, const std::string::const_iterator &end) |
SubPattern * | ParsePlaintext (const std::string::const_iterator &end, std::string::const_iterator *i) |
SubPattern * | ParseSpecialChar (const std::string::const_iterator &end, std::string::const_iterator *i) |
Private Types | |
typedef std::vector< SubPattern * > | SubPatterns |
Private Attributes | |
bool | valid_ |
SubPatterns | subpatterns_ |
This file is part of the CernVM File System. The PathspecElementPattern is used internally by the Pathspec class!
It describes a part of a full Pathspec. Namely only one directory level. Each PathspecElementPattern is composed by potentially multiple SubPatterns.
+-------—+ +---------------------—+ +---------—+ | Pathspec |-—<>-—| PathspecElementPattern |-—<>-—| SubPattern | +-------—+ +---------------------—+ +---------—+
^ ^ ^ | | | +-----------------------------------------------—+ | | | +-------------------------—+ | | | | +------------------—+ +-----------------—+ +--------------------—+ | PlaintextSubPattern | | WildcardSubPattern | | PlaceholderSubPattern | +------------------—+ +-----------------—+ +--------------------—+
SubPatterns are implemented as a flat class hierarchy where the different patterns are implementing the behaviour of one pattern symbol.
The PathspecElementPattern is taking care of the parsing and creation of SubPatterns.
Definition at line 36 of file pathspec_pattern.h.
|
private |
Definition at line 98 of file pathspec_pattern.h.
PathspecElementPattern::PathspecElementPattern | ( | const std::string::const_iterator | begin, |
const std::string::const_iterator & | end | ||
) |
This file is part of the CernVM File System.
Definition at line 12 of file pathspec_pattern.cc.
PathspecElementPattern::PathspecElementPattern | ( | const PathspecElementPattern & | other | ) |
Definition at line 20 of file pathspec_pattern.cc.
PathspecElementPattern::~PathspecElementPattern | ( | ) |
Definition at line 50 of file pathspec_pattern.cc.
std::string PathspecElementPattern::GenerateGlobString | ( | ) | const |
Definition at line 138 of file pathspec_pattern.cc.
std::string PathspecElementPattern::GenerateRegularExpression | ( | const bool | is_relaxed = false | ) | const |
Definition at line 127 of file pathspec_pattern.cc.
|
inline |
Definition at line 111 of file pathspec_pattern.h.
Referenced by operator==().
|
inline |
Definition at line 114 of file pathspec_pattern.h.
PathspecElementPattern & PathspecElementPattern::operator= | ( | const PathspecElementPattern & | other | ) |
Definition at line 32 of file pathspec_pattern.cc.
bool PathspecElementPattern::operator== | ( | const PathspecElementPattern & | other | ) | const |
|
protected |
Definition at line 60 of file pathspec_pattern.cc.
Referenced by PathspecElementPattern().
|
protected |
Definition at line 77 of file pathspec_pattern.cc.
Referenced by Parse().
|
protected |
Definition at line 109 of file pathspec_pattern.cc.
Referenced by Parse().
|
private |
Definition at line 128 of file pathspec_pattern.h.
Referenced by GenerateGlobString(), GenerateRegularExpression(), operator=(), operator==(), Parse(), PathspecElementPattern(), and ~PathspecElementPattern().
|
private |
Definition at line 127 of file pathspec_pattern.h.
Referenced by IsValid(), operator=(), Parse(), and ParsePlaintext().