~landscape/zope3/trunk

« back to all changes in this revision

Viewing changes to src/zope/app/renderer/interfaces.py

  • Committer: Sidnei da Silva
  • Date: 2010-07-05 21:07:01 UTC
  • Revision ID: sidnei.da.silva@canonical.com-20100705210701-zmqhqrbzad1mhzsl
- Reduce deps

Show diffs side-by-side

added added

removed removed

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