ValidatorTree.hpp
Go to the documentation of this file.
#ifndef UI_GXML_VALIDATORTREE_HPP
#define UI_GXML_VALIDATORTREE_HPP
// STDC++
#include <string>
// C++ Libraries
#include <ui-gxmlcpp/Tree.hpp>
namespace UI {
namespace GXML {
class ValidatorTree: public Tree
{
public:
ValidatorTree(char const * xml, int len=-1, std::string const & base=DefaultDocbase_, int const options=0);
ValidatorTree(std::string const & xml, std::string const & base=DefaultDocbase_, int const options=0);
ValidatorTree(std::istream & xml, std::string const & base=DefaultDocbase_, int const options=0);
ValidatorTree(FileConstructor const dummy, std::string const & file, int const options=0);
virtual ~ValidatorTree();
private:
ValidatorTree(ValidatorTree const & tree);
ValidatorTree & operator=(ValidatorTree const & tree);
public:
enum ErrorCode
{
Ctxt_=1,
Parse_,
ValidCtxt_,
Internal_,
TreeInvalid_
};
typedef CodeException<ErrorCode> Exception;
private:
virtual int libxml2Validate(Tree const & tree) const = 0;
public:
bool isValid(Tree const & tree) const;
Tree const & validate(Tree const & tree) const;
};
}}
#endif
Tree.hpp
UI::GXML::CodeException
Adding code facility to Exception.
Definition Exception.hpp:35
UI::GXML::Tree
XML tree.
Definition Tree.hpp:31
UI::GXML::Tree::FileConstructor
FileConstructor
Helper enum for constructor from file name.
Definition Tree.hpp:103
UI::GXML::Tree::DefaultDocbase_
static std::string const DefaultDocbase_
Default document base. This is used for from-memory parsing if not specified otherwise.
Definition Tree.hpp:74
UI::GXML::ValidatorTree
Common abstract base class for validator trees (XML Schema and RelaxNG).
Definition ValidatorTree.hpp:24
UI::GXML::ValidatorTree::Exception
CodeException< ErrorCode > Exception
Exceptions for this class.
Definition ValidatorTree.hpp:54
UI::GXML::ValidatorTree::ErrorCode
ErrorCode
Error codes for exceptions.
Definition ValidatorTree.hpp:46
UI
Namespace for all Schlund+Partner Code.
Definition Buffer.cpp:30