Torc  0.1
torcxmlvalidator.h
Go to the documentation of this file.
1 #ifndef TORCXMLVALIDATOR_H
2 #define TORCXMLVALIDATOR_H
3 
4 // Qt
5 #include <QAbstractMessageHandler>
6 
7 class TorcXmlValidator : public QAbstractMessageHandler
8 {
9  public:
10  TorcXmlValidator(const QString &XmlFile, const QString &XSDFile, bool Silent = false);
11  TorcXmlValidator(const QString &XmlFile, const QByteArray &XSDData, bool Silent = false);
13 
14  bool Validated (void);
15 
16  protected:
17  void Validate (void);
18  void handleMessage (QtMsgType Type, const QString &Description,
19  const QUrl &Identifier, const QSourceLocation &SourceLocation);
20 
21  private:
22  QString m_xmlFile;
23  QString m_xsdFile;
24  QByteArray m_xsdData;
25  bool m_valid;
26  bool m_xsdDone;
27  bool m_silent;
28 };
29 
30 #endif // TORCXMLVALIDATOR_H
void handleMessage(QtMsgType Type, const QString &Description, const QUrl &Identifier, const QSourceLocation &SourceLocation)
~TorcXmlValidator()=default
bool Validated(void) const
TorcXmlValidator(const QString &XmlFile, const QString &XSDFile, bool Silent=false)