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