TestResultCounter::St Class Reference

List of all members.

Public Member Functions

def __init__
def __str__
def add
def addNum
def addStr
def addObj


Detailed Description

Definition at line 43 of file TestResultCounter.py.


Member Function Documentation

def TestResultCounter::St::__init__ (   self  ) 

Definition at line 45 of file TestResultCounter.py.

00045                         :
00046          self._dict = { }
00047          self._cntr = Ct( )
00048           
    def __str__( self ):

def TestResultCounter::St::__str__ (   self  ) 

Definition at line 49 of file TestResultCounter.py.

00049                        :
00050          values = self._dict.values( )
00051          values.sort( )
00052          answer = "{"
00053          for value in values:
00054               answer += " %s" % value
00055          answer += " }"
00056          return answer
00057 
    def add( self, val ):

def TestResultCounter::St::add (   self,
  val 
)

Definition at line 58 of file TestResultCounter.py.

00058                         :
00059          if not isinstance( val, types.StringType ):
00060               return self.addNum( val )
00061          else:
00062               return self.addStr( val )
00063 
    def addNum( self, num ):

def TestResultCounter::St::addNum (   self,
  num 
)

Definition at line 64 of file TestResultCounter.py.

00064                            :
00065          obj = self.addObj( Ob( num, "new" ) )
00066          return obj
00067 
    def addStr( self, str ):

def TestResultCounter::St::addObj (   self,
  obj 
)

Definition at line 74 of file TestResultCounter.py.

00074                            :
00075          val = obj._val
00076          if self._dict.has_key( val ):
00077               obj = self._dict[ val ]
00078               typ = obj._typ
00079               if typ != "new":
00080                    self._cntr.update( obj._typ )
00081               obj._typ = "dup"
00082          else:
00083               self._dict[ val ] = obj
00084               if obj._typ != "old":
00085                    self._cntr.update( obj._typ )
00086          return obj
00087 
def validate( cache, obj, lbl, ref ):

def TestResultCounter::St::addStr (   self,
  str 
)

Definition at line 68 of file TestResultCounter.py.

00068                            :
00069          num = int( str )
00070          obj = Ob( num, "old" )
00071          obj = self.addObj( obj )
00072          return obj
00073 
    def addObj( self, obj ):


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

Generated on Sun Mar 22 09:59:14 2009 for Multiperfect Number Generator by  doxygen 1.5.8