~vaifrax/inkscape/bugfix170049

« back to all changes in this revision

Viewing changes to src/dom/svglsimpl.h

  • Committer: mental
  • Date: 2006-01-16 02:36:01 UTC
  • Revision ID: mental@users.sourceforge.net-20060116023601-wkr0h7edl5veyudq
moving trunk for module inkscape

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 * Copyright (c) 2004 World Wide Web Consortium,
 
3
 *
 
4
 * (Massachusetts Institute of Technology, European Research Consortium for
 
5
 * Informatics and Mathematics, Keio University). All Rights Reserved. This
 
6
 * work is distributed under the W3C(r) Software License [1] in the hope that
 
7
 * it will be useful, but WITHOUT ANY WARRANTY; without even the implied
 
8
 * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
9
 *
 
10
 * [1] http://www.w3.org/Consortium/Legal/2002/copyright-software-20021231
 
11
 */
 
12
 
 
13
// File: http://www.w3.org/TR/2004/REC-DOM-Level-3-LS-20040407/ls.idl
 
14
 
 
15
#ifndef __SVGLSIMPL_H__
 
16
#define __SVGLSIMPL_H__
 
17
 
 
18
#include "lsimpl.h"
 
19
#include "svgparser.h"
 
20
 
 
21
 
 
22
namespace org {
 
23
namespace w3c {
 
24
namespace dom {
 
25
namespace ls  {
 
26
 
 
27
 
 
28
 
 
29
 
 
30
/*#########################################################################
 
31
## SVGLSParser
 
32
#########################################################################*/
 
33
 
 
34
/**
 
35
 *
 
36
 */
 
37
class SVGLSParserImpl : virtual public LSParserImpl
 
38
{
 
39
public:
 
40
 
 
41
    /**
 
42
     *
 
43
     */
 
44
    virtual Document *parse(const LSInput &input)
 
45
                            throw(dom::DOMException, LSException);
 
46
                            
 
47
 
 
48
 
 
49
    //##################
 
50
    //# Non-API methods
 
51
    //##################
 
52
 
 
53
    /**
 
54
     *
 
55
     */
 
56
    SVGLSParserImpl()
 
57
        {}
 
58
 
 
59
    /**
 
60
     *
 
61
     */
 
62
    virtual ~SVGLSParserImpl()
 
63
        {}
 
64
    
 
65
 
 
66
 
 
67
    //##################
 
68
    //# Internals
 
69
    //##################
 
70
 
 
71
 
 
72
protected:
 
73
 
 
74
 
 
75
        
 
76
};
 
77
 
 
78
 
 
79
/*#########################################################################
 
80
## SVGLSSerializerImpl
 
81
#########################################################################*/
 
82
 
 
83
/**
 
84
 *
 
85
 */
 
86
class SVGLSSerializerImpl : virtual public LSSerializerImpl
 
87
{
 
88
public:
 
89
 
 
90
    //##################
 
91
    //# Non-API methods
 
92
    //##################
 
93
 
 
94
    /**
 
95
     *
 
96
     */
 
97
    SVGLSSerializerImpl()
 
98
        {
 
99
        }
 
100
 
 
101
    /**
 
102
     *
 
103
     */
 
104
    virtual ~SVGLSSerializerImpl()
 
105
        {}
 
106
 
 
107
 
 
108
 
 
109
protected:
 
110
 
 
111
    /**
 
112
     *  Overload me to change behaviour
 
113
     */
 
114
    virtual void writeNode(const Node *nodeArg);
 
115
 
 
116
    
 
117
 
 
118
 
 
119
};
 
120
 
 
121
 
 
122
 
 
123
 
 
124
 
 
125
/*#########################################################################
 
126
## SVGDOMImplementationLSImpl
 
127
#########################################################################*/
 
128
 
 
129
/**
 
130
 *
 
131
 */
 
132
class SVGDOMImplementationLSImpl : virtual public DOMImplementationLS
 
133
{
 
134
public:
 
135
 
 
136
    /**
 
137
     *
 
138
     */
 
139
    virtual LSParser &createLSParser(unsigned short mode,
 
140
                                     const DOMString &schemaType)
 
141
                                     throw (dom::DOMException)
 
142
        {
 
143
        SVGLSParserImpl newParser;
 
144
        parser = newParser;
 
145
        return parser;
 
146
        }
 
147
 
 
148
 
 
149
    /**
 
150
     *
 
151
     */
 
152
    virtual LSSerializer &createLSSerializer()
 
153
        {
 
154
        SVGLSSerializerImpl newSerializer;
 
155
        serializer = newSerializer;
 
156
        return serializer;
 
157
        }
 
158
 
 
159
 
 
160
    /**
 
161
     *
 
162
     */
 
163
    virtual LSInput createLSInput()
 
164
        {
 
165
        LSInput input;
 
166
        return input;
 
167
        }
 
168
 
 
169
    /**
 
170
     *
 
171
     */
 
172
    virtual LSOutput createLSOutput()
 
173
        {
 
174
        LSOutput output;
 
175
        return output;
 
176
        }
 
177
 
 
178
    //##################
 
179
    //# Non-API methods
 
180
    //##################
 
181
 
 
182
    /**
 
183
     *
 
184
     */
 
185
    SVGDOMImplementationLSImpl() {}
 
186
 
 
187
    /**
 
188
     *
 
189
     */
 
190
    virtual ~SVGDOMImplementationLSImpl() {}
 
191
 
 
192
protected:
 
193
 
 
194
    SVGLSParserImpl     parser;
 
195
    SVGLSSerializerImpl serializer;
 
196
};
 
197
 
 
198
 
 
199
 
 
200
 
 
201
 
 
202
 
 
203
 
 
204
}  //namespace ls
 
205
}  //namespace dom
 
206
}  //namespace w3c
 
207
}  //namespace org
 
208
 
 
209
 
 
210
 
 
211
 
 
212
#endif   /* __SVGLSIMPL_H__ */
 
213
 
 
214
/*#########################################################################
 
215
## E N D    O F    F I L E
 
216
#########################################################################*/
 
217