CorbaConsumer.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 # -*- coding: euc-jp -*-
3 
4 
5 
19 
20 
21 from omniORB import CORBA
22 
23 
38  """
39  """
40 
41 
42 
43 
58  def __init__(self, consumer=None):
59  if consumer:
60  self._objref = consumer._objref
61  else:
62  self._objref = None
63 
64 
65 
83  def equal(self, consumer):
84  self._objref = consumer._objref
85  return self
86 
87 
88 
113  def setObject(self, obj):
114  if CORBA.is_nil(obj):
115  return False
116 
117  self._objref = obj
118  return True
119 
120 
121 
142  def getObject(self):
143  return self._objref
144 
145 
146 
159  def releaseObject(self):
160  self._objref = CORBA.Object._nil
161 
162 
163 
164 
188  """
189  """
190 
191 
192 
193 
208  def __init__(self, interfaceType=None, consumer=None):
209  if interfaceType:
210  self._interfaceType = interfaceType
211  else:
212  self._interfaceType = None
213 
214  if consumer:
215  CorbaConsumerBase.__init__(self, consumer)
216  self._var = consumer._var
217  else:
218  CorbaConsumerBase.__init__(self)
219  self._var = None
220 
221 
222 
240  def equal(self, consumer):
241  self._var = consumer._var
242 
243 
244  def __del__(self):
245  self.releaseObject()
246 
247 
248 
272  def setObject(self, obj):
273  if not CorbaConsumerBase.setObject(self, obj):
274  self.releaseObject()
275  return False
276 
277  if self._interfaceType:
278  self._var = obj._narrow(self._interfaceType)
279  else:
280  self._var = self._objref
281 
282  if not CORBA.is_nil(self._var):
283  return True
284 
285  self.releaseObject()
286  return False
287 
288 
289 
314  def _ptr(self):
315  return self._var
316 
317 
318 
331  def releaseObject(self):
332  CorbaConsumerBase.releaseObject(self)
333  self._var = CORBA.Object._nil
def __init__(self, interfaceType=None, consumer=None)
Consructor.
def __init__(self, consumer=None)
Consructor.
def setObject(self, obj)
Set Object.
def setObject(self, obj)
Set CORBA Object.
def equal(self, consumer)
Assignment operator.
def _ptr(self)
Get Object reference narrowed as ObjectType.
def equal(self, consumer)
Assignment operator.


openrtm_aist_python
Author(s): Shinji Kurihara
autogenerated on Thu Jun 6 2019 19:11:34