• Skip to content
  • Skip to link menu
KDE 4.6 API Reference
  • KDE API Reference
  • KDE-PIM Libraries
  • KDE Home
  • Contact Us
 

Syndication Library

  • Syndication
  • AbstractParser
Public Member Functions

Syndication::AbstractParser Class Reference

Interface for all parsers. More...

#include <abstractparser.h>

List of all members.

Public Member Functions

virtual ~AbstractParser ()
virtual bool accept (const DocumentSource &source) const =0
virtual QString format () const =0
virtual SpecificDocumentPtr parse (const DocumentSource &source) const =0

Detailed Description

Interface for all parsers.

The parsers for the various formats must implement this interface and register themselves at the ParserRegistry.

Author:
Frank Osterfeld

Definition at line 42 of file abstractparser.h.


Constructor & Destructor Documentation

builddir build BUILD kdepimlibs syndication abstractparser cpp Syndication::AbstractParser::~AbstractParser ( ) [virtual]

virtual destructor

Definition at line 28 of file abstractparser.cpp.


Member Function Documentation

virtual bool Syndication::AbstractParser::accept ( const DocumentSource &  source) const [pure virtual]

Lets the parser check if it can parse the passed source.

Parser implementations should do a _quick_ check for the file format (i.e. check for feed format and version number in the root element) to find out if the source is in a supported format. They should _not_ completely parse the document to test for full compliance to the format specification.

Parameters:
sourcethe document source to be checked
Returns:
whether source seems to be in a format supported by the parser
virtual QString Syndication::AbstractParser::format ( ) const [pure virtual]

Returns the name of the format supported by this parser.

Returns:
a string like "rss2", "atom" or "rdf"
virtual SpecificDocumentPtr Syndication::AbstractParser::parse ( const DocumentSource &  source) const [pure virtual]

Lets the parser parse a document source.

The parser returns a valid document instance if successful, or an invalid one if not.

See also:
SpecificDocument::isValid()
Parameters:
sourceThe document source to be parsed
Returns:
a newly created document parsed from source

The documentation for this class was generated from the following files:
  • abstractparser.h
  • abstractparser.cpp

Syndication Library

Skip menu "Syndication Library"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

KDE-PIM Libraries

Skip menu "KDE-PIM Libraries"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Generated for KDE-PIM Libraries by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal