The Gaudi Framework  v32r2 (46d42edc)
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 191 of file Bindings.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 194 of file Bindings.py.

194  def __init__(self, prop):
195  self._type = type(prop).__name__
196  self.__doc__ = " --- Property type is " + self.ptype()
197 
198  if issubclass(type(prop), GaudiHandleProperty):
199  self._value = prop.value() # do nothing for ATLAS' handles
200  elif issubclass(type(prop), GaudiHandleArrayProperty):
201  self._value = prop.value() # do nothing for ATLAS' handles
202  else:
203  # for all other types try to extract the native python type
204  try:
205  self._value = eval(prop.toString(), {}, {})
206  except:
207  if hasattr(prop, 'value'):
208  self._value = prop.value()
209  else:
210  self._value = prop.toString()
211 
212  self.__doc__ += " --- Default value = " + str(self._value) + " --- "
213  if prop.documentation() != 'none':
214  self.__doc__ = prop.documentation() + '\\n' + self.__doc__
215  # keep the original property
216  self._property = prop # property itself
217 

Member Function Documentation

◆ documentation()

def GaudiPython.Bindings.PropertyEntry.documentation (   self)

Definition at line 228 of file Bindings.py.

228  def documentation(self):
229  return self.__doc__
230 

◆ hasDoc()

def GaudiPython.Bindings.PropertyEntry.hasDoc (   self)

Definition at line 231 of file Bindings.py.

231  def hasDoc(self):
232  return len(self.__doc__) > 0 and self.__doc__ != 'none'
233 
234 
235 # ----iProperty class----------------------------------------------------------
236 
237 

◆ property()

def GaudiPython.Bindings.PropertyEntry.property (   self)

Definition at line 224 of file Bindings.py.

224  def property(self):
225  "Return the underlying property itself "
226  return self._property
227 

◆ ptype()

def GaudiPython.Bindings.PropertyEntry.ptype (   self)

Definition at line 221 of file Bindings.py.

221  def ptype(self):
222  return self._type
223 

◆ value()

def GaudiPython.Bindings.PropertyEntry.value (   self)

Definition at line 218 of file Bindings.py.

218  def value(self):
219  return self._value
220 

Member Data Documentation

◆ __doc__

GaudiPython.Bindings.PropertyEntry.__doc__
private

Definition at line 196 of file Bindings.py.

◆ _property

GaudiPython.Bindings.PropertyEntry._property
private

Definition at line 216 of file Bindings.py.

◆ _type

GaudiPython.Bindings.PropertyEntry._type
private

Definition at line 195 of file Bindings.py.

◆ _value

GaudiPython.Bindings.PropertyEntry._value
private

Definition at line 199 of file Bindings.py.


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