Package utility :: Module TypeCheckUtility :: Class TypeCheckUtility
[show private | hide private]
[frames | no frames]

Class TypeCheckUtility

Singleton --+
            |
           TypeCheckUtility


Singleton class used to type check function arguments in DSheet.
Method Summary
  __init__(self)
TypeCheckUtility constructor.
  typeCheck(self, args, types)
Function used in debug mode to type check arguments of functions, since it is not native in python.

Class Variable Summary
bool debug: Set to false to disable typechecking
Callable getInstance = <utility.TypeCheckUtility.Callable instanc...

Method Details

__init__(self)
(Constructor)

TypeCheckUtility constructor. (DO NOT USE: use getInstance())
Raises:
RunTimeError - TypeCheckUtility is a singleton and must be instantiated only once.
Overrides:
utility.Singleton.Singleton.__init__

typeCheck(self, args, types)

Function used in debug mode to type check arguments of functions, since it is not native in python. This function takes two list arguments, which must be of the same size. The first list contains objects to be typechecked. The second list contains the corresponding types. The types list can contain tuples to express multiple types.
Parameters:
args - list of arguments to be typechecked
           (type=list of Objects)
types - list of corresponding types
           (type=list of tuple of types)

Requires: len(args)==len(types)


Class Variable Details

debug

Set to false to disable typechecking
Type:
bool
Value:
True                                                                   

getInstance

Type:
Callable
Value:
<utility.TypeCheckUtility.Callable instance at 0xf6fbc5cc>             

Generated by Epydoc 2.1 on Tue Aug 17 18:20:06 2004 http://epydoc.sf.net