CernVM-FS  2.12.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
PathspecElementPattern Class Reference

#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)
 
PathspecElementPatternoperator= (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)
 
SubPatternParsePlaintext (const std::string::const_iterator &end, std::string::const_iterator *i)
 
SubPatternParseSpecialChar (const std::string::const_iterator &end, std::string::const_iterator *i)
 

Private Types

typedef std::vector< SubPattern * > SubPatterns
 

Private Attributes

bool valid_
 
SubPatterns subpatterns_
 

Detailed Description

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.

Member Typedef Documentation

typedef std::vector<SubPattern*> PathspecElementPattern::SubPatterns
private

Definition at line 98 of file pathspec_pattern.h.

Constructor & Destructor Documentation

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.

Here is the call graph for this function:

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.

Member Function Documentation

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.

bool PathspecElementPattern::IsValid ( ) const
inline

Definition at line 111 of file pathspec_pattern.h.

Referenced by operator==().

Here is the caller graph for this function:

bool PathspecElementPattern::operator!= ( const PathspecElementPattern other) const
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

Definition at line 148 of file pathspec_pattern.cc.

Here is the call graph for this function:

void PathspecElementPattern::Parse ( const std::string::const_iterator &  begin,
const std::string::const_iterator &  end 
)
protected

Definition at line 60 of file pathspec_pattern.cc.

Referenced by PathspecElementPattern().

Here is the call graph for this function:

Here is the caller graph for this function:

PathspecElementPattern::SubPattern * PathspecElementPattern::ParsePlaintext ( const std::string::const_iterator &  end,
std::string::const_iterator *  i 
)
protected

Definition at line 77 of file pathspec_pattern.cc.

Referenced by Parse().

Here is the call graph for this function:

Here is the caller graph for this function:

PathspecElementPattern::SubPattern * PathspecElementPattern::ParseSpecialChar ( const std::string::const_iterator &  end,
std::string::const_iterator *  i 
)
protected

Definition at line 109 of file pathspec_pattern.cc.

Referenced by Parse().

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

SubPatterns PathspecElementPattern::subpatterns_
private
bool PathspecElementPattern::valid_
private

Definition at line 127 of file pathspec_pattern.h.

Referenced by IsValid(), operator=(), Parse(), and ParsePlaintext().


The documentation for this class was generated from the following files: