Syndication::SpecificDocument Class

class Syndication::SpecificDocument

Document interface for format-specific feed documents as parsed from a document source (see DocumentSource). More...

Header: #include <Syndication/SpecificDocument>
CMake: find_package(KF6 REQUIRED COMPONENTS Syndication)
target_link_libraries(mytarget PRIVATE KF6::Syndication)
Inherited By:

Syndication::Atom::EntryDocument and Syndication::Atom::FeedDocument

Public Functions

virtual bool accept(Syndication::DocumentVisitor *visitor) = 0
virtual QString debugInfo() const = 0
virtual bool isValid() const = 0

Detailed Description

The Document classes from the several syndication formats must implement this interface. It's main purpose is to provide access for document visitors (see DocumentVisitor).

Usually it is not necessary to access the format-specific document at all, use Feed for a format-agnostic interface to all feed documents supported by the library.

Member Function Documentation

[pure virtual] bool SpecificDocument::accept(Syndication::DocumentVisitor *visitor)

This must be implemented for the double dispatch technique (Visitor pattern).

The usual implementation is

return visitor->visit(this);

See also DocumentVisitor.

visitor the visitor "visiting" this object

[pure virtual] QString SpecificDocument::debugInfo() const

Returns a description of the document for debugging purposes.

[pure virtual] bool SpecificDocument::isValid() const

Returns whether this document is valid or not.

Invalid documents do not contain any useful information.