1 /* -*- c-basic-offset: 4 indent-tabs-mode: nil -*- vi:set ts=8 sts=4 sw=4: */
2 
3 /*
4     Rosegarden
5     A MIDI and audio sequencer and musical notation editor.
6     Copyright 2000-2021 the Rosegarden development team.
7 
8     Other copyrights also apply to some parts of this work.  Please
9     see the AUTHORS file and individual file headers for details.
10 
11     This program is free software; you can redistribute it and/or
12     modify it under the terms of the GNU General Public License as
13     published by the Free Software Foundation; either version 2 of the
14     License, or (at your option) any later version.  See the file
15     COPYING included with this distribution for more information.
16 */
17 
18 #ifndef RG_XMLSUBHANDLER_H
19 #define RG_XMLSUBHANDLER_H
20 
21 #include <QString>
22 
23 class QXmlStreamAttributes;
24 
25 namespace Rosegarden {
26 
27 class XmlSubHandler
28 {
29 public:
30     XmlSubHandler();
31     virtual ~XmlSubHandler();
32 
33     virtual bool startElement(const QString& namespaceURI,
34                               const QString& localName,
35                               const QString& qName,
36                               const QXmlStreamAttributes& atts) = 0;
37 
38     /**
39      * @param finished : if set to true on return, means that
40      * the handler should be deleted
41      */
42     virtual bool endElement(const QString& namespaceURI,
43                             const QString& localName,
44                             const QString& qName,
45                             bool& finished) = 0;
46 
47     virtual bool characters(const QString& ch) = 0;
48 };
49 
50 }
51 
52 #endif /*RG_XMLSUBHANDLER_H*/
53