All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
GaudiPython.Bindings.PropertyEntry Class Reference
Inheritance diagram for GaudiPython.Bindings.PropertyEntry:
Collaboration diagram for GaudiPython.Bindings.PropertyEntry:

Public Member Functions

def __init__
 
def value
 
def ptype
 
def property
 
def documentation
 
def hasDoc
 

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 143 of file Bindings.py.

Constructor & Destructor Documentation

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

Definition at line 145 of file Bindings.py.

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

Member Function Documentation

def GaudiPython.Bindings.PropertyEntry.documentation (   self)

Definition at line 172 of file Bindings.py.

173  def documentation(self) :
return self.__doc__
__doc__
Definition: Bindings.py:147
def documentation
Definition: Bindings.py:172
def GaudiPython.Bindings.PropertyEntry.hasDoc (   self)

Definition at line 174 of file Bindings.py.

175  def hasDoc(self):
176  return len(self.__doc__)>0 and self.__doc__ != 'none'
177 
#----iProperty class---------------------------------------------------------------------
__doc__
Definition: Bindings.py:147
def hasDoc
Definition: Bindings.py:174
def GaudiPython.Bindings.PropertyEntry.property (   self)

Definition at line 169 of file Bindings.py.

170  def property(self):
171  "Return the underlying property itself "
return self._property
def property
Definition: Bindings.py:169
_property
keep the original property
Definition: Bindings.py:164
def GaudiPython.Bindings.PropertyEntry.ptype (   self)

Definition at line 167 of file Bindings.py.

168  def ptype(self) :
return self._type
def ptype
Definition: Bindings.py:167
_type
Definition: Bindings.py:146
def GaudiPython.Bindings.PropertyEntry.value (   self)

Definition at line 165 of file Bindings.py.

166  def value(self) :
return self._value
_value
Definition: Bindings.py:150
def value
Definition: Bindings.py:165

Member Data Documentation

GaudiPython.Bindings.PropertyEntry.__doc__
private

Definition at line 147 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._property
private

keep the original property

Definition at line 164 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._type
private

Definition at line 146 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._value
private

Definition at line 150 of file Bindings.py.


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