OMNeT++ Simulation Library  6.0.3
cpatternmatcher.h
1 //==========================================================================
2 // CPATTERNMATCHER.H - part of
3 // OMNeT++/OMNEST
4 // Discrete System Simulation in C++
5 //
6 //==========================================================================
7 
8 /*--------------------------------------------------------------*
9  Copyright (C) 2006-2017 OpenSim Ltd.
10 
11  This file is distributed WITHOUT ANY WARRANTY. See the file
12  `license' for details on this and other legal matters.
13 *--------------------------------------------------------------*/
14 
15 #ifndef __OMNETPP_CPATTERNMATCHER_H
16 #define __OMNETPP_CPATTERNMATCHER_H
17 
18 #include <cstdio>
19 #include <string>
20 #include <vector>
21 #include "simkerneldefs.h"
22 
23 namespace omnetpp {
24 
25 namespace common { class PatternMatcher; };
26 
75 class SIM_API cPatternMatcher
76 {
77  private:
78  omnetpp::common::PatternMatcher *impl;
79 
80  public:
85 
89  cPatternMatcher(const char *pattern, bool dottedpath, bool fullstring, bool casesensitive);
90 
94  ~cPatternMatcher();
95 
101  void setPattern(const char *pattern, bool dottedpath, bool fullstring, bool casesensitive);
102 
107  bool matches(const char *line) const;
108 
129  const char *patternPrefixMatches(const char *line, int suffixoffset) const;
130 
135  std::string debugStr() const;
136 
141  void dump() const;
142 
148  static bool containsWildcards(const char *pattern);
149 
150 };
151 
152 } // namespace omnetpp
153 
154 #endif
155 
156 
omnetpp::cPatternMatcher
Glob-style pattern matching class, adopted to special OMNeT++ requirements. One instance represents a...
Definition: cpatternmatcher.h:75