2002-06-21 13:16:28 +02:00
|
|
|
#ifndef JEZUK_SimpleDOM_COMMENTIMPL_H
|
|
|
|
#define JEZUK_SimpleDOM_COMMENTIMPL_H
|
|
|
|
|
2007-09-05 00:55:47 +02:00
|
|
|
#include <DOM/Comment.hpp>
|
|
|
|
#include <DOM/Simple/CharacterDataImpl.hpp>
|
2002-06-21 13:16:28 +02:00
|
|
|
|
2007-09-05 13:47:13 +02:00
|
|
|
namespace Arabica
|
|
|
|
{
|
2002-06-21 13:16:28 +02:00
|
|
|
namespace SimpleDOM
|
|
|
|
{
|
|
|
|
|
|
|
|
template<class stringT, class string_adaptorT>
|
2007-09-08 01:52:30 +02:00
|
|
|
class CommentImpl : public DOM::Comment_impl<stringT, string_adaptorT>,
|
2002-06-21 13:16:28 +02:00
|
|
|
public CharacterDataImpl<stringT, string_adaptorT>
|
|
|
|
{
|
2004-09-18 01:17:51 +02:00
|
|
|
typedef CharacterDataImpl<stringT, string_adaptorT> CharDataT;
|
2002-06-21 13:16:28 +02:00
|
|
|
public:
|
|
|
|
CommentImpl(DocumentImpl<stringT, string_adaptorT>* ownerDoc, const stringT& data) :
|
|
|
|
CharacterDataImpl<stringT, string_adaptorT>(ownerDoc, data)
|
|
|
|
{
|
|
|
|
} // CommentImpl
|
|
|
|
|
|
|
|
virtual ~CommentImpl() { }
|
|
|
|
|
|
|
|
///////////////////////////////////////////////////////
|
|
|
|
// DOM::Node methods
|
|
|
|
virtual DOM::Node_base::Type getNodeType() const
|
|
|
|
{
|
|
|
|
return DOM::Node_base::COMMENT_NODE;
|
|
|
|
} // getNodeType
|
|
|
|
|
2007-09-08 01:52:30 +02:00
|
|
|
virtual DOM::Node_impl<stringT, string_adaptorT>* cloneNode(bool deep) const
|
2002-06-21 13:16:28 +02:00
|
|
|
{
|
2004-09-18 01:17:51 +02:00
|
|
|
return CharDataT::ownerDoc_->createComment(CharDataT::getData());
|
2002-06-21 13:16:28 +02:00
|
|
|
} // cloneNode
|
|
|
|
|
2005-12-09 15:09:32 +01:00
|
|
|
virtual const stringT& getNodeName() const
|
2002-06-21 13:16:28 +02:00
|
|
|
{
|
2005-12-09 15:09:32 +01:00
|
|
|
static const stringT comment = string_adaptorT::construct_from_utf8("#comment");
|
|
|
|
return comment;
|
2002-06-21 13:16:28 +02:00
|
|
|
} // getNodeName
|
|
|
|
}; // class CommentImpl
|
|
|
|
|
|
|
|
} // namespace SAX2DOM
|
2007-09-05 13:47:13 +02:00
|
|
|
} // namespace Arabica
|
2002-06-21 13:16:28 +02:00
|
|
|
|
|
|
|
#endif
|
|
|
|
|