The Gaudi Framework  v30r4 (9b837755)
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 173 of file Bindings.py.

Constructor & Destructor Documentation

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

Definition at line 176 of file Bindings.py.

176  def __init__(self, prop):
177  self._type = type(prop).__name__
178  self.__doc__ = " --- Property type is " + self.ptype()
179 
180  if issubclass(type(prop), GaudiHandleProperty):
181  self._value = prop.value() # do nothing for ATLAS' handles
182  elif issubclass(type(prop), GaudiHandleArrayProperty):
183  self._value = prop.value() # do nothing for ATLAS' handles
184  else:
185  # for all other types try to extract the native python type
186  try:
187  self._value = eval(prop.toString(), {}, {})
188  except:
189  if hasattr(prop, 'value'):
190  self._value = prop.value()
191  else:
192  self._value = prop.toString()
193 
194  self.__doc__ += " --- Default value = " + str(self._value) + " --- "
195  if prop.documentation() != 'none':
196  self.__doc__ = prop.documentation() + '\\n' + self.__doc__
197  # keep the original property
198  self._property = prop # property itself
199 
_value
Definition: Bindings.py:181
def __init__(self, prop)
Definition: Bindings.py:176
_type
Definition: Bindings.py:177
__doc__
Definition: Bindings.py:178
_property
Definition: Bindings.py:198
def ptype(self)
Definition: Bindings.py:203

Member Function Documentation

def GaudiPython.Bindings.PropertyEntry.documentation (   self)

Definition at line 210 of file Bindings.py.

def GaudiPython.Bindings.PropertyEntry.hasDoc (   self)

Definition at line 213 of file Bindings.py.

213  def hasDoc(self):
214  return len(self.__doc__) > 0 and self.__doc__ != 'none'
215 
216 # ----iProperty class----------------------------------------------------------
217 
218 
def hasDoc(self)
Definition: Bindings.py:213
__doc__
Definition: Bindings.py:178
def GaudiPython.Bindings.PropertyEntry.property (   self)

Definition at line 206 of file Bindings.py.

206  def property(self):
207  "Return the underlying property itself "
208  return self._property
209 
def property(self)
Definition: Bindings.py:206
_property
Definition: Bindings.py:198
def GaudiPython.Bindings.PropertyEntry.ptype (   self)

Definition at line 203 of file Bindings.py.

203  def ptype(self):
204  return self._type
205 
_type
Definition: Bindings.py:177
def ptype(self)
Definition: Bindings.py:203
def GaudiPython.Bindings.PropertyEntry.value (   self)

Definition at line 200 of file Bindings.py.

200  def value(self):
201  return self._value
202 
_value
Definition: Bindings.py:181
def value(self)
Definition: Bindings.py:200

Member Data Documentation

GaudiPython.Bindings.PropertyEntry.__doc__
private

Definition at line 178 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._property
private

Definition at line 198 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._type
private

Definition at line 177 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._value
private

Definition at line 181 of file Bindings.py.


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