OPAL (Object Oriented Parallel Accelerator Library)  2021.1.99
OPAL
Classes | Public Member Functions | Private Member Functions | Private Attributes | List of all members
RegularExpression Class Reference

A regular expression. More...

#include <RegularExpression.h>

Collaboration diagram for RegularExpression:
Collaboration graph
[legend]

Classes

class  Expression
 

Public Member Functions

 RegularExpression (const std::string &pattern, bool ignore=false)
 Constructor. More...
 
 RegularExpression (const RegularExpression &)
 
 ~RegularExpression ()
 
bool match (const std::string &s) const
 Match a string against the pattern. More...
 
bool OK () const
 Check the regular expression for sanity. More...
 

Private Member Functions

void operator= (const RegularExpression &)
 
void init ()
 

Private Attributes

const std::string patt
 
bool caseIgnore
 
Expressionexpr
 
int state
 

Detailed Description

A regular expression.

Definition at line 31 of file RegularExpression.h.

Constructor & Destructor Documentation

◆ RegularExpression() [1/2]

RegularExpression::RegularExpression ( const std::string &  pattern,
bool  ignore = false 
)

Constructor.

Definition at line 41 of file RegularExpression.cpp.

References init().

Here is the call graph for this function:

◆ RegularExpression() [2/2]

RegularExpression::RegularExpression ( const RegularExpression rhs)

Definition at line 47 of file RegularExpression.cpp.

References init().

Here is the call graph for this function:

◆ ~RegularExpression()

RegularExpression::~RegularExpression ( )

Definition at line 53 of file RegularExpression.cpp.

References expr.

Member Function Documentation

◆ init()

void RegularExpression::init ( )
private

Definition at line 84 of file RegularExpression.cpp.

References caseIgnore, expr, patt, and state.

Referenced by RegularExpression().

◆ match()

bool RegularExpression::match ( const std::string &  s) const

Match a string against the pattern.

Definition at line 58 of file RegularExpression.cpp.

References expr, and state.

Referenced by Selector::handleElement(), and OpalData::printNames().

◆ OK()

bool RegularExpression::OK ( ) const

Check the regular expression for sanity.

Definition at line 79 of file RegularExpression.cpp.

References expr, and state.

◆ operator=()

void RegularExpression::operator= ( const RegularExpression )
private

Member Data Documentation

◆ caseIgnore

bool RegularExpression::caseIgnore
private

Definition at line 61 of file RegularExpression.h.

Referenced by init().

◆ expr

Expression* RegularExpression::expr
private

Definition at line 65 of file RegularExpression.h.

Referenced by init(), match(), OK(), and ~RegularExpression().

◆ patt

const std::string RegularExpression::patt
private

Definition at line 58 of file RegularExpression.h.

Referenced by init().

◆ state

int RegularExpression::state
private

Definition at line 68 of file RegularExpression.h.

Referenced by init(), match(), and OK().


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