2006-12-14 16:06:36 +01:00
|
|
|
#ifndef JEZUK_DOM_TRAVERSAL_DOCUMENT_TRAVERSAL_IMPL_H
|
|
|
|
#define JEZUK_DOM_TRAVERSAL_DOCUMENT_TRAVERSAL_IMPL_H
|
|
|
|
|
|
|
|
/////////////////////////////////////////
|
|
|
|
// C++ DOM Traversal Implementation
|
|
|
|
//
|
|
|
|
// $Id: TreeWalker.h 2 2002-06-21 11:16:28Z jez_higgins $
|
|
|
|
/////////////////////////////////////////
|
|
|
|
|
2007-09-05 00:55:47 +02:00
|
|
|
#include <DOM/Traversal/TreeWalkerImpl.hpp>
|
2006-12-14 16:06:36 +01:00
|
|
|
|
2007-09-05 13:47:13 +02:00
|
|
|
namespace Arabica
|
|
|
|
{
|
2006-12-14 16:06:36 +01:00
|
|
|
namespace DOM
|
|
|
|
{
|
|
|
|
namespace Traversal
|
|
|
|
{
|
|
|
|
|
|
|
|
|
2007-09-08 00:03:27 +02:00
|
|
|
template<class stringT, class string_adaptorT>
|
|
|
|
class DocumentTraversalImpl : public DocumentTraversal_impl<stringT, string_adaptorT>
|
2006-12-14 16:06:36 +01:00
|
|
|
{
|
|
|
|
public:
|
2007-09-08 00:03:27 +02:00
|
|
|
typedef DOM::Node<stringT, string_adaptorT> NodeT;
|
|
|
|
typedef NodeFilter<stringT, string_adaptorT> NodeFilterT;
|
|
|
|
typedef NodeIterator_impl<stringT, string_adaptorT> NodeIterator_implT;
|
|
|
|
typedef TreeWalker_impl<stringT, string_adaptorT> TreeWalker_implT;
|
|
|
|
typedef TreeWalkerImpl<stringT, string_adaptorT> TreeWalkerImplT;
|
|
|
|
|
2006-12-14 16:06:36 +01:00
|
|
|
DocumentTraversalImpl() {}
|
|
|
|
|
2007-09-08 00:03:27 +02:00
|
|
|
virtual NodeIterator_implT* createNodeIterator(NodeT root,
|
|
|
|
unsigned long whatToShow,
|
|
|
|
NodeFilterT* filter,
|
|
|
|
bool entityRefExpansion)
|
2006-12-14 16:06:36 +01:00
|
|
|
{
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
2007-09-08 00:03:27 +02:00
|
|
|
virtual TreeWalker_implT* createTreeWalker(NodeT root,
|
|
|
|
unsigned long whatToShow,
|
|
|
|
NodeFilterT* filter,
|
|
|
|
bool entityRefExpansion)
|
2006-12-14 16:06:36 +01:00
|
|
|
{
|
2007-09-08 00:03:27 +02:00
|
|
|
return new TreeWalkerImplT(root, whatToShow, filter, entityRefExpansion);
|
2006-12-14 16:06:36 +01:00
|
|
|
}
|
|
|
|
}; // class DocumentTraversalImpl
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//todo: move to DOM::Document?
|
2007-09-08 00:03:27 +02:00
|
|
|
template<class stringT, class string_adaptorT>
|
|
|
|
DocumentTraversal<stringT, string_adaptorT> make_document_traversal_t()
|
2006-12-14 16:06:36 +01:00
|
|
|
{
|
2007-09-08 00:03:27 +02:00
|
|
|
DocumentTraversal<stringT, string_adaptorT> docTraversal(new DocumentTraversalImpl<stringT, string_adaptorT>());
|
2006-12-14 16:06:36 +01:00
|
|
|
return docTraversal;
|
|
|
|
}
|
|
|
|
|
|
|
|
} // namespace Traversal
|
|
|
|
} // namespace DOM
|
2007-09-05 13:47:13 +02:00
|
|
|
} // namespace Arabica
|
2006-12-14 16:06:36 +01:00
|
|
|
|
|
|
|
#endif //JEZUK_DOM_TRAVERSAL_DOCUMENT_TRAVERSAL_IMPL_H
|
|
|
|
// end of file
|