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
 keep the original property More...
 

Detailed Description

holds the value and the documentation string of a property 

Definition at line 151 of file Bindings.py.

Constructor & Destructor Documentation

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

Definition at line 153 of file Bindings.py.

153  def __init__(self, prop) :
154  self._type = type(prop).__name__
155  self.__doc__ = " --- Property type is " + self.ptype()
156 
157  if issubclass(type(prop),GaudiHandleProperty) :
158  self._value = prop.value() # do nothing for ATLAS' handles
159  elif issubclass(type(prop),GaudiHandleArrayProperty) :
160  self._value = prop.value() # do nothing for ATLAS' handles
161  else :
162  # for all other types try to extract the native python type
163  try: self._value = eval( prop.toString() , {} , {} )
164  except:
165  if hasattr ( prop , 'value' ) : self._value = prop.value()
166  else : self._value = prop.toString()
167 
168  self.__doc__ += " --- Default value = " + str(self._value) + " --- "
169  if prop.documentation() != 'none':
170  self.__doc__ = prop.documentation() + '\\n' + self.__doc__
171  ## keep the original property
172  self._property = prop # property itself
_value
Definition: Bindings.py:158
def __init__(self, prop)
Definition: Bindings.py:153
_type
Definition: Bindings.py:154
__doc__
Definition: Bindings.py:155
_property
keep the original property
Definition: Bindings.py:172
def ptype(self)
Definition: Bindings.py:175

Member Function Documentation

def GaudiPython.Bindings.PropertyEntry.documentation (   self)

Definition at line 180 of file Bindings.py.

def GaudiPython.Bindings.PropertyEntry.hasDoc (   self)

Definition at line 182 of file Bindings.py.

182  def hasDoc(self):
183  return len(self.__doc__)>0 and self.__doc__ != 'none'
184 
185 #----iProperty class---------------------------------------------------------------------
def hasDoc(self)
Definition: Bindings.py:182
__doc__
Definition: Bindings.py:155
def GaudiPython.Bindings.PropertyEntry.property (   self)

Definition at line 177 of file Bindings.py.

177  def property(self):
178  "Return the underlying property itself "
179  return self._property
def property(self)
Definition: Bindings.py:177
_property
keep the original property
Definition: Bindings.py:172
def GaudiPython.Bindings.PropertyEntry.ptype (   self)

Definition at line 175 of file Bindings.py.

def GaudiPython.Bindings.PropertyEntry.value (   self)

Definition at line 173 of file Bindings.py.

Member Data Documentation

GaudiPython.Bindings.PropertyEntry.__doc__
private

Definition at line 155 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._property
private

keep the original property

Definition at line 172 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._type
private

Definition at line 154 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._value
private

Definition at line 158 of file Bindings.py.


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