Back to index

salome-smesh  6.5.0
Public Member Functions | Public Attributes
smeshDC.hypMethodWrapper Class Reference

List of all members.

Public Member Functions

def __init__
def __call__

Public Attributes

 hyp
 method

Detailed Description

Definition at line 4362 of file smeshDC.py.


Constructor & Destructor Documentation

def smeshDC.hypMethodWrapper.__init__ (   self,
  hyp,
  method 
)

Definition at line 4363 of file smeshDC.py.

04363 
04364     def __init__(self, hyp, method):
04365         self.hyp    = hyp
04366         self.method = method
04367         #print "REBIND:", method.__name__
04368         return


Member Function Documentation

def smeshDC.hypMethodWrapper.__call__ (   self,
  args 
)

Definition at line 4370 of file smeshDC.py.

04370 
04371     def __call__(self,*args):
04372         if not args:
04373             return self.method( self.hyp, *args ) # hypothesis method with no args
04374 
04375         #print "MethWrapper.__call__",self.method.__name__, args
04376         try:
04377             parsed = ParseParameters(*args)     # replace variables with their values
04378             self.hyp.SetVarParameter( parsed[-2], self.method.__name__ )
04379             result = self.method( self.hyp, *parsed[:-2] ) # call hypothesis method
04380         except omniORB.CORBA.BAD_PARAM: # raised by hypothesis method call
04381             # maybe there is a replaced string arg which is not variable
04382             result = self.method( self.hyp, *args )
04383         except ValueError, detail: # raised by ParseParameters()
04384             try:
04385                 result = self.method( self.hyp, *args )
04386             except omniORB.CORBA.BAD_PARAM:
04387                 raise ValueError, detail # wrong variable name
04388 
04389         return result

Here is the call graph for this function:


Member Data Documentation

Definition at line 4364 of file smeshDC.py.

Definition at line 4365 of file smeshDC.py.


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