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

Constructor & Destructor Documentation

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

Definition at line 144 of file Bindings.py.

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

Definition at line 144 of file Bindings.py.

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

Member Function Documentation

def GaudiPython.Bindings.PropertyEntry.documentation (   self)

Definition at line 171 of file Bindings.py.

def GaudiPython.Bindings.PropertyEntry.documentation (   self)

Definition at line 171 of file Bindings.py.

def GaudiPython.Bindings.PropertyEntry.hasDoc (   self)

Definition at line 173 of file Bindings.py.

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

Definition at line 173 of file Bindings.py.

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

Definition at line 168 of file Bindings.py.

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

Definition at line 168 of file Bindings.py.

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

Definition at line 166 of file Bindings.py.

def GaudiPython.Bindings.PropertyEntry.ptype (   self)

Definition at line 166 of file Bindings.py.

def GaudiPython.Bindings.PropertyEntry.value (   self)

Definition at line 164 of file Bindings.py.

def GaudiPython.Bindings.PropertyEntry.value (   self)

Definition at line 164 of file Bindings.py.

Member Data Documentation

GaudiPython.Bindings.PropertyEntry.__doc__
private

Definition at line 146 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._property
private

keep the original property

Definition at line 163 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._type
private

Definition at line 145 of file Bindings.py.

GaudiPython.Bindings.PropertyEntry._value
private

Definition at line 149 of file Bindings.py.


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