Syndication

generator.cpp
1/*
2 This file is part of the syndication library
3 SPDX-FileCopyrightText: 2006 Frank Osterfeld <osterfeld@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#include "generator.h"
9#include "constants.h"
10
11#include <QString>
12
13namespace Syndication
14{
15namespace Atom
16{
18 : ElementWrapper()
19{
20}
21
23 : ElementWrapper(element)
24{
25}
26
28{
29 return completeURI(attribute(QStringLiteral("uri")));
30}
31
33{
34 return text();
35}
36
38{
39 return attribute(QStringLiteral("version"));
40}
41
43{
44 QString info = QLatin1String("### Generator: ###################\n");
45 if (!name().isEmpty()) {
46 info += QLatin1String("name: #") + name() + QLatin1String("#\n");
47 }
48 if (!uri().isEmpty()) {
49 info += QLatin1String("uri: #") + uri() + QLatin1String("#\n");
50 }
51 if (!version().isEmpty()) {
52 info += QLatin1String("version: #") + version() + QLatin1String("#\n");
53 }
54 info += QLatin1String("### Generator end ################\n");
55 return info;
56}
57
58} // namespace Atom
59} // namespace Syndication
Generator()
default constructor, creates a null generator
Definition generator.cpp:17
QString uri() const
A URI for the generator (e.g.
Definition generator.cpp:27
QString version() const
version of the agent (optional)
Definition generator.cpp:37
QString debugInfo() const
a description of this generator for debugging purposes.
Definition generator.cpp:42
QString name() const
human-readable name of the generator.
Definition generator.cpp:32
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 14 2024 11:50:32 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.