| The Gaudi Framework v32r1 (f65d50dc)

Public Member Functions | Private Attributes | List of all members
GaudiTest.RegexpReplacer Class Reference
Inheritance diagram for GaudiTest.RegexpReplacer:
[legend]
Collaboration diagram for GaudiTest.RegexpReplacer:
[legend]

## Public Member Functions
def | __init__ (self, orig, repl="", when=None)
def | __add__ (self, rhs)
def | __processLine__ (self, line)
Public Member Functions inherited from GaudiTest.FilePreprocessor
def | __call__ (self, input)

## Private Attributes
| _operations

## Detailed Description

Definition at line 516 of file GaudiTest.py.

## Constructor & Destructor Documentation

## ◆ __init__()

def GaudiTest.RegexpReplacer.__init__ | ( |  | self,
|  |  | orig,
|  |  | repl = `""`,
|  |  | when = `None`
| ) |  |

Definition at line 517 of file GaudiTest.py.

517 def __init__(self, orig, repl="", when=None):
518 if when:
519 when = re.compile(when)
520 self._operations = [(when, re.compile(orig), repl)]
521

## Member Function Documentation

## ◆ __add__()

def GaudiTest.RegexpReplacer.__add__ | ( |  | self,
|  |  | rhs
| ) |  |

Reimplemented from GaudiTest.FilePreprocessor.

Definition at line 522 of file GaudiTest.py.

522 def __add__(self, rhs):
523 if isinstance(rhs, RegexpReplacer):
524 res = RegexpReplacer("", "", None)
525 res._operations = self._operations + rhs._operations
526 else:
527 res = FilePreprocessor.__add__(self, rhs)
528 return res
529

## ◆ __processLine__()

def GaudiTest.RegexpReplacer.__processLine__ | ( |  | self,
|  |  | line
| ) |  |

Reimplemented from GaudiTest.FilePreprocessor.

Definition at line 530 of file GaudiTest.py.

530 def __processLine__(self, line):
531 for w, o, r in self._operations:
532 if w is None or w.search(line):
533 line = o.sub(r, line)
534 return line
535
536
537 # Common preprocessors
GaudiTest.__processLine__
__processLine__
Definition: GaudiTest.py:543

## Member Data Documentation

## ◆ _operations

GaudiTest.RegexpReplacer._operations
| private

Definition at line 520 of file GaudiTest.py.

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

- GaudiPolicy/qmtest_classes/GaudiTest.py