The Gaudi Framework  v31r0 (aeb156f0)
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 183 of file Bindings.py.

Constructor & Destructor Documentation

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

Definition at line 186 of file Bindings.py.

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

Member Function Documentation

def GaudiPython.Bindings.PropertyEntry.documentation (   self)

Definition at line 220 of file Bindings.py.

def GaudiPython.Bindings.PropertyEntry.hasDoc (   self)

Definition at line 223 of file Bindings.py.

223  def hasDoc(self):
224  return len(self.__doc__) > 0 and self.__doc__ != 'none'
225 
226 
227 # ----iProperty class----------------------------------------------------------
228 
229 
def hasDoc(self)
Definition: Bindings.py:223
__doc__
Definition: Bindings.py:188
def GaudiPython.Bindings.PropertyEntry.property (   self)

Definition at line 216 of file Bindings.py.

216  def property(self):
217  "Return the underlying property itself "
218  return self._property
219 
def property(self)
Definition: Bindings.py:216
_property
Definition: Bindings.py:208
def GaudiPython.Bindings.PropertyEntry.ptype (   self)

Definition at line 213 of file Bindings.py.

213  def ptype(self):
214  return self._type
215 
_type
Definition: Bindings.py:187
def ptype(self)
Definition: Bindings.py:213
def GaudiPython.Bindings.PropertyEntry.value (   self)

Definition at line 210 of file Bindings.py.

210  def value(self):
211  return self._value
212 
_value
Definition: Bindings.py:191
def value(self)
Definition: Bindings.py:210

Member Data Documentation

GaudiPython.Bindings.PropertyEntry.__doc__
private

Definition at line 188 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._property
private

Definition at line 208 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._type
private

Definition at line 187 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._value
private

Definition at line 191 of file Bindings.py.


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