OPALX (Object Oriented Parallel Accelerator Library for Exascal) master (dc2a29eed580)
OPALX
Loading...
Searching...
No Matches
RegularExpression.h
Go to the documentation of this file.
1#ifndef OPAL_RegularExpression_HH
2#define OPAL_RegularExpression_HH 1
3
4// ------------------------------------------------------------------------
5// $RCSfile: RegularExpression.h,v $
6// ------------------------------------------------------------------------
7// $Revision: 1.1.1.1 $
8// ------------------------------------------------------------------------
9// Copyright: see Copyright.readme
10// ------------------------------------------------------------------------
11//
12// Class: RegularExpression.
13//
14// ------------------------------------------------------------------------
15//
16// $Date: 2000/03/27 09:33:48 $
17// $Author: Andreas Adelmann $
18//
19// ------------------------------------------------------------------------
20
21#include <string>
22
23// Class RegularExpression
24// ------------------------------------------------------------------------
26// This class encapsulates the UNIX regular expressions as defined in
27// regexp(5). It provides a simple interface to the POSIX-compliant
28// regcomp/regexec package.
29
31public:
33 // Construct regular expression from [b]pattern[/b].
34 // If [b]ignore[/b] is true, the expression ignores upper/lower case.
35 RegularExpression(const std::string& pattern, bool ignore = false);
36
39
41 bool match(const std::string& s) const;
42
44 bool OK() const;
45
46private:
47 // Not implemented.
49
50 // Initialise.
51 void init();
52
53 // A copy of the pattern string.
54 const std::string patt;
55
56 // The flag to ignore case.
58
59 // The compiled regular expression.
60 class Expression;
62
63 // The state flag, indicating any error condition.
64 int state;
65};
66
67#endif // OPAL_RegularExpressions_HH
A regular expression.
bool match(const std::string &s) const
Match a string against the pattern.
const std::string patt
bool OK() const
Check the regular expression for sanity.
void operator=(const RegularExpression &)