Back to index

plone3  3.1.7
Public Member Functions | Private Attributes
Archetypes.Registry.Registry Class Reference

List of all members.

Public Member Functions

def __init__
def register
def unregister
def keys
def values
def items
def __getitem__
def get

Private Attributes

 __registry
 __allowed_class

Detailed Description

Definition at line 12 of file Registry.py.


Constructor & Destructor Documentation

def Archetypes.Registry.Registry.__init__ (   self,
  allowed_class 
)

Definition at line 14 of file Registry.py.

00014 
00015     def __init__(self, allowed_class):
00016         self.__registry = {}
00017         self.__allowed_class = allowed_class

Here is the caller graph for this function:


Member Function Documentation

def Archetypes.Registry.Registry.__getitem__ (   self,
  name 
)

Definition at line 37 of file Registry.py.

00037 
00038     def __getitem__(self, name):
00039         return self.__registry[name]

Here is the caller graph for this function:

def Archetypes.Registry.Registry.get (   self,
  name,
  default = None 
)

Definition at line 40 of file Registry.py.

00040 
00041     def get(self, name, default=None):
00042         return self.__registry.get(name, default)

Here is the caller graph for this function:

Definition at line 34 of file Registry.py.

00034 
00035     def items(self):
00036         return self.__registry.items()

Here is the caller graph for this function:

Definition at line 28 of file Registry.py.

00028 
00029     def keys(self):
00030         return [k for k, v in self.items()]

Here is the call graph for this function:

Here is the caller graph for this function:

def Archetypes.Registry.Registry.register (   self,
  name,
  item 
)

Definition at line 18 of file Registry.py.

00018 
00019     def register(self, name, item):
00020         if not isinstance(item, self.__allowed_class):
00021             raise TypeError, "Invalid value for item: %r (should be %r)" % \
00022                   (item, self.__allowed_class)
00023         self.__registry[name] = item

Here is the caller graph for this function:

def Archetypes.Registry.Registry.unregister (   self,
  name 
)

Definition at line 24 of file Registry.py.

00024 
00025     def unregister(self, name):
00026         if self.__registry.has_key(name):
00027             del self.__registry[name]

Here is the caller graph for this function:

Definition at line 31 of file Registry.py.

00031 
00032     def values(self):
00033         return [v for k, v in self.items()]

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 16 of file Registry.py.

Definition at line 15 of file Registry.py.


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