Comment.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //
  2. // Comment.h
  3. //
  4. // Library: XML
  5. // Package: DOM
  6. // Module: DOM
  7. //
  8. // Definition of the DOM Comment 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_Comment_INCLUDED
  16. #define DOM_Comment_INCLUDED
  17. #include "Poco/XML/XML.h"
  18. #include "Poco/DOM/CharacterData.h"
  19. #include "Poco/XML/XMLString.h"
  20. namespace Poco {
  21. namespace XML {
  22. class XML_API Comment: public CharacterData
  23. /// This interface inherits from CharacterData and represents the content of
  24. /// a comment, i.e., all the characters between the starting '<!--' and ending
  25. /// '-->'. Note that this is the definition of a comment in XML, and, in practice,
  26. /// HTML, although some HTML tools may implement the full SGML comment structure.
  27. {
  28. public:
  29. // Node
  30. const XMLString& nodeName() const;
  31. unsigned short nodeType() const;
  32. protected:
  33. Comment(Document* pOwnerDocument, const XMLString& data);
  34. Comment(Document* pOwnerDocument, const Comment& comment);
  35. ~Comment();
  36. Node* copyNode(bool deep, Document* pOwnerDocument) const;
  37. private:
  38. static const XMLString NODE_NAME;
  39. friend class Document;
  40. };
  41. } } // namespace Poco::XML
  42. #endif // DOM_Comment_INCLUDED