Package gavo :: Package utils :: Module codetricks :: Class IdManagerMixin
[frames] | no frames]

Class IdManagerMixin

source code

object --+
         |
        IdManagerMixin
Known Subclasses:

A mixin for objects requiring unique IDs.

The primaray use case is XML generation, where you want stable IDs for objects, but IDs must be unique over an entire XML file.

The IdManagerMixin provides some methods for doing that:

Instance Methods
 
cloneFrom(self, other)
takes the id management dictionaries from other.
source code
 
getForId(self, id) source code
 
getIdFor(self, ob) source code
 
getOrMakeIdFor(self, ob, suggestion=None) source code
 
makeIdFor(self, ob, suggestion=None) source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __init__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from object: __class__