Main Page   Namespace List   File List   Examples  

XMLNodeSet.hpp

Go to the documentation of this file.
00001 /*
00002  * (C) Copyright 2002, Schlund+Partner AG
00003  *
00004  * This library is free software; you can redistribute it and/or
00005  * modify it under the terms of the GNU Lesser General Public
00006  * License as published by the Free Software Foundation; either
00007  * version 2.1 of the License, or (at your option) any later version.
00008  *
00009  * This library is distributed in the hope that it will be useful,
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00012  * Lesser General Public License for more details.
00013  *
00014  * You should have received a copy of the GNU Lesser General Public
00015  * License along with this library; if not, write to the Free Software
00016  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
00017 */
00018 
00031 #ifndef SP_GXML_XMLNODESET_HPP
00032 #define SP_GXML_XMLNODESET_HPP
00033 
00034 // C libraries
00035 #include <libxslt/xsltInternals.h>
00036 #include <libxml/xpath.h>
00037 #include <libxml/tree.h>
00038 
00039 // Local
00040 #include <sp-gxmlcpp/XMLNode.hpp>
00041 #include <sp-gxmlcpp/XMLException.hpp>
00042 
00043 namespace SP
00044 {
00045 namespace GXML
00046 {
00047 
00048 // forward declarations
00049 class XMLTree;
00050 
00051 class XMLNodeSet
00052 {
00053 public:
00054         XMLNodeSet( const std::string& xpath, const XMLTree* tree );
00055         ~XMLNodeSet();
00056 
00057         class Iterator
00058         {
00059         public:
00060                 Iterator();
00061                 Iterator( const xmlNodeSetPtr set );
00062                 ~Iterator();
00063                 Iterator operator ++();
00064                 bool operator !=( const Iterator& iter);
00065                 XMLNode operator *();
00066                 int getPosition();
00067 
00068         private:
00069                 int pos_;
00070                 xmlNodeSetPtr set_;
00071         };
00072 
00073         int size();
00074         Iterator begin();
00075         Iterator end();
00076         //Iterator rbegin();
00077         //Iterator rend();
00078 
00079 private:
00080         xmlXPathObjectPtr xPathObj_;
00081 };
00082 
00083 }}
00084 #endif

Generated on Thu Jun 3 19:20:12 2004 for sp-gxmlcpp by doxygen1.2.15