home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / desaxe / saxhandler.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-04-04  |  796 b   |  38 lines

  1. /*
  2.  *  saxhandler.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 SAXHANDLER_H
  13. #define SAXHANDLER_H
  14.  
  15. #include "desaxe_conf.h"
  16.  
  17. /**
  18.   Interface class which describes the ability of reading a SAX stream.
  19.   Methods for handling namespaces and encodings might be added later.
  20.  */
  21. class SaxHandler {
  22. public:
  23.     virtual void beginDoc() = 0;
  24.     virtual void endDoc() = 0;
  25.     virtual void begin(const Xml_string& tag, Xml_attr attr) = 0;
  26.     virtual void end(const Xml_string& tag) = 0;
  27.     inline  void beginEnd(const Xml_string& tag, Xml_attr attr);
  28.     virtual void chars(const Xml_string& text) = 0;
  29.     virtual ~SaxHandler() {}
  30. };
  31.  
  32. inline  void SaxHandler::beginEnd(const Xml_string& tag, Xml_attr attr)
  33. {
  34.     begin(tag, attr);
  35.     end(tag);
  36. }
  37. #endif
  38.