#ifndef JEZUK_DOM_ENTITY_H #define JEZUK_DOM_ENTITY_H //////////////////////////// // C++ DOM definition // // $Id$ //////////////////////////// #include namespace DOM { template class Entity_impl; template class Entity : public Node { public: Entity() : Node() { } explicit Entity(Entity_impl* impl) : Node(impl) { } Entity(const Entity& rhs) : Node(rhs) { } explicit Entity(const Node& rhs) : Node(rhs) { if(rhs.getNodeType() != Node::Entity_NODE) throw std::bad_cast(); } stringT getPublicId() const { nImpl()->getPublicId(); } stringT getSystemId() const { nImpl()->getSystemId(); } stringT getNotationName() const { nImpl()->getNotationName(); } private: Entity_impl* nImpl() { return dynamic_cast*>(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 #endif