00001 #ifndef __XML_NODE_REFERENCE_LIST_H 00002 #define __XML_NODE_REFERENCE_LIST_H 00003 00004 #include "mimasconfig.h" 00005 00006 #ifdef HAVE_XALAN 00007 00008 #include <boost/shared_ptr.hpp> 00009 #include <XPath/NodeRefList.hpp> 00010 #include <XPath/XObject.hpp> 00011 #include "object.h" 00012 #include "xml_reference.h" 00013 00014 namespace mimas { 00015 00016 class xml_document; 00017 00027 class xml_node_reference_list: public object 00028 { 00029 public: 00030 #ifdef SIMPLEXPATH 00032 xml_node_reference_list( const NodeRefList &_nodeList, 00033 XMLDocument *_document ): 00034 nodeList(_nodeList), document(_document) {} 00035 #else 00037 xml_node_reference_list( boost::shared_ptr< XObjectPtr > _xObject, 00038 xml_document *_document ): 00039 xObject( _xObject ), nodeList( (*_xObject)->nodeset() ), 00040 document(_document) {} 00041 #endif 00043 xml_node_reference_list( const xml_node_reference_list &l ); 00044 00047 xml_reference< XalanNode > item( int index ) const; 00050 int getLength(void) const; 00051 protected: 00052 #ifdef SIMPLEXPATH 00054 NodeRefList nodeList; 00055 #else 00057 boost::shared_ptr< XObjectPtr > xObject; 00059 const NodeRefListBase &nodeList; 00060 #endif 00062 xml_document *document; 00063 }; 00064 00066 00067 }; 00068 00069 #endif 00070 00071 #endif