ANNA Suite  2020b
Multipurpose development suite for Telco applications
DTD.hpp
Go to the documentation of this file.
1 // ANNA - Anna is Not Nothingness Anymore //
2 // //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
4 // //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
7 
8 
9 #ifndef anna_xml_DTD_hpp
10 #define anna_xml_DTD_hpp
11 
12 struct _xmlDtd;
13 struct _xmlValidCtxt;
14 struct _xmlDoc;
15 
16 #include <anna/core/mt/Mutex.hpp>
18 
19 namespace anna {
20 
21 namespace xml {
22 
23 class Parser;
24 
56 class DTD {
57 public:
61  virtual ~DTD();
62 
68  void initialize(const char* content) noexcept(false);
69 
70 protected:
74  DTD() : a_handle(NULL) {;}
75 
76 private:
77  Mutex a_mutex;
78  _xmlDtd* a_handle;
79 
80  void validate(_xmlValidCtxt* context, _xmlDoc* document) const noexcept(false);
81  virtual _xmlDtd* parse(const char* content) const noexcept(false) = 0;
82 
83  friend class Parser;
84 };
85 
86 }
87 }
88 
89 #endif
void initialize(const char *content) noexcept(false)
DTD()
Definition: DTD.hpp:74
Definition: DTD.hpp:56
Definition: Parser.hpp:63
Definition: app.hpp:12
virtual ~DTD()
Definition: Mutex.hpp:41