Back to index

salome-kernel  6.5.0
Public Member Functions | Public Attributes
SALOME_PyNode.PyNode_i Class Reference
Inheritance diagram for SALOME_PyNode.PyNode_i:
Inheritance graph
[legend]
Collaboration diagram for SALOME_PyNode.PyNode_i:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def execute
def Register
def UnRegister
def Destroy

Public Attributes

 nodeName
 code
 my_container
 context
 poa
 cnt

Detailed Description

The implementation of the PyNode CORBA IDL

Definition at line 53 of file SALOME_PyNode.py.


Constructor & Destructor Documentation

def SALOME_PyNode.PyNode_i.__init__ (   self,
  nodeName,
  code,
  poa,
  my_container 
)
Initialize the node : compilation in the local context

Definition at line 55 of file SALOME_PyNode.py.

00055 
00056   def __init__(self, nodeName,code,poa,my_container):
00057     """Initialize the node : compilation in the local context"""
00058     Generic.__init__(self,poa)
00059     self.nodeName=nodeName
00060     self.code=code
00061     self.my_container=my_container._container
00062     linecache.cache[nodeName]=0,None,string.split(code,'\n'),nodeName
00063     ccode=compile(code,nodeName,'exec')
00064     self.context={}
00065     self.context["my_container"] = self.my_container
00066     exec ccode in self.context


Member Function Documentation

def SALOME_PyNode.Generic.Destroy (   self) [inherited]

Definition at line 49 of file SALOME_PyNode.py.

00049 
00050   def Destroy(self):
00051     print "WARNING SALOME::GenericObj::Destroy() function is obsolete! Use UnRegister() instead."
00052     self.UnRegister()

Here is the call graph for this function:

def SALOME_PyNode.PyNode_i.execute (   self,
  funcName,
  argsin 
)
Execute the function funcName found in local context with pickled args (argsin)

Definition at line 67 of file SALOME_PyNode.py.

00067 
00068   def execute(self,funcName,argsin):
00069     """Execute the function funcName found in local context with pickled args (argsin)"""
00070     try:
00071       argsin,kws=cPickle.loads(argsin)
00072       func=self.context[funcName]
00073       argsout=func(*argsin,**kws)
00074       argsout=cPickle.dumps(argsout,-1)
00075       return argsout
00076     except:
00077       exc_typ,exc_val,exc_fr=sys.exc_info()
00078       l=traceback.format_exception(exc_typ,exc_val,exc_fr)
00079       raise SALOME.SALOME_Exception(SALOME.ExceptionStruct(SALOME.BAD_PARAM,"".join(l),"PyNode: %s, function: %s" % (self.nodeName,funcName),0))

Here is the caller graph for this function:

def SALOME_PyNode.Generic.Register (   self) [inherited]

Definition at line 40 of file SALOME_PyNode.py.

00040 
00041   def Register(self):
00042     self.cnt+=1

def SALOME_PyNode.Generic.UnRegister (   self) [inherited]

Definition at line 43 of file SALOME_PyNode.py.

00043 
00044   def UnRegister(self):
00045     self.cnt-=1
00046     if self.cnt <= 0:
00047       oid=self.poa.servant_to_id(self)
00048       self.poa.deactivate_object(oid)

Here is the caller graph for this function:


Member Data Documentation

Definition at line 38 of file SALOME_PyNode.py.

Definition at line 59 of file SALOME_PyNode.py.

Definition at line 63 of file SALOME_PyNode.py.

Definition at line 60 of file SALOME_PyNode.py.

Definition at line 58 of file SALOME_PyNode.py.

Definition at line 37 of file SALOME_PyNode.py.


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