zypp::parser::xmlstore::XMLPatchParser Class Reference

#include <XMLPatchParser.h>

Inheritance diagram for zypp::parser::xmlstore::XMLPatchParser:

zypp::parser::XMLNodeIterator< XMLPatchData_Ptr > zypp::parser::xmlstore::XMLResObjectParser zypp::parser::XMLNodeIteratorBase iterator List of all members.

Public Member Functions

 XMLPatchParser (std::istream &is, const std::string &baseUrl)
 XMLPatchParser ()
 XMLPatchParser (XMLPatchData_Ptr &entry)
virtual ~XMLPatchParser ()

Private Member Functions

virtual bool isInterested (const xmlNodePtr nodePtr)
 filter for the xml nodes The derived class decides which xml nodes it is actually interested in.
virtual XMLPatchData_Ptr process (const xmlTextReaderPtr reader)
 process an xml node The derived class has to produce the ENTRYTYPE object here.
void parseAtomsNode (XMLPatchData_Ptr dataPtr, xmlNodePtr formatNode)
void parseMessageNode (XMLPatchData_Ptr dataPtr, xmlNodePtr formatNode)
void parseScriptNode (XMLPatchData_Ptr dataPtr, xmlNodePtr formatNode)
void parseAtomNode (XMLPatchData_Ptr dataPtr, xmlNodePtr formatNode)
void parseResolvableNode (XMLResObjectData_Ptr dataPtr, xmlNodePtr formatNode)

Detailed Description

Definition at line 29 of file XMLPatchParser.h.


Constructor & Destructor Documentation

zypp::parser::xmlstore::XMLPatchParser::XMLPatchParser std::istream &  is,
const std::string &  baseUrl
 

zypp::parser::xmlstore::XMLPatchParser::XMLPatchParser  ) 
 

Definition at line 39 of file XMLPatchParser.cc.

zypp::parser::xmlstore::XMLPatchParser::XMLPatchParser XMLPatchData_Ptr &  entry  ) 
 

Definition at line 42 of file XMLPatchParser.cc.

zypp::parser::xmlstore::XMLPatchParser::~XMLPatchParser  )  [virtual]
 

Definition at line 30 of file XMLPatchParser.cc.


Member Function Documentation

bool zypp::parser::xmlstore::XMLPatchParser::isInterested const xmlNodePtr  nodePtr  )  [private, virtual]
 

filter for the xml nodes The derived class decides which xml nodes it is actually interested in.

For each that is selected, process() will be called an the resulting ENTRYTYPE object used as the next value for the iterator. Documentation for the node structure can be found in the libxml2 documentation. Have a look at LibXMLHelper to access node attributes and contents.

Parameters:
nodePtr points to the xml node in question. Only the node is available, not the subtree. See libxml2 documentation.
Returns:
true if interested

Implements zypp::parser::XMLNodeIterator< XMLPatchData_Ptr >.

Definition at line 49 of file XMLPatchParser.cc.

References zypp::parser::xmlstore::XMLResObjectParser::_helper, zypp::parser::LibXMLHelper::isElement(), and zypp::parser::LibXMLHelper::name().

XMLPatchData_Ptr zypp::parser::xmlstore::XMLPatchParser::process const xmlTextReaderPtr  reader  )  [private, virtual]
 

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().

Parameters:
readerPtr points to the xmlTextReader that reads the xml stream.
Returns:

Implements zypp::parser::XMLNodeIterator< XMLPatchData_Ptr >.

Definition at line 56 of file XMLPatchParser.cc.

References zypp::parser::xmlstore::XMLResObjectParser::_helper, zypp::parser::LibXMLHelper::content(), zypp::parser::LibXMLHelper::isElement(), zypp::parser::LibXMLHelper::name(), name, parseAtomsNode(), zypp::parser::xmlstore::XMLResObjectParser::parseDependencies(), zypp::parser::xmlstore::XMLResObjectParser::parseResObjectCommonData(), and xml_assert.

void zypp::parser::xmlstore::XMLPatchParser::parseAtomsNode XMLPatchData_Ptr  dataPtr,
xmlNodePtr  formatNode
[private]
 

Definition at line 104 of file XMLPatchParser.cc.

References zypp::parser::xmlstore::XMLResObjectParser::_helper, zypp::parser::LibXMLHelper::isElement(), zypp::parser::LibXMLHelper::name(), name, parseAtomNode(), parseMessageNode(), parseScriptNode(), xml_assert, and XXX.

Referenced by process().

void zypp::parser::xmlstore::XMLPatchParser::parseMessageNode XMLPatchData_Ptr  dataPtr,
xmlNodePtr  formatNode
[private]
 

Definition at line 166 of file XMLPatchParser.cc.

References zypp::parser::xmlstore::XMLResObjectParser::_helper, zypp::parser::LibXMLHelper::attribute(), zypp::parser::LibXMLHelper::content(), zypp::parser::LibXMLHelper::isElement(), zypp::parser::LibXMLHelper::name(), name, zypp::parser::xmlstore::XMLResObjectParser::parseDependencies(), and zypp::parser::xmlstore::XMLResObjectParser::parseResObjectCommonData().

Referenced by parseAtomsNode().

void zypp::parser::xmlstore::XMLPatchParser::parseScriptNode XMLPatchData_Ptr  dataPtr,
xmlNodePtr  formatNode
[private]
 

Definition at line 141 of file XMLPatchParser.cc.

References zypp::parser::xmlstore::XMLResObjectParser::_helper, zypp::parser::LibXMLHelper::content(), zypp::parser::LibXMLHelper::isElement(), zypp::parser::LibXMLHelper::name(), name, zypp::parser::xmlstore::XMLResObjectParser::parseDependencies(), and zypp::parser::xmlstore::XMLResObjectParser::parseResObjectCommonData().

Referenced by parseAtomsNode().

void zypp::parser::xmlstore::XMLPatchParser::parseAtomNode XMLPatchData_Ptr  dataPtr,
xmlNodePtr  formatNode
[private]
 

Definition at line 130 of file XMLPatchParser.cc.

References zypp::parser::xmlstore::XMLResObjectParser::parseDependencies(), and zypp::parser::xmlstore::XMLResObjectParser::parseResObjectCommonData().

Referenced by parseAtomsNode().

void zypp::parser::xmlstore::XMLPatchParser::parseResolvableNode XMLResObjectData_Ptr  dataPtr,
xmlNodePtr  formatNode
[private]
 


The documentation for this class was generated from the following files:
Generated on Thu Jul 6 00:07:33 2006 for zypp by  doxygen 1.4.6