1
##############################################################################
3
# Copyright (c) 2003 Zope Corporation and Contributors.
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.
13
##############################################################################
14
"""Renderer Interface Declarations
16
The source renderer takes a special type of string, an ISource, and is able to
19
$Id: interfaces.py 25177 2004-06-02 13:17:31Z jim $
21
from zope.interface import Interface
23
class ISource(Interface):
24
"""Simple base interface for all possible Wiki Page Source types."""
26
class ISourceRenderer(Interface):
27
"""Object implementing this interface are responsible for rendering an
28
ISource objects to an output format.
30
This is the base class for all possible output types."""
32
def __init__(self, source):
33
"""Initialize the renderer.
35
The source argument is the source code that needs to be converted.
39
"""Renders the source into another format."""
41
class IHTMLRenderer(ISourceRenderer):
42
"""Renders an ISource object to HTML."""