def getPort(self):
"""
Returns a Port object of the type CF__POA.Port.
"""
# The classobj generates a class using the following arguments:
#
# name: The name of the class to generate
# bases: A tuple containing all the base classes to use
# dct: A dictionary containing all the attributes such as
# functions, and class variables
PortClass = classobj('PortClass',
(CF__POA.Port,),
{'connectPort':self.connectPort,
'disconnectPort':self.disconnectPort})
# Create a port using the generate Metaclass and return an instance
port = PortClass()
return port._this()
评论列表
文章目录