Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

YUM::YUMOtherParser Class Reference

Parser for YUM other.xml files Use this class as an iterator that produces, one after one, YUMOtherDataPtr(s) for the XML package elements. Here's an example:. More...

#include <YUMOtherParser.h>

Inheritance diagram for YUM::YUMOtherParser:

XMLNodeIterator< YUMOtherDataPtr > XMLNodeIteratorBase List of all members.

Public Member Functions

 YUMOtherParser (std::istream &is, const std::string &baseUrl)
 YUMOtherParser ()
 YUMOtherParser (YUMOtherDataPtr &entry)
virtual ~YUMOtherParser ()

Private Member Functions

virtual bool isInterested (const xmlNodePtr nodePtr)
virtual YUMOtherDataPtr process (const xmlTextReaderPtr reader)

Private Attributes

LibXMLHelper _helper

Detailed Description

Parser for YUM other.xml files Use this class as an iterator that produces, one after one, YUMOtherDataPtr(s) for the XML package elements. Here's an example:.

for (YUMOtherParser iter(anIstream, baseUrl), iter != YUMOtherParser.end(), // or: iter() != 0, or ! iter.atEnd() ++iter) { doSomething(*iter) }

The iterator owns the pointer (i.e., caller must not delete it) until the next ++ operator is called. At this time, it will be destroyed (and a new ENTRYTYPE is created.)

If the input is fundamentally flawed so that it makes no sense to continue parsing, XMLNodeIterator will log it and consider the input as finished. You can query the exit status with errorStatus().


Constructor & Destructor Documentation

YUM::YUMOtherParser::YUMOtherParser std::istream &  is,
const std::string &  baseUrl
 

Constructor.

Parameters:
is the istream to read from
baseUrl the base URL of the XML document. Can be left empty.

YUMOtherParser::YUMOtherParser  ) 
 

YUMOtherParser::YUMOtherParser YUMOtherDataPtr &  entry  ) 
 

YUMOtherParser::~YUMOtherParser  )  [virtual]
 

Destructor.


Member Function Documentation

bool YUMOtherParser::isInterested const xmlNodePtr  nodePtr  )  [private, virtual]
 

decides if the parser is interested in the node (and subtree) of an element.

Parameters:
nodePtr the XML node
Returns:
true if the parser is interested.

Implements XMLNodeIterator< YUMOtherDataPtr >.

YUMOtherDataPtr YUMOtherParser::process const xmlTextReaderPtr  reader  )  [private, virtual]
 

creates a new object from the xml subtree

Parameters:
reader 
Returns:

Implements XMLNodeIterator< YUMOtherDataPtr >.


Member Data Documentation

LibXMLHelper YUM::YUMOtherParser::_helper [private]
 

converts the xml stuff to c++ stuff and filters the right namespaces


The documentation for this class was generated from the following files:
Generated on Mon Sep 12 21:52:15 2005 for yast2-packagemanager by  doxygen 1.4.4