~valavanisalex/ubuntu/precise/inkscape/fix-943984

« back to all changes in this revision

Viewing changes to inkscape-0.47pre1/src/dom/ls.h

  • Committer: Bazaar Package Importer
  • Author(s): Bryce Harrington
  • Date: 2009-07-02 17:09:45 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20090702170945-nn6d6zswovbwju1t
Tags: 0.47~pre1-0ubuntu1
* New upstream release.
  - Don't constrain maximization on small resolution devices (pre0)
    (LP: #348842)
  - Fixes segfault on startup (pre0)
    (LP: #391149)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef __LS_H__
 
2
#define __LS_H__
 
3
/**
 
4
 * Phoebe DOM Implementation.
 
5
 *
 
6
 * This is a C++ approximation of the W3C DOM model, which follows
 
7
 * fairly closely the specifications in the various .idl files, copies of
 
8
 * which are provided for reference.  Most important is this one:
 
9
 *
 
10
 * http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/idl-definitions.html
 
11
 *
 
12
 * Authors:
 
13
 *   Bob Jamison
 
14
 *
 
15
 * Copyright (C) 2005 Bob Jamison
 
16
 *
 
17
 *  This library is free software; you can redistribute it and/or
 
18
 *  modify it under the terms of the GNU Lesser General Public
 
19
 *  License as published by the Free Software Foundation; either
 
20
 *  version 2.1 of the License, or (at your option) any later version.
 
21
 *
 
22
 *  This library is distributed in the hope that it will be useful,
 
23
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
24
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
25
 *  Lesser General Public License for more details.
 
26
 *
 
27
 *  You should have received a copy of the GNU Lesser General Public
 
28
 *  License along with this library; if not, write to the Free Software
 
29
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
30
 */
 
31
 
 
32
 
 
33
#include "dom.h"
 
34
#include "events.h"
 
35
#include "traversal.h"
 
36
 
 
37
#include "io/domstream.h"
 
38
 
 
39
namespace org
 
40
{
 
41
namespace w3c
 
42
{
 
43
namespace dom
 
44
{
 
45
namespace ls
 
46
{
 
47
 
 
48
 
 
49
 
 
50
//Local definitions
 
51
//The idl said Object.  Since this is undefined, we will
 
52
//use our own class which is designed to be a bit similar to
 
53
//java.io streams
 
54
 
 
55
typedef dom::io::InputStream  LSInputStream;
 
56
typedef dom::io::OutputStream LSOutputStream;
 
57
typedef dom::io::Reader       LSReader;
 
58
typedef dom::io::Writer       LSWriter;
 
59
 
 
60
 
 
61
//local definitions
 
62
typedef dom::DOMString DOMString;
 
63
typedef dom::DOMConfiguration DOMConfiguration;
 
64
typedef dom::Node Node;
 
65
typedef dom::NodePtr NodePtr;
 
66
typedef dom::Document Document;
 
67
typedef dom::DocumentPtr DocumentPtr;
 
68
typedef dom::Element Element;
 
69
typedef dom::ElementPtr ElementPtr;
 
70
 
 
71
 
 
72
//forward declarations
 
73
class LSParser;
 
74
class LSSerializer;
 
75
class LSInput;
 
76
class LSOutput;
 
77
class LSParserFilter;
 
78
class LSSerializerFilter;
 
79
 
 
80
 
 
81
 
 
82
/*#########################################################################
 
83
## LSException
 
84
#########################################################################*/
 
85
 
 
86
/**
 
87
 *  Maybe this should inherit from DOMException?
 
88
 */
 
89
class LSException
 
90
{
 
91
 
 
92
public:
 
93
 
 
94
    LSException(const DOMString &reasonMsg)
 
95
        { msg = reasonMsg; }
 
96
 
 
97
    LSException(short theCode)
 
98
        {
 
99
        code = theCode;
 
100
        }
 
101
 
 
102
    virtual ~LSException() throw()
 
103
       {}
 
104
 
 
105
    /**
 
106
     *
 
107
     */
 
108
    unsigned short code;
 
109
 
 
110
    /**
 
111
     *
 
112
     */
 
113
    DOMString msg;
 
114
 
 
115
    /**
 
116
     * Get a string, translated from the code.
 
117
     * Like std::exception. Not in spec.
 
118
     */
 
119
    const char *what()
 
120
        { return msg.c_str(); }
 
121
 
 
122
 
 
123
 
 
124
};
 
125
 
 
126
 
 
127
/**
 
128
 * LSExceptionCode
 
129
 */
 
130
typedef enum
 
131
    {
 
132
    PARSE_ERR                      = 81,
 
133
    SERIALIZE_ERR                  = 82
 
134
    } XPathExceptionCode;
 
135
 
 
136
 
 
137
/*#########################################################################
 
138
## LSParserFilter
 
139
#########################################################################*/
 
140
 
 
141
/**
 
142
 *
 
143
 */
 
144
class LSParserFilter
 
145
{
 
146
public:
 
147
 
 
148
    // Constants returned by startElement and acceptNode
 
149
    typedef enum
 
150
        {
 
151
        FILTER_ACCEPT                  = 1,
 
152
        FILTER_REJECT                  = 2,
 
153
        FILTER_SKIP                    = 3,
 
154
        FILTER_INTERRUPT               = 4
 
155
        } ReturnValues;
 
156
 
 
157
 
 
158
    /**
 
159
     *
 
160
     */
 
161
    virtual unsigned short startElement(const ElementPtr elementArg) =0;
 
162
 
 
163
    /**
 
164
     *
 
165
     */
 
166
    virtual unsigned short acceptNode(const NodePtr nodeArg) =0;
 
167
 
 
168
    /**
 
169
     *
 
170
     */
 
171
    virtual unsigned long getWhatToShow() =0;
 
172
 
 
173
    //##################
 
174
    //# Non-API methods
 
175
    //##################
 
176
 
 
177
    /**
 
178
     *
 
179
     */
 
180
    virtual ~LSParserFilter() {}
 
181
 
 
182
 
 
183
 
 
184
};
 
185
 
 
186
/*#########################################################################
 
187
## LSInput
 
188
#########################################################################*/
 
189
 
 
190
/**
 
191
 *
 
192
 */
 
193
class LSInput
 
194
{
 
195
public:
 
196
 
 
197
    /**
 
198
     *
 
199
     */
 
200
    virtual LSReader *getCharacterStream() const
 
201
        { return characterStream; }
 
202
 
 
203
    /**
 
204
     *
 
205
     */
 
206
    virtual void setCharacterStream(const LSReader *val)
 
207
        { characterStream = (LSReader *)val; }
 
208
 
 
209
    /**
 
210
     *
 
211
     */
 
212
    virtual LSInputStream *getByteStream() const
 
213
        { return byteStream; }
 
214
 
 
215
    /**
 
216
     *
 
217
     */
 
218
    virtual void setByteStream(const LSInputStream *val)
 
219
        { byteStream =  (LSInputStream *)val; }
 
220
 
 
221
    /**
 
222
     *
 
223
     */
 
224
    virtual DOMString getStringData() const
 
225
        { return stringData; }
 
226
 
 
227
    /**
 
228
     *
 
229
     */
 
230
    virtual void setStringData(const DOMString &val)
 
231
        { stringData = val; }
 
232
 
 
233
    /**
 
234
     *
 
235
     */
 
236
    virtual DOMString getSystemId() const
 
237
        { return systemId; }
 
238
 
 
239
    /**
 
240
     *
 
241
     */
 
242
    virtual void setSystemId(const DOMString &val)
 
243
        { systemId = val; }
 
244
 
 
245
    /**
 
246
     *
 
247
     */
 
248
    virtual DOMString getPublicId() const
 
249
        { return publicId; }
 
250
 
 
251
    /**
 
252
     *
 
253
     */
 
254
    virtual void setPublicId(const DOMString &val)
 
255
        { publicId = val; }
 
256
 
 
257
    /**
 
258
     *
 
259
     */
 
260
    virtual DOMString getBaseURI() const
 
261
        { return baseURI; }
 
262
 
 
263
    /**
 
264
     *
 
265
     */
 
266
    virtual void setBaseURI(const DOMString &val)
 
267
        { baseURI = val; }
 
268
 
 
269
    /**
 
270
     *
 
271
     */
 
272
    virtual DOMString getEncoding() const
 
273
        { return encoding; }
 
274
 
 
275
    /**
 
276
     *
 
277
     */
 
278
    virtual void setEncoding(const DOMString &val)
 
279
        { encoding = val; }
 
280
 
 
281
    /**
 
282
     *
 
283
     */
 
284
    virtual bool getCertifiedText() const
 
285
        { return certifiedText; }
 
286
 
 
287
    /**
 
288
     *
 
289
     */
 
290
    virtual void setCertifiedText(bool val)
 
291
        { certifiedText = val; }
 
292
 
 
293
    //##################
 
294
    //# Non-API methods
 
295
    //##################
 
296
 
 
297
 
 
298
    /**
 
299
     *
 
300
     */
 
301
    LSInput()
 
302
        {
 
303
        characterStream = NULL;
 
304
        byteStream      = NULL;
 
305
        stringData      = "";
 
306
        systemId        = "";
 
307
        publicId        = "";
 
308
        baseURI         = "";
 
309
        encoding        = "";
 
310
        certifiedText   = false;
 
311
        }
 
312
 
 
313
 
 
314
 
 
315
    /**
 
316
     *
 
317
     */
 
318
    LSInput(const LSInput &other)
 
319
        {
 
320
        characterStream = other.characterStream;
 
321
        byteStream      = other.byteStream;
 
322
        stringData      = other.stringData;
 
323
        systemId        = other.systemId;
 
324
        publicId        = other.publicId;
 
325
        baseURI         = other.baseURI;
 
326
        encoding        = other.encoding;
 
327
        certifiedText   = other.certifiedText;
 
328
        }
 
329
 
 
330
    /**
 
331
     *
 
332
     */
 
333
    virtual ~LSInput()
 
334
        {}
 
335
 
 
336
private:
 
337
 
 
338
    LSReader      *characterStream;
 
339
    LSInputStream *byteStream;
 
340
    DOMString     stringData;
 
341
    DOMString     systemId;
 
342
    DOMString     publicId;
 
343
    DOMString     baseURI;
 
344
    DOMString     encoding;
 
345
    bool          certifiedText;
 
346
 
 
347
 
 
348
};
 
349
 
 
350
 
 
351
/*#########################################################################
 
352
## LSParser
 
353
#########################################################################*/
 
354
 
 
355
/**
 
356
 *
 
357
 */
 
358
class LSParser
 
359
{
 
360
public:
 
361
 
 
362
 
 
363
    /**
 
364
     *
 
365
     */
 
366
    virtual DOMConfiguration *getDomConfig()
 
367
        { return NULL; }
 
368
 
 
369
    /**
 
370
     *
 
371
     */
 
372
    virtual LSParserFilter *getFilter()
 
373
        { return filter; }
 
374
 
 
375
    /**
 
376
     *
 
377
     */
 
378
    virtual void setFilter(const LSParserFilter *val)
 
379
        { filter = (LSParserFilter *)val; }
 
380
 
 
381
    /**
 
382
     *
 
383
     */
 
384
    virtual bool getAsync()
 
385
        { return false; }
 
386
 
 
387
    /**
 
388
     *
 
389
     */
 
390
    virtual bool getBusy()
 
391
        { return false; }
 
392
 
 
393
    /**
 
394
     *
 
395
     */
 
396
    virtual DocumentPtr parse(const LSInput &/*input*/)
 
397
                              throw(dom::DOMException, LSException)
 
398
        { return NULL; }
 
399
 
 
400
 
 
401
    /**
 
402
     *
 
403
     */
 
404
    virtual DocumentPtr parseURI(const DOMString &/*uri*/)
 
405
                                 throw(dom::DOMException, LSException)
 
406
        { return NULL; }
 
407
 
 
408
    typedef enum
 
409
        {
 
410
        ACTION_APPEND_AS_CHILDREN      = 1,
 
411
        ACTION_REPLACE_CHILDREN        = 2,
 
412
        ACTION_INSERT_BEFORE           = 3,
 
413
        ACTION_INSERT_AFTER            = 4,
 
414
        ACTION_REPLACE                 = 5
 
415
        } ActionTypes;
 
416
 
 
417
 
 
418
    /**
 
419
     *
 
420
     */
 
421
    virtual NodePtr parseWithContext(const LSInput &/*input*/,
 
422
                                     const NodePtr /*contextArg*/,
 
423
                                     unsigned short /*action*/)
 
424
                                     throw(dom::DOMException, LSException)
 
425
        { return NULL; }
 
426
 
 
427
    /**
 
428
     *
 
429
     */
 
430
    virtual void abort()
 
431
        {}
 
432
 
 
433
 
 
434
 
 
435
    //##################
 
436
    //# Non-API methods
 
437
    //##################
 
438
 
 
439
    /**
 
440
     *
 
441
     */
 
442
    LSParser()
 
443
        {
 
444
        filter = NULL;
 
445
        }
 
446
 
 
447
    /**
 
448
     *
 
449
     */
 
450
    LSParser(const LSParser &other)
 
451
        {
 
452
        filter = other.filter;
 
453
        }
 
454
 
 
455
    /**
 
456
     *
 
457
     */
 
458
    virtual ~LSParser() {}
 
459
 
 
460
protected:
 
461
 
 
462
    LSParserFilter *filter;
 
463
};
 
464
 
 
465
 
 
466
 
 
467
/*#########################################################################
 
468
## LSResourceResolver
 
469
#########################################################################*/
 
470
 
 
471
/**
 
472
 *
 
473
 */
 
474
class LSResourceResolver
 
475
{
 
476
public:
 
477
 
 
478
    /**
 
479
     *
 
480
     */
 
481
    virtual LSInput resolveResource(const DOMString &/*type*/,
 
482
                                    const DOMString &/*namespaceURI*/,
 
483
                                    const DOMString &/*publicId*/,
 
484
                                    const DOMString &/*systemId*/,
 
485
                                    const DOMString &/*baseURI*/)
 
486
        {
 
487
        LSInput input;
 
488
        //do something
 
489
        return input;
 
490
        }
 
491
 
 
492
    //##################
 
493
    //# Non-API methods
 
494
    //##################
 
495
 
 
496
    /**
 
497
     *
 
498
     */
 
499
    LSResourceResolver() {}
 
500
 
 
501
    /**
 
502
     *
 
503
     */
 
504
    LSResourceResolver(const LSResourceResolver &/*other*/)
 
505
        {
 
506
        }
 
507
 
 
508
    /**
 
509
     *
 
510
     */
 
511
    virtual ~LSResourceResolver() {}
 
512
 
 
513
 
 
514
 
 
515
};
 
516
 
 
517
/*#########################################################################
 
518
## LSOutput
 
519
#########################################################################*/
 
520
 
 
521
/**
 
522
 *
 
523
 */
 
524
class LSOutput
 
525
{
 
526
public:
 
527
 
 
528
    /**
 
529
     *
 
530
     */
 
531
    virtual LSWriter *getCharacterStream() const
 
532
        { return characterStream; }
 
533
 
 
534
    /**
 
535
     *
 
536
     */
 
537
    virtual void setCharacterStream(const LSWriter *val)
 
538
        { characterStream = (LSWriter *)val; }
 
539
 
 
540
    /**
 
541
     *
 
542
     */
 
543
    virtual LSOutputStream *getByteStream() const
 
544
        { return byteStream; }
 
545
 
 
546
    /**
 
547
     *
 
548
     */
 
549
    virtual void setByteStream(const LSOutputStream *val)
 
550
        { byteStream = (LSOutputStream *) val; }
 
551
 
 
552
    /**
 
553
     *
 
554
     */
 
555
    virtual DOMString getSystemId() const
 
556
        { return systemId; }
 
557
 
 
558
    /**
 
559
     *
 
560
     */
 
561
    virtual void setSystemId(const DOMString &val)
 
562
        { systemId = val; }
 
563
 
 
564
    /**
 
565
     *
 
566
     */
 
567
    virtual DOMString getEncoding() const
 
568
        { return encoding; }
 
569
 
 
570
    /**
 
571
     *
 
572
     */
 
573
    virtual void setEncoding(const DOMString &val)
 
574
        { encoding = val; }
 
575
 
 
576
 
 
577
    //##################
 
578
    //# Non-API methods
 
579
    //##################
 
580
 
 
581
    /**
 
582
     *
 
583
     */
 
584
    LSOutput()
 
585
        {
 
586
        characterStream = NULL;
 
587
        byteStream      = NULL;
 
588
        systemId        = "";
 
589
        encoding        = "";
 
590
        }
 
591
 
 
592
 
 
593
    /**
 
594
     *
 
595
     */
 
596
    LSOutput(const LSOutput &other)
 
597
        {
 
598
        characterStream = other.characterStream;
 
599
        byteStream      = other.byteStream;
 
600
        systemId        = other.systemId;
 
601
        encoding        = other.encoding;
 
602
        }
 
603
 
 
604
    /**
 
605
     *
 
606
     */
 
607
    virtual ~LSOutput()
 
608
        {}
 
609
 
 
610
private:
 
611
 
 
612
    LSWriter       *characterStream;
 
613
    LSOutputStream *byteStream;
 
614
    DOMString      systemId;
 
615
    DOMString      encoding;
 
616
 
 
617
};
 
618
 
 
619
 
 
620
/*#########################################################################
 
621
## LSSerializer
 
622
#########################################################################*/
 
623
 
 
624
/**
 
625
 *
 
626
 */
 
627
class LSSerializer
 
628
{
 
629
public:
 
630
 
 
631
    /**
 
632
     *
 
633
     */
 
634
    virtual DOMConfiguration *getDomConfig()
 
635
        { return NULL; }
 
636
 
 
637
    /**
 
638
     *
 
639
     */
 
640
    virtual DOMString getNewLine()
 
641
        { return newLine; }
 
642
    /**
 
643
     *
 
644
     */
 
645
    virtual void setNewLine(const DOMString &val)
 
646
        { newLine = val; }
 
647
 
 
648
    /**
 
649
     *
 
650
     */
 
651
    virtual LSSerializerFilter *getFilter()
 
652
        { return filter; }
 
653
 
 
654
    /**
 
655
     *
 
656
     */
 
657
    virtual void setFilter(const LSSerializerFilter *val)
 
658
        { filter = (LSSerializerFilter *)val; }
 
659
 
 
660
    /**
 
661
     *
 
662
     */
 
663
    virtual bool write(const NodePtr /*nodeArg*/,
 
664
                       const LSOutput &/*destination*/)
 
665
                       throw (LSException)
 
666
        { return false; }
 
667
 
 
668
    /**
 
669
     *
 
670
     */
 
671
    virtual bool writeToURI(const NodePtr /*nodeArg*/,
 
672
                            const DOMString &/*uri*/)
 
673
                            throw(LSException)
 
674
        { return false; }
 
675
 
 
676
    /**
 
677
     *
 
678
     */
 
679
    virtual DOMString writeToString(const NodePtr /*nodeArg*/)
 
680
                                    throw(dom::DOMException, LSException)
 
681
        {
 
682
        DOMString str;
 
683
        return str;
 
684
        }
 
685
 
 
686
    //##################
 
687
    //# Non-API methods
 
688
    //##################
 
689
 
 
690
    /**
 
691
     *
 
692
     */
 
693
    LSSerializer()
 
694
       {
 
695
       filter  = NULL;
 
696
       newLine = "\n";
 
697
       }
 
698
 
 
699
    /**
 
700
     *
 
701
     */
 
702
    LSSerializer(const LSSerializer &other)
 
703
       {
 
704
       filter  = other.filter;
 
705
       newLine = other.newLine;
 
706
       }
 
707
 
 
708
    /**
 
709
     *
 
710
     */
 
711
    virtual ~LSSerializer() {}
 
712
 
 
713
protected:
 
714
 
 
715
    LSSerializerFilter *filter;
 
716
    DOMString newLine;
 
717
 
 
718
};
 
719
 
 
720
/*#########################################################################
 
721
## LSProgressEvent
 
722
#########################################################################*/
 
723
 
 
724
/**
 
725
 *
 
726
 */
 
727
class LSProgressEvent : virtual public events::Event
 
728
{
 
729
public:
 
730
 
 
731
    /**
 
732
     *
 
733
     */
 
734
    virtual LSInput &getInput()
 
735
        {
 
736
        return input;
 
737
        }
 
738
 
 
739
    /**
 
740
     *
 
741
     */
 
742
    virtual unsigned long getPosition()
 
743
        { return position; }
 
744
 
 
745
    /**
 
746
     *
 
747
     */
 
748
    virtual unsigned long getTotalSize()
 
749
        { return totalSize; }
 
750
 
 
751
    //##################
 
752
    //# Non-API methods
 
753
    //##################
 
754
 
 
755
    /**
 
756
     *
 
757
     */
 
758
    LSProgressEvent(const LSInput &inputArg, unsigned long positionArg,
 
759
                    unsigned long totalSizeArg) : input((LSInput &)inputArg)
 
760
        {
 
761
        position  = positionArg;
 
762
        totalSize = totalSizeArg;
 
763
        }
 
764
 
 
765
 
 
766
    /**
 
767
     *
 
768
     */
 
769
    LSProgressEvent(const LSProgressEvent &other)
 
770
                : events::Event(other) , input(other.input)
 
771
        {
 
772
        position  = other.position;
 
773
        totalSize = other.totalSize;
 
774
        }
 
775
 
 
776
 
 
777
    /**
 
778
     *
 
779
     */
 
780
    virtual ~LSProgressEvent() {}
 
781
 
 
782
protected:
 
783
 
 
784
    LSInput &input;
 
785
    unsigned long position;
 
786
    unsigned long totalSize;
 
787
 
 
788
};
 
789
 
 
790
/*#########################################################################
 
791
## LSLoadEvent
 
792
#########################################################################*/
 
793
 
 
794
/**
 
795
 *
 
796
 */
 
797
class LSLoadEvent : public events::Event
 
798
{
 
799
public:
 
800
 
 
801
    /**
 
802
     *
 
803
     */
 
804
    virtual DocumentPtr getNewDocument()
 
805
        { return newDocument; }
 
806
 
 
807
    /**
 
808
     *
 
809
     */
 
810
    virtual LSInput &getInput()
 
811
        { return input; }
 
812
 
 
813
    //##################
 
814
    //# Non-API methods
 
815
    //##################
 
816
 
 
817
    /**
 
818
     *
 
819
     */
 
820
    LSLoadEvent(const LSInput &inputArg,
 
821
                    const DocumentPtr docArg)
 
822
                  : input((LSInput &)inputArg)
 
823
        { newDocument = docArg; }
 
824
 
 
825
    /**
 
826
     *
 
827
     */
 
828
    LSLoadEvent(const LSLoadEvent &other) 
 
829
               : events::Event(other) , input(other.input)
 
830
        {
 
831
        newDocument = other.newDocument;
 
832
        }
 
833
 
 
834
    /**
 
835
     *
 
836
     */
 
837
    virtual ~LSLoadEvent() {}
 
838
 
 
839
protected:
 
840
 
 
841
    DocumentPtr newDocument;
 
842
 
 
843
    LSInput &input;
 
844
 
 
845
 
 
846
};
 
847
 
 
848
 
 
849
 
 
850
/*#########################################################################
 
851
## LSSerializerFilter
 
852
#########################################################################*/
 
853
 
 
854
/**
 
855
 *
 
856
 */
 
857
class LSSerializerFilter : virtual public traversal::NodeFilter
 
858
{
 
859
public:
 
860
 
 
861
    /**
 
862
     *
 
863
     */
 
864
    virtual unsigned long  getWhatToShow() =0;
 
865
 
 
866
    //##################
 
867
    //# Non-API methods
 
868
    //##################
 
869
 
 
870
    /**
 
871
     *
 
872
     */
 
873
    virtual ~LSSerializerFilter() {}
 
874
};
 
875
 
 
876
 
 
877
 
 
878
 
 
879
/*#########################################################################
 
880
## DOMImplementationLS
 
881
#########################################################################*/
 
882
 
 
883
/**
 
884
 *
 
885
 */
 
886
class DOMImplementationLS
 
887
{
 
888
public:
 
889
 
 
890
    typedef enum
 
891
        {
 
892
        MODE_SYNCHRONOUS               = 1,
 
893
        MODE_ASYNCHRONOUS              = 2
 
894
        } DOMImplementationLSMode;
 
895
 
 
896
    /**
 
897
     * To use, for this and subclasses:
 
898
     *  LSParser &parser = myImplementation.createLSParser(mode, schemaType);
 
899
     */
 
900
    virtual LSParser &createLSParser(unsigned short mode,
 
901
                                    const DOMString &schemaType)
 
902
                                    throw (dom::DOMException) =0;
 
903
 
 
904
    /**
 
905
     * To use, for this and subclasses:
 
906
     *  LSSerializer &serializer = myImplementation.createLSSerializer();
 
907
     *
 
908
     */
 
909
    virtual LSSerializer &createLSSerializer() =0;
 
910
 
 
911
    /**
 
912
     *
 
913
     */
 
914
    virtual LSInput createLSInput() =0;
 
915
 
 
916
    /**
 
917
     *
 
918
     */
 
919
    virtual LSOutput createLSOutput() =0;
 
920
 
 
921
    //##################
 
922
    //# Non-API methods
 
923
    //##################
 
924
 
 
925
    /**
 
926
     *
 
927
     */
 
928
    virtual ~DOMImplementationLS() {}
 
929
};
 
930
 
 
931
 
 
932
 
 
933
 
 
934
}  //namespace ls
 
935
}  //namespace dom
 
936
}  //namespace w3c
 
937
}  //namespace org
 
938
 
 
939
 
 
940
#endif // __LS_H__
 
941
 
 
942
/*#########################################################################
 
943
## E N D    O F    F I L E
 
944
#########################################################################*/
 
945