| The Gaudi Framework v28r2-patches (bc4ad17a)

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes
- Files

- Class List
- Class Index
- Class Hierarchy
- Class Members

Public Member Functions | List of all members
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy Class Reference
Inheritance diagram for GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy:
[legend]
Collaboration diagram for GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy:
[legend]

## Public Member Functions
def | __init__ (self, descr, docString, default)
def | __get__ (self, obj, type=None)
def | __set__ (self, obj, value)
def | convertValueToBeSet (self, obj, value)
Public Member Functions inherited from GaudiKernel.PropertyProxy.PropertyProxy
def | __init__ (self, descr, docString=None, default=None)
def | setDefault (self, value)
def | getDefault (self)
def | fullPropertyName (self, obj)
def | __get__ (self, obj, type=None)
def | __set__ (self, obj, value)
def | __delete__ (self, obj)

## Additional Inherited Members
Public Attributes inherited from GaudiKernel.PropertyProxy.PropertyProxy
| history
| descr
Properties inherited from GaudiKernel.PropertyProxy.PropertyProxy
| default = property( getDefault, setDefault )

## Detailed Description

Definition at line 347 of file PropertyProxy.py.

## Constructor & Destructor Documentation

def GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.__init__ | ( |  | self,
|  |  | descr,
|  |  | docString,
|  |  | default
| ) |  |

Definition at line 349 of file PropertyProxy.py.

349 def __init__(self, descr, docString, default):
350 PropertyProxy.__init__( self, descr, docString, default )
351
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.__init__
def __init__(self, descr, docString, default)
Definition: PropertyProxy.py:349

## Member Function Documentation

def GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.__get__ | ( |  | self,
|  |  | obj,
|  |  | type = `None`
| ) |  |

Definition at line 352 of file PropertyProxy.py.

352 def __get__(self, obj, type=None):
353 try:
354 return self.descr.__get__( obj, type )
355 except AttributeError:
356 # Get default
357 try:
358 default = obj.__class__.getDefaultProperty( self.descr.__name__ )
359 default = self.convertValueToBeSet( obj, default )
360 if default:
361 self.__set__( obj, default )
362 except AttributeError,e:
363 # change type of exception to avoid false error message
364 raise RuntimeError(*e.args)
365
366 return self.descr.__get__( obj, type )
367
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.convertValueToBeSet
def convertValueToBeSet(self, obj, value)
Definition: PropertyProxy.py:376
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.__get__
def __get__(self, obj, type=None)
Definition: PropertyProxy.py:352
GaudiKernel.PropertyProxy.PropertyProxy.__set__
def __set__(self, obj, value)
Definition: PropertyProxy.py:97

def GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.__set__ | ( |  | self,
|  |  | obj,
|  |  | value
| ) |  |

Definition at line 368 of file PropertyProxy.py.

368 def __set__(self, obj, value):
369 if not obj._isInSetDefaults() or not obj in self.history:
370 value = self.convertValueToBeSet( obj, value )
371 # assign the value
372 self.descr.__set__( obj, value )
373 log.debug( "Setting %s = %r", self.fullPropertyName( obj ), value )
374 self.history.setdefault( obj, [] ).append( value)
375
GaudiKernel.PropertyProxy.PropertyProxy.history
history
Definition: PropertyProxy.py:64
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.convertValueToBeSet
def convertValueToBeSet(self, obj, value)
Definition: PropertyProxy.py:376
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.__set__
def __set__(self, obj, value)
Definition: PropertyProxy.py:368
GaudiKernel.PropertyProxy.PropertyProxy.fullPropertyName
def fullPropertyName(self, obj)
Definition: PropertyProxy.py:80

def GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.convertValueToBeSet | ( |  | self,
|  |  | obj,
|  |  | value
| ) |  |

Definition at line 376 of file PropertyProxy.py.

376 def convertValueToBeSet(self, obj, value):
377 if value is None: value = ''
378
379 if type(value) == str:
380 return DataObjectHandleBase(value)
381 elif isinstance(value, DataObjectHandleBase):
382 return DataObjectHandleBase(value.__str__())
383
384
GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy.convertValueToBeSet
def convertValueToBeSet(self, obj, value)
Definition: PropertyProxy.py:376
GaudiKernel.DataObjectHandleBase.DataObjectHandleBase
Definition: DataObjectHandleBase.py:6
gaudirun.type
type
Definition: gaudirun.py:125

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

- GaudiKernel/python/GaudiKernel/PropertyProxy.py