All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Public Attributes | List of all members
SortModuleTimes.TabularAlignmentClass.LineNo Class Reference
Inheritance diagram for SortModuleTimes.TabularAlignmentClass.LineNo:
SortModuleTimes.TabularAlignmentClass.LineIdentifierClass

Public Member Functions

def __init__
 
def matchLine
 
def __call__
 
- Public Member Functions inherited from SortModuleTimes.TabularAlignmentClass.LineIdentifierClass
def __init__
 
def __call__
 

Public Attributes

 lineno
 
 success_factor
 

Detailed Description

Definition at line 713 of file SortModuleTimes.py.

Constructor & Destructor Documentation

def SortModuleTimes.TabularAlignmentClass.LineNo.__init__ (   self,
  lineno,
  success_factor = 5. 
)

Definition at line 714 of file SortModuleTimes.py.

715  def __init__(self, lineno, success_factor = 5.):
716  TabularAlignmentClass.LineIdentifierClass.__init__(self)
717  if isinstance(lineno, int): self.lineno = [ lineno ]
718  else: self.lineno = lineno
self.success_factor = success_factor

Member Function Documentation

def SortModuleTimes.TabularAlignmentClass.LineNo.__call__ (   self,
  iLine,
  rawdata 
)

Definition at line 726 of file SortModuleTimes.py.

727  def __call__(self, iLine, rawdata):
728  success = 0.
729  for lineno in self.lineno:
730  if self.matchLine(lineno, iLine, rawdata): success += 1.
731  if success == 0: return None
732  if self.success_factor == 0.: return 1.
else: return success * self.success_factor
def SortModuleTimes.TabularAlignmentClass.LineNo.matchLine (   self,
  lineno,
  iLine,
  rawdata 
)

Definition at line 721 of file SortModuleTimes.py.

722  def matchLine(self, lineno, iLine, rawdata):
723  if lineno < 0: lineno = len(rawdata) + lineno
return iLine == lineno

Member Data Documentation

SortModuleTimes.TabularAlignmentClass.LineNo.lineno

Definition at line 716 of file SortModuleTimes.py.

SortModuleTimes.TabularAlignmentClass.LineNo.success_factor

Definition at line 718 of file SortModuleTimes.py.


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