| # Gaudi Framework, version v23r1 |

Home |  | Generated: Wed Feb 29 2012

Public Member Functions | Private Attributes

# GaudiTest::RegexpReplacer Class Reference

Inheritance diagram for GaudiTest::RegexpReplacer:
[legend]
Collaboration diagram for GaudiTest::RegexpReplacer:
[legend]

List of all members.

## Public Member Functions
def | __init__
def | __add__
def | __processLine__
## Private Attributes
| _operations

## Detailed Description

Definition at line 388 of file GaudiTest.py.

## Constructor & Destructor Documentation

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

Definition at line 389 of file GaudiTest.py.

    00390                                                     :
    00391         if when:
    00392             when = re.compile(when)
            self._operations = [ (when, re.compile(orig), repl) ]

## Member Function Documentation

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

Reimplemented from GaudiTest::FilePreprocessor.

Definition at line 393 of file GaudiTest.py.

    00394                          :
    00395         if isinstance(rhs, RegexpReplacer):
    00396             res = RegexpReplacer("","",None)
    00397             res._operations = self._operations + rhs._operations
    00398         else:
    00399             res = FilePreprocessor.__add__(self, rhs)
            return res

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

Reimplemented from GaudiTest::FilePreprocessor.

Definition at line 400 of file GaudiTest.py.

    00401                                    :
    00402         for w,o,r in self._operations:
    00403             if w is None or w.search(line):
    00404                 line = o.sub(r, line)
    00405         return line
    00406
    # Common preprocessors

## Member Data Documentation

GaudiTest::RegexpReplacer::_operations`[private]`

Definition at line 389 of file GaudiTest.py.

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

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

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Defines