summaryrefslogtreecommitdiffstats
path: root/scribus/desaxe/saxhandler.h
blob: 31d34c83c82644e270e2d617056152df777d79c8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
 *  saxhandler.h
 *  
 *
 *  Created by Andreas Vox on 21.09.06.
 *  Copyright 2006 under GPL2. All rights reserved.
 *
 */



#ifndef SAXHANDLER_H
#define SAXHANDLER_H

#include "desaxe_conf.h"

/**
  Interface class which describes the ability of reading a SAX stream.
  Methods for handling namespaces and encodings might be added later.
 */
class SaxHandler {
public:
	virtual void beginDoc() = 0;
	virtual void endDoc() = 0;
	virtual void begin(const Xml_string& tag, Xml_attr attr) = 0;
	virtual void end(const Xml_string& tag) = 0;
	inline  void beginEnd(const Xml_string& tag, Xml_attr attr);
	virtual void chars(const Xml_string& text) = 0;
	virtual ~SaxHandler() {}
};

inline  void SaxHandler::beginEnd(const Xml_string& tag, Xml_attr attr)
{
	begin(tag, attr);
	end(tag);
}
#endif