The Gaudi Framework  v33r1 (b1225454)
GaudiPython.Bindings.PropertyEntry Class Reference
Inheritance diagram for GaudiPython.Bindings.PropertyEntry:
Collaboration diagram for GaudiPython.Bindings.PropertyEntry:

Public Member Functions

def __init__ (self, prop)
 
def value (self)
 
def ptype (self)
 
def property (self)
 
def documentation (self)
 
def hasDoc (self)
 

Private Attributes

 _type
 
 __doc__
 
 _value
 
 _property
 

Detailed Description

holds the value and the documentation string of a property 

Definition at line 202 of file Bindings.py.

Constructor & Destructor Documentation

◆ __init__()

def GaudiPython.Bindings.PropertyEntry.__init__ (   self,
  prop 
)

Definition at line 205 of file Bindings.py.

205  def __init__(self, prop):
206  self._type = type(prop).__name__
207  self.__doc__ = " --- Property type is " + self.ptype()
208 
209  if issubclass(type(prop), GaudiHandleProperty):
210  self._value = prop.value() # do nothing for ATLAS' handles
211  elif issubclass(type(prop), GaudiHandleArrayProperty):
212  self._value = prop.value() # do nothing for ATLAS' handles
213  else:
214  # for all other types try to extract the native python type
215  try:
216  self._value = eval(prop.toString(), {}, {})
217  except:
218  if hasattr(prop, 'value'):
219  self._value = prop.value()
220  else:
221  self._value = prop.toString()
222 
223  self.__doc__ += " --- Default value = " + str(self._value) + " --- "
224  if prop.documentation() != 'none':
225  self.__doc__ = prop.documentation() + '\\n' + self.__doc__
226  # keep the original property
227  self._property = prop # property itself
228 

Member Function Documentation

◆ documentation()

def GaudiPython.Bindings.PropertyEntry.documentation (   self)

Definition at line 239 of file Bindings.py.

239  def documentation(self):
240  return self.__doc__
241 

◆ hasDoc()

def GaudiPython.Bindings.PropertyEntry.hasDoc (   self)

Definition at line 242 of file Bindings.py.

242  def hasDoc(self):
243  return len(self.__doc__) > 0 and self.__doc__ != 'none'
244 
245 
246 # ----iProperty class----------------------------------------------------------
247 
248 

◆ property()

def GaudiPython.Bindings.PropertyEntry.property (   self)

Definition at line 235 of file Bindings.py.

235  def property(self):
236  "Return the underlying property itself "
237  return self._property
238 

◆ ptype()

def GaudiPython.Bindings.PropertyEntry.ptype (   self)

Definition at line 232 of file Bindings.py.

232  def ptype(self):
233  return self._type
234 

◆ value()

def GaudiPython.Bindings.PropertyEntry.value (   self)

Definition at line 229 of file Bindings.py.

229  def value(self):
230  return self._value
231 

Member Data Documentation

◆ __doc__

GaudiPython.Bindings.PropertyEntry.__doc__
private

Definition at line 207 of file Bindings.py.

◆ _property

GaudiPython.Bindings.PropertyEntry._property
private

Definition at line 227 of file Bindings.py.

◆ _type

GaudiPython.Bindings.PropertyEntry._type
private

Definition at line 206 of file Bindings.py.

◆ _value

GaudiPython.Bindings.PropertyEntry._value
private

Definition at line 210 of file Bindings.py.


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