~ubuntu-branches/ubuntu/maverick/scribus-ng/maverick-backports

« back to all changes in this revision

Viewing changes to scribus/desaxe/saxio.h

  • Committer: Bazaar Package Importer
  • Author(s): Oleksandr Moskalenko
  • Date: 2007-08-11 17:41:51 UTC
  • mfrom: (0.1.1 upstream) (4.1.2 feisty)
  • Revision ID: james.westby@ubuntu.com-20070811174151-tmkgjvjuc0mtk8ul
Tags: 1.3.4.dfsg+svn20071115-1
* Upstream svn update (Closes: #447480, #448949).
* debian/NEWS: Added a note for users wanting stable Scribus to switch to
  the "scribus" package (Closes: #427638).
* debian/watch: Updated the watch regex to properly track sourceforge
  releases for this branch (Closes: #449700).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*
 
2
 *  saxio.h
 
3
 *  
 
4
 *
 
5
 *  Created by Andreas Vox on 21.09.06.
 
6
 *  Copyright 2006 under GPL2. All rights reserved.
 
7
 *
 
8
 */
 
9
 
 
10
 
 
11
 
 
12
#ifndef SAXIO_H
 
13
#define SAXIO_H
 
14
 
 
15
#include "desaxe_conf.h"
 
16
#include "saxhandler.h"
 
17
//#include "digester.h"
 
18
 
 
19
namespace desaxe {
 
20
class Digester;
 
21
}
 
22
 
 
23
/** Interface class for any object which wants to use deSaXe to load from 
 
24
    and save to XML.
 
25
 */
 
26
class SaxIO {
 
27
public:
 
28
        /**
 
29
            Writes an XML representation of this object
 
30
         */
 
31
        virtual void saxx(SaxHandler &, const Xml_string& /* elemtag */) const = 0;
 
32
        /**
 
33
            Writes an XML representation of this object using the default element tag, see below
 
34
         */
 
35
        virtual void saxx(SaxHandler & ) const = 0;
 
36
        virtual ~SaxIO() {}
 
37
        /**
 
38
                Element tag which is usually used to serialize this object. "" means no elem is created by saxx()
 
39
         */
 
40
        static const Xml_string saxxDefaultElem;
 
41
        /**
 
42
          Fills the digester with rules wich ensure that an object which was
 
43
          saved via saxx() will be reconstructed on top of the digester stack.
 
44
          The prefix pattern shall be used to create patterns which constrain
 
45
          the added rules to this context.
 
46
          Unfortunately there are no virtual static functions, so this is just a dummy
 
47
          serving as a template.
 
48
         */
 
49
        static void desaxeRules(const Xml_string& /* prefixPattern */, desaxe::Digester & /* ruleset */, const Xml_string /* elemtag */ = saxxDefaultElem) {}
 
50
};
 
51
 
 
52
#endif