Gaudi Framework, version v23r10

Home   Generated: Mon Sep 30 2013
 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:
Inheritance graph
[legend]
Collaboration diagram for GaudiTest.RegexpReplacer:
Collaboration graph
[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 402 of file GaudiTest.py.

Constructor & Destructor Documentation

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

Definition at line 403 of file GaudiTest.py.

404  def __init__(self, orig, repl = "", when = None):
405  if when:
406  when = re.compile(when)
self._operations = [ (when, re.compile(orig), repl) ]

Member Function Documentation

def GaudiTest.RegexpReplacer.__add__ (   self,
  rhs 
)

Definition at line 407 of file GaudiTest.py.

408  def __add__(self,rhs):
409  if isinstance(rhs, RegexpReplacer):
410  res = RegexpReplacer("","",None)
411  res._operations = self._operations + rhs._operations
412  else:
413  res = FilePreprocessor.__add__(self, rhs)
return res
def GaudiTest.RegexpReplacer.__processLine__ (   self,
  line 
)

Definition at line 414 of file GaudiTest.py.

415  def __processLine__(self, line):
416  for w,o,r in self._operations:
417  if w is None or w.search(line):
418  line = o.sub(r, line)
419  return line
420 
# Common preprocessors

Member Data Documentation

GaudiTest.RegexpReplacer._operations
private

Definition at line 406 of file GaudiTest.py.


The documentation for this class was generated from the following file:
Generated at Mon Sep 30 2013 14:52:08 for Gaudi Framework, version v23r10 by Doxygen version 1.8.2 written by Dimitri van Heesch, © 1997-2004