#ifndef JEZUK_DOM_NOTATION_H #define JEZUK_DOM_NOTATION_H //////////////////////////// // C++ DOM definition // // $Id$ //////////////////////////// #include #include namespace Arabica { namespace DOM { template class Notation_impl; template > class Notation : public Node { public: typedef Node NodeT; typedef Notation_impl Notation_implT; Notation() : NodeT() { } explicit Notation(Notation_implT* impl) : NodeT(nImpl()) { } Notation(const Notation& rhs) : NodeT(rhs) { } explicit Notation(const NodeT& rhs) : NodeT(rhs) { if(NodeT::impl_ == 0) // null nodes can always be cast return; if(rhs.getNodeType() != Node_base::NOTATION_NODE) throw DOMBadCast("Notation"); } stringT getPublicId() const { return nImpl()->getPublicId(); } stringT getSystemId() const { return nImpl()->getSystemId(); } private: Notation_implT* nImpl() const { return dynamic_cast(*NodeT::impl_); } }; // class Notation ////////////////////////////////////////////////////////// template class NamedNodeMap_impl; template class Notation_impl : virtual public Node_impl { public: virtual ~Notation_impl () { } ///////////////////////////////////////////// // DOM::Notation virtual stringT getPublicId() const = 0; virtual stringT getSystemId() const = 0; }; // class Notation_impl } // namespace DOM } // namespace Arabica #endif