| # Gaudi Framework, version v25r0 |

Home |  | Generated: Mon Feb 17 2014

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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__
def | __add__
def | __processLine__
Public Member Functions inherited from GaudiTest.FilePreprocessor
def | __processLine__
def | __call__
def | __add__

## Private Attributes
| _operations

## Detailed Description

Definition at line 456 of file GaudiTest.py.

## Constructor & Destructor Documentation

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

Definition at line 457 of file GaudiTest.py.

457
458 def __init__(self, orig, repl = "", when = None):
459 if when:
460 when = re.compile(when)
self._operations = [ (when, re.compile(orig), repl) ]

## Member Function Documentation

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

Definition at line 461 of file GaudiTest.py.

461
462 def __add__(self,rhs):
463 if isinstance(rhs, RegexpReplacer):
464 res = RegexpReplacer("","",None)
465 res._operations = self._operations + rhs._operations
466 else:
467 res = FilePreprocessor.__add__(self, rhs)
return res

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

Definition at line 468 of file GaudiTest.py.

468
469 def __processLine__(self, line):
470 for w,o,r in self._operations:
471 if w is None or w.search(line):
472 line = o.sub(r, line)
473 return line
474
# Common preprocessors

## Member Data Documentation

GaudiTest.RegexpReplacer._operations
| private

Definition at line 460 of file GaudiTest.py.

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

- /afs/cern.ch/sw/Gaudi/releases/GAUDI/GAUDI_v25r0/GaudiPolicy/qmtest_classes/GaudiTest.py