ui-gxmlcpp 1.4.6
ValidatorTree.hpp
Go to the documentation of this file.
1
10#ifndef UI_GXML_VALIDATORTREE_HPP
11#define UI_GXML_VALIDATORTREE_HPP
12
13// STDC++
14#include <string>
15
16// C++ Libraries
17#include <ui-gxmlcpp/Tree.hpp>
18
19namespace UI {
20namespace GXML {
21
23class ValidatorTree: public Tree
24{
25public:
28 ValidatorTree(char const * xml, int len=-1, std::string const & base=DefaultDocbase_, int const options=0);
29 ValidatorTree(std::string const & xml, std::string const & base=DefaultDocbase_, int const options=0);
30 ValidatorTree(std::istream & xml, std::string const & base=DefaultDocbase_, int const options=0);
31 ValidatorTree(FileConstructor const dummy, std::string const & file, int const options=0);
34 virtual ~ValidatorTree();
35
36private:
39 ValidatorTree(ValidatorTree const & tree);
40 ValidatorTree & operator=(ValidatorTree const & tree);
43public:
46 {
47 Ctxt_=1,
48 Parse_,
49 ValidCtxt_,
50 Internal_,
51 TreeInvalid_
52 };
55
56private:
57 virtual int libxml2Validate(Tree const & tree) const = 0;
58
59public:
62 bool isValid(Tree const & tree) const;
63 Tree const & validate(Tree const & tree) const;
65};
66
67}}
68#endif
Adding code facility to Exception.
Definition Exception.hpp:35
XML tree.
Definition Tree.hpp:31
FileConstructor
Helper enum for constructor from file name.
Definition Tree.hpp:103
static std::string const DefaultDocbase_
Default document base. This is used for from-memory parsing if not specified otherwise.
Definition Tree.hpp:74
Common abstract base class for validator trees (XML Schema and RelaxNG).
Definition ValidatorTree.hpp:24
CodeException< ErrorCode > Exception
Exceptions for this class.
Definition ValidatorTree.hpp:54
ErrorCode
Error codes for exceptions.
Definition ValidatorTree.hpp:46
Namespace for all Schlund+Partner Code.
Definition Buffer.cpp:30