| Trees | Index | Help |
|---|
| Package libconfix :: Package core :: Package repo :: Module marshalling :: Class Marshallable |
|
BuildInformation,
Node,
Package,
Provide,
Require,
UnmarshallableProvides support for versioned marshalling and unmarshalling of objects. Its functionality is a bit intrusive in that it requires every class that want to take part in this game to derive from it. The functionality is based on `pickle`'s __setstate__ and __getstate__ which is provided by `Marshallable`. Derived classes must implement two methods, `get_marshalling_data` and `set_marshalling_data`, to be able to operate meaningfully.
| Method Summary | |
|---|---|
__getstate__(self)
| |
__setstate__(self,
data)
| |
Return marshalling data for my attributes. | |
(To be documented)... | |
| Class Variable Summary | |
|---|---|
str |
ATTRIBUTES = 'attributes'
|
str |
GENERATING_CLASS = 'generating_class'
|
str |
VERSIONS = 'versions'
|
| Method Details |
|---|
get_marshalling_data(self)
Return marshalling data for my attributes.
To be implemented by derived classes.
The returned marshalling data is a dictionary object that
contains relatively anonymous data which represents the object
to be marshalled. The dictionary is composed by derived
classes and must look as follows:
::
{
'generating_class': <class object of generating object>,
'versions': <versions of contributions>,
'attributes': <dictionary with direct attributes key/value pairs>,
}
Called indirectly by `__getstate__`.
|
set_marshalling_data(self, data)(To be documented) |
| Class Variable Details |
|---|
ATTRIBUTES
|
GENERATING_CLASS
|
VERSIONS
|
| Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Fri Nov 23 16:56:40 2007 | http://epydoc.sf.net |