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
30
class
RegularExpression
{
31
public
:
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
37
RegularExpression
(
const
RegularExpression
&);
38
~RegularExpression
();
39
41
bool
match
(
const
std::string& s)
const
;
42
44
bool
OK
()
const
;
45
46
private
:
47
// Not implemented.
48
void
operator=
(
const
RegularExpression
&);
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.
57
bool
caseIgnore
;
58
59
// The compiled regular expression.
60
class
Expression
;
61
Expression
*
expr
;
62
63
// The state flag, indicating any error condition.
64
int
state
;
65
};
66
67
#endif
// OPAL_RegularExpressions_HH
RegularExpression::Expression
Definition
RegularExpression.cpp:34
RegularExpression
A regular expression.
Definition
RegularExpression.h:30
RegularExpression::match
bool match(const std::string &s) const
Match a string against the pattern.
Definition
RegularExpression.cpp:51
RegularExpression::state
int state
Definition
RegularExpression.h:64
RegularExpression::patt
const std::string patt
Definition
RegularExpression.h:54
RegularExpression::OK
bool OK() const
Check the regular expression for sanity.
Definition
RegularExpression.cpp:71
RegularExpression::caseIgnore
bool caseIgnore
Definition
RegularExpression.h:57
RegularExpression::init
void init()
Definition
RegularExpression.cpp:73
RegularExpression::expr
Expression * expr
Definition
RegularExpression.h:61
RegularExpression::~RegularExpression
~RegularExpression()
Definition
RegularExpression.cpp:49
RegularExpression::operator=
void operator=(const RegularExpression &)
src
Utilities
RegularExpression.h
Generated on Mon Jun 1 2026 10:40:53 for OPALX (Object Oriented Parallel Accelerator Library for Exascal) by
1.9.8