/***************************************************************************
                            kde_TreeWalker.cpp -  description
                             -------------------
    begin                : Wed Feb  6 15:12:26 2002
    copyright            : (C) 2000-2001 Lost Highway Ltd. All rights reserved.
    email                : Lost_Highway@tipitina.demon.co.uk
    generated by         : duke@tipitina on Wed Feb  6 15:12:26 2002, using kalyptus 0.9.
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   This library is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU Library General Public License as       *
 *   published by the Free Software Foundation; either version 2 of the    *
 *   License, or (at your option) any later version.                       *
 *                                                                         *
 ***************************************************************************/

extern "C" {
#include "kde_TreeWalker.h"
}

#include <dom/dom2_traversal.h>

class TreeWalkerBridge : public DOM::TreeWalker
{
public:
	TreeWalkerBridge() : TreeWalker() {}
	TreeWalkerBridge(const TreeWalker& other) : TreeWalker(other) {}
	~TreeWalkerBridge() {}
};

kde_TreeWalker * kde_new_TreeWalker(){
	return (kde_TreeWalker *) new TreeWalkerBridge();
}
kde_TreeWalker * kde_new_TreeWalker1(kde_TreeWalker* other){
	return (kde_TreeWalker *) new TreeWalkerBridge((DOM::TreeWalker&)* (DOM::TreeWalker*)other);
}
void kde_del_TreeWalker( kde_TreeWalker* p ){
	delete (TreeWalkerBridge*) p;
}
kde_DOMNode* kde_TreeWalker_root( kde_TreeWalker* instPointer){
	return (kde_DOMNode*)new DOM::Node(((TreeWalkerBridge*)instPointer)->root());
}
unsigned long kde_TreeWalker_whatToShow( kde_TreeWalker* instPointer){
	return (unsigned long) ((TreeWalkerBridge*)instPointer)->whatToShow();
}
kde_NodeFilter* kde_TreeWalker_filter( kde_TreeWalker* instPointer){
	return (kde_NodeFilter*)new DOM::NodeFilter(((TreeWalkerBridge*)instPointer)->filter());
}
int kde_TreeWalker_expandEntityReferences( kde_TreeWalker* instPointer){
	return (int) ((TreeWalkerBridge*)instPointer)->expandEntityReferences();
}
kde_DOMNode* kde_TreeWalker_currentNode( kde_TreeWalker* instPointer){
	return (kde_DOMNode*)new DOM::Node(((TreeWalkerBridge*)instPointer)->currentNode());
}
void kde_TreeWalker_setCurrentNode( kde_TreeWalker* instPointer,kde_DOMNode* _currentNode){
	((TreeWalkerBridge*)instPointer)->setCurrentNode((DOM::Node)* (DOM::Node*)_currentNode);
	return;
}
kde_DOMNode* kde_TreeWalker_parentNode( kde_TreeWalker* instPointer){
	return (kde_DOMNode*)new DOM::Node(((TreeWalkerBridge*)instPointer)->parentNode());
}
kde_DOMNode* kde_TreeWalker_firstChild( kde_TreeWalker* instPointer){
	return (kde_DOMNode*)new DOM::Node(((TreeWalkerBridge*)instPointer)->firstChild());
}
kde_DOMNode* kde_TreeWalker_lastChild( kde_TreeWalker* instPointer){
	return (kde_DOMNode*)new DOM::Node(((TreeWalkerBridge*)instPointer)->lastChild());
}
kde_DOMNode* kde_TreeWalker_previousSibling( kde_TreeWalker* instPointer){
	return (kde_DOMNode*)new DOM::Node(((TreeWalkerBridge*)instPointer)->previousSibling());
}
kde_DOMNode* kde_TreeWalker_nextSibling( kde_TreeWalker* instPointer){
	return (kde_DOMNode*)new DOM::Node(((TreeWalkerBridge*)instPointer)->nextSibling());
}
kde_DOMNode* kde_TreeWalker_previousNode( kde_TreeWalker* instPointer){
	return (kde_DOMNode*)new DOM::Node(((TreeWalkerBridge*)instPointer)->previousNode());
}
kde_DOMNode* kde_TreeWalker_nextNode( kde_TreeWalker* instPointer){
	return (kde_DOMNode*)new DOM::Node(((TreeWalkerBridge*)instPointer)->nextNode());
}
//kde_TreeWalkerImpl* kde_TreeWalker_handle( kde_TreeWalker* instPointer){
//	return (kde_TreeWalkerImpl*) ((TreeWalkerBridge*)instPointer)->handle();
//}
int kde_TreeWalker_isNull( kde_TreeWalker* instPointer){
	return (int) ((TreeWalkerBridge*)instPointer)->isNull();
}
