#include <XMLNodeIterator.h>
Inheritance diagram for zypp::parser::XMLNodeIterator< ENTRYTYPE >:
Public Member Functions | |
XMLNodeIterator (std::istream &input, const std::string &baseUrl, const char *validationPath=0) | |
Constructor. | |
XMLNodeIterator (ENTRYTYPE &entry) | |
Constructor for a trivial iterator. | |
XMLNodeIterator () | |
Constructor for an empty iterator. | |
virtual | ~XMLNodeIterator () |
Destructor. | |
ENTRYTYPE & | operator * () const |
Fetch a pointer to the current element. | |
ENTRYTYPE * | operator() () const |
Fetch the current element. | |
XMLNodeIterator< ENTRYTYPE > & | operator++ () |
Go to the next element and return it. | |
XMLNodeIterator | operator++ (int) |
remember the current element, go to next and return remembered one. | |
const ENTRYTYPE * | operator-> () |
similar to operator*, allows direct member access | |
Protected Member Functions | |
virtual bool | isInterested (const xmlNodePtr nodePtr)=0 |
filter for the xml nodes The derived class decides which xml nodes it is actually interested in. | |
virtual ENTRYTYPE | process (const xmlTextReaderPtr readerPtr)=0 |
process an xml node The derived class has to produce the ENTRYTYPE object here. | |
void | _process (const xmlTextReaderPtr readerPtr) |
process an xml node and set it as next element The derived class has to produce the ENTRYTYPE object here. | |
Private Member Functions | |
void | setCurrent (const void *data) |
void * | getCurrent () const |
Private Attributes | |
std::auto_ptr< ENTRYTYPE > | _current |
contains the current element of the iterator. |
Definition at line 297 of file XMLNodeIterator.h.
|
Constructor. Derived classes must call fetchNext() here.
Definition at line 306 of file XMLNodeIterator.h. |
|
Constructor for a trivial iterator. A trivial iterator contains only one element. This is at least needed internally for the postinc (iter++) operator
Definition at line 324 of file XMLNodeIterator.h. |
|
Constructor for an empty iterator. An empty iterator is already at its end. This is what end() returns ... Definition at line 335 of file XMLNodeIterator.h. |
|
Destructor.
Definition at line 342 of file XMLNodeIterator.h. |
|
Fetch a pointer to the current element.
Definition at line 350 of file XMLNodeIterator.h. |
|
Fetch the current element.
Definition at line 361 of file XMLNodeIterator.h. |
|
Go to the next element and return it.
Definition at line 374 of file XMLNodeIterator.h. |
|
remember the current element, go to next and return remembered one. avoid this, usually you need the preinc operator (++iter) This function may throw ParserError if something is fundamentally wrong with the input.
Definition at line 386 of file XMLNodeIterator.h. |
|
similar to operator*, allows direct member access
Definition at line 399 of file XMLNodeIterator.h. |
|
|
process an xml node The derived class has to produce the ENTRYTYPE object here. Details about the xml reader is in the libxml2 documentation. You'll most probably want to use xmlTextReaderExpand(reader) to request the full subtree, and then use the links in the resulting node structure to traverse, and class LibXMLHelper to access the attributes and element contents. fetchNext() cannot throw an error since it will be called in the constructor. Instead, in case of a fundamental syntax error the error is saved and will be thrown with the next checkError().
Implemented in zypp::parser::xmlstore::XMLLanguageParser, zypp::parser::xmlstore::XMLPatchParser, zypp::parser::xmlstore::XMLPatternParser, zypp::parser::xmlstore::XMLProductParser, zypp::parser::xmlstore::XMLSourceCacheParser, zypp::parser::yum::YUMFileListParser, zypp::parser::yum::YUMGroupParser, zypp::parser::yum::YUMOtherParser, zypp::parser::yum::YUMPatchesParser, zypp::parser::yum::YUMPatchParser, zypp::parser::yum::YUMPatternParser, zypp::parser::yum::YUMPrimaryParser, zypp::parser::yum::YUMProductParser, and zypp::parser::yum::YUMRepomdParser. Referenced by zypp::parser::XMLNodeIterator< YUMRepomdData_Ptr >::_process(). |
|
process an xml node and set it as next element The derived class has to produce the ENTRYTYPE object here. Details about the xml reader is in the libxml2 documentation. You'll most probably want to use xmlTextReaderExpand(reader) to request the full subtree, and then use the links in the resulting node structure to traverse, and class LibXMLHelper to access the attributes and element contents. fetchNext() cannot throw an error since it will be called in the constructor. Instead, in case of a fundamental syntax error the error is saved and will be thrown with the next checkError().
Implements zypp::parser::XMLNodeIteratorBase. Definition at line 439 of file XMLNodeIterator.h. |
|
Implements zypp::parser::XMLNodeIteratorBase. Definition at line 446 of file XMLNodeIterator.h. Referenced by zypp::parser::XMLNodeIterator< YUMRepomdData_Ptr >::XMLNodeIterator(). |
|
Implements zypp::parser::XMLNodeIteratorBase. Definition at line 454 of file XMLNodeIterator.h. Referenced by zypp::parser::XMLNodeIterator< YUMRepomdData_Ptr >::operator *(), zypp::parser::XMLNodeIterator< YUMRepomdData_Ptr >::operator()(), and zypp::parser::XMLNodeIterator< YUMRepomdData_Ptr >::operator->(). |
|
contains the current element of the iterator. a pointer is used to be able to handle non-assigneable ENTRYTYPEs. The iterator owns the element until the next ++ operation. It can be 0 when the end has been reached. Definition at line 465 of file XMLNodeIterator.h. Referenced by zypp::parser::XMLNodeIterator< YUMRepomdData_Ptr >::_process(), zypp::parser::XMLNodeIterator< YUMRepomdData_Ptr >::getCurrent(), and zypp::parser::XMLNodeIterator< YUMRepomdData_Ptr >::setCurrent(). |