Syndication

person.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 "person.h"
9
10namespace Syndication
11{
15
17{
18 QString info = QLatin1String("# Person begin ####################\n");
19
20 QString dname = name();
21
22 if (!dname.isNull()) {
23 info += QLatin1String("name: #") + dname + QLatin1String("#\n");
24 }
25
26 QString duri = uri();
27
28 if (!duri.isNull()) {
29 info += QLatin1String("uri: #") + duri + QLatin1String("#\n");
30 }
31
32 QString demail = email();
33
34 if (!demail.isNull()) {
35 info += QLatin1String("email: #") + demail + QLatin1String("#\n");
36 }
37
38 info += QLatin1String("# Person end ######################\n");
39
40 return info;
41}
42
43bool Person::operator==(const Person &other) const
44{
45 return name() == other.name() && email() == other.email() && uri() == other.uri();
46}
47
48} // namespace Syndication
Person objects hold information about a person, such as the author of the content syndicated in the f...
Definition person.h:37
virtual bool operator==(const Person &other) const
compares two person instances.
Definition person.cpp:43
virtual QString name() const =0
the name of the person (optional)
virtual QString uri() const =0
a URI associated with the person.
virtual QString email() const =0
e-mail address of the person (optional)
virtual ~Person()
destructor
Definition person.cpp:12
virtual QString debugInfo() const
description of the person for debugging purposes.
Definition person.cpp:16
bool isNull() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 17 2024 11:56:56 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.