vendor/Five/1.2b-r20590

view utilities/interfaces.py @ 0:3673ed425f80

Vendor import of Five 1.2b+ (r20590)
author fguillaume
date Fri, 02 Dec 2005 20:25:42 +0000
parents
children
line source
1 ##############################################################################
2 #
3 # Copyright (c) 2004, 2005 Zope Corporation and Contributors.
4 # All Rights Reserved.
5 #
6 # This software is subject to the provisions of the Zope Public License,
7 # Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution.
8 # THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED
9 # WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
10 # WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS
11 # FOR A PARTICULAR PURPOSE.
12 #
13 ##############################################################################
14 """Utility Interface Definitions.
16 $Id: interfaces.py 19222 2005-10-31 08:36:28Z yuppie $
17 """
18 from zope.interface import Interface
21 class IReadInterface(Interface):
23 def getDirectlyProvided():
24 """List the interfaces directly implemented by the object.
25 """
27 def getDirectlyProvidedNames():
28 """List the names of interfaces directly implemented by the object.
29 """
31 def getAvailableInterfaces():
32 """List the marker interfaces available for the object.
33 """
35 def getAvailableInterfaceNames():
36 """List the names of marker interfaces available for the object.
37 """
39 def getInterfaces():
40 """List interfaces provided by the class of the object.
41 """
43 def getInterfaceNames():
44 """List the names of interfaces provided by the class of the object.
45 """
47 def getProvided():
48 """List interfaces provided by the object.
49 """
51 def getDirectlyProvidedNames():
52 """List the names of interfaces provided by the object.
53 """
56 class IWriteInterface(Interface):
58 def update(add=(), remove=()):
59 """Update directly provided interfaces of the object.
60 """
62 def mark(interface):
63 """Add interface to interfaces the object directly provides.
64 """
66 def erase(interface):
67 """Remove interfaces from interfaces the object directly provides.
68 """
71 class IMarkerInterfaces(IReadInterface, IWriteInterface):
73 """Provides methods for inspecting and assigning marker interfaces.
74 """