DOMImplementation.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. //
  2. // DOMImplementation.h
  3. //
  4. // Library: XML
  5. // Package: DOM
  6. // Module: DOM
  7. //
  8. // Definition of the DOM DOMImplementation class.
  9. //
  10. // Copyright (c) 2004-2006, Applied Informatics Software Engineering GmbH.
  11. // and Contributors.
  12. //
  13. // SPDX-License-Identifier: BSL-1.0
  14. //
  15. #ifndef DOM_DOMImplementation_INCLUDED
  16. #define DOM_DOMImplementation_INCLUDED
  17. #include "Poco/XML/XML.h"
  18. #include "Poco/XML/XMLString.h"
  19. namespace Poco {
  20. namespace XML {
  21. class DocumentType;
  22. class Document;
  23. class NamePool;
  24. class XML_API DOMImplementation
  25. /// The DOMImplementation interface provides a number of methods for
  26. /// performing operations that are independent of any particular instance
  27. /// of the document object model.
  28. /// In this implementation, DOMImplementation is implemented as a singleton.
  29. {
  30. public:
  31. DOMImplementation();
  32. /// Creates the DOMImplementation.
  33. ~DOMImplementation();
  34. /// Destroys the DOMImplementation.
  35. bool hasFeature(const XMLString& feature, const XMLString& version) const;
  36. /// Tests if the DOM implementation implements a specific feature.
  37. ///
  38. /// The only supported features are "XML", version "1.0" and "Core",
  39. /// "Events", "MutationEvents" and "Traversal", version "2.0".
  40. // DOM Level 2
  41. DocumentType* createDocumentType(const XMLString& name, const XMLString& publicId, const XMLString& systemId) const;
  42. /// Creates an empty DocumentType node. Entity declarations and notations
  43. /// are not made available. Entity reference expansions and default attribute
  44. /// additions do not occur.
  45. Document* createDocument(const XMLString& namespaceURI, const XMLString& qualifiedName, DocumentType* doctype) const;
  46. /// Creates an XML Document object of the specified type with its document element.
  47. ///
  48. /// Note: You can also create a Document directly using the new operator.
  49. static const DOMImplementation& instance();
  50. /// Returns a reference to the default DOMImplementation
  51. /// object.
  52. private:
  53. static const XMLString FEATURE_XML;
  54. static const XMLString FEATURE_CORE;
  55. static const XMLString FEATURE_EVENTS;
  56. static const XMLString FEATURE_MUTATIONEVENTS;
  57. static const XMLString FEATURE_TRAVERSAL;
  58. static const XMLString VERSION_1_0;
  59. static const XMLString VERSION_2_0;
  60. };
  61. } } // namespace Poco::XML
  62. #endif // DOM_DOMImplementation_INCLUDED