| The Gaudi Framework v32r1 (f65d50dc)

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

## Public Member Functions
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)

## Public Attributes
| history
| descr
| deprecated

## Static Public Attributes
| proptype = type(self.default)
| allowcompat = True
bool | allowcompat = True
| value = _isCompatible(proptype, value)
def | oldvec = self.descr.__get__(obj, type)
| tpo = type(oldvec[0])

## Properties
| default = property(getDefault, setDefault)

## Private Attributes
| __doc__
| __default

## Detailed Description

Definition at line 74 of file PropertyProxy.py.

## Constructor & Destructor Documentation

## ◆ __init__()

def GaudiKernel.PropertyProxy.PropertyProxy.__init__ | ( |  | self,
|  |  | descr,
|  |  | docString = `None`,
|  |  | default = `None`
| ) |  |

Reimplemented in GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy, GaudiKernel.PropertyProxy.GaudiHandleArrayPropertyProxy, and GaudiKernel.PropertyProxy.GaudiHandlePropertyProxy.

Definition at line 75 of file PropertyProxy.py.

75 def __init__(self, descr, docString=None, default=None):
76 self.history = {}
77 self.descr = descr
78 self.deprecated = False
79 if docString:
80 self.__doc__ = docString
81 if '[[deprecated]]' in docString:
82 self.deprecated = True
83 if default is not None:
84 self.default = default
85

## Member Function Documentation

## ◆ __delete__()

def GaudiKernel.PropertyProxy.PropertyProxy.__delete__ | ( |  | self,
|  |  | obj
| ) |  |

Definition at line 166 of file PropertyProxy.py.

166 def __delete__(self, obj):
167 if obj in self.history:
168 del self.history[obj]
169 self.descr.__delete__(obj)
170
171

## ◆ __get__()

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

Reimplemented in GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy, and GaudiKernel.PropertyProxy.GaudiHandlePropertyProxyBase.

Definition at line 98 of file PropertyProxy.py.

98 def __get__(self, obj, type=None):
99 try:
100 return self.descr.__get__(obj, type)
101 except AttributeError:
102 # special case for lists and dictionaries:
103 # allow default to work with on += and []
104 if self.__default.__class__ in [list, dict]:
105 self.descr.__set__(obj,
106 self.__default.__class__(self.__default))
107 return self.descr.__get__(obj, type)
108 else:
109 # for non lists (or dicts) return a reference to the default
110 # return self.__default
111 raise
112

## ◆ __set__()

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

Reimplemented in GaudiKernel.PropertyProxy.DataObjectHandleBasePropertyProxy, and GaudiKernel.PropertyProxy.GaudiHandlePropertyProxyBase.

Definition at line 113 of file PropertyProxy.py.

113 def __set__(self, obj, value):
114 # check if deprecated
115 if self.deprecated and not obj._unpickling:
116 log.warning('Property %s is deprecated: %s',
117 self.fullPropertyName(obj), self.__doc__)
118

## ◆ fullPropertyName()

def GaudiKernel.PropertyProxy.PropertyProxy.fullPropertyName | ( |  | self,
|  |  | obj
| ) |  |

Definition at line 94 of file PropertyProxy.py.

94 def fullPropertyName(self, obj):
95 return (obj.getJobOptName()
96 or obj.getName()) + '.' + self.descr.__name__
97

## ◆ getDefault()

def GaudiKernel.PropertyProxy.PropertyProxy.getDefault | ( |  | self | ) |

Definition at line 89 of file PropertyProxy.py.

89 def getDefault(self):
90 return self.__default
91

## ◆ setDefault()

def GaudiKernel.PropertyProxy.PropertyProxy.setDefault | ( |  | self,
|  |  | value
| ) |  |

Definition at line 86 of file PropertyProxy.py.

86 def setDefault(self, value):
87 self.__default = value
88

## Member Data Documentation

## ◆ __default

GaudiKernel.PropertyProxy.PropertyProxy.__default
| private

Definition at line 87 of file PropertyProxy.py.

## ◆ __doc__

GaudiKernel.PropertyProxy.PropertyProxy.__doc__
| private

Definition at line 80 of file PropertyProxy.py.

## ◆ allowcompat [1/2]

bool GaudiKernel.PropertyProxy.PropertyProxy.allowcompat = True
| static

Definition at line 120 of file PropertyProxy.py.

## ◆ allowcompat [2/2]

bool GaudiKernel.PropertyProxy.PropertyProxy.allowcompat = True
| static

Definition at line 124 of file PropertyProxy.py.

## ◆ deprecated

GaudiKernel.PropertyProxy.PropertyProxy.deprecated

Definition at line 78 of file PropertyProxy.py.

## ◆ descr

GaudiKernel.PropertyProxy.PropertyProxy.descr

Definition at line 77 of file PropertyProxy.py.

## ◆ history

GaudiKernel.PropertyProxy.PropertyProxy.history

Definition at line 76 of file PropertyProxy.py.

## ◆ oldvec

def GaudiKernel.PropertyProxy.PropertyProxy.oldvec = self.descr.__get__(obj, type)
| static

Definition at line 141 of file PropertyProxy.py.

## ◆ proptype

GaudiKernel.PropertyProxy.PropertyProxy.proptype = type(self.default)
| static

Definition at line 120 of file PropertyProxy.py.

## ◆ tpo

GaudiKernel.PropertyProxy.PropertyProxy.tpo = type(oldvec[0])
| static

Definition at line 143 of file PropertyProxy.py.

## ◆ value

GaudiKernel.PropertyProxy.PropertyProxy.value = _isCompatible(proptype, value)
| static

Definition at line 136 of file PropertyProxy.py.

## Property Documentation

## ◆ default

GaudiKernel.PropertyProxy.PropertyProxy.default = property(getDefault, setDefault)
| static

Definition at line 92 of file PropertyProxy.py.

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

- GaudiKernel/python/GaudiKernel/PropertyProxy.py