Syndication

person.cpp
1 /*
2  This file is part of the syndication library
3  SPDX-FileCopyrightText: 2006 Frank Osterfeld <[email protected]>
4 
5  SPDX-License-Identifier: LGPL-2.0-or-later
6 */
7 
8 #include "person.h"
9 
10 namespace Syndication
11 {
13 {
14 }
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 
43 bool Person::operator==(const Person &other) const
44 {
45  return name() == other.name() && email() == other.email() && uri() == other.uri();
46 }
47 
48 } // namespace Syndication
virtual ~Person()
destructor
Definition: person.cpp:12
bool isNull() const const
virtual QString debugInfo() const
description of the person for debugging purposes.
Definition: person.cpp:16
virtual bool operator==(const Person &other) const
compares two person instances.
Definition: person.cpp:43
virtual QString email() const =0
e-mail address of the person (optional)
virtual QString uri() const =0
a URI associated with the person.
virtual QString name() const =0
the name of the person (optional)
Person objects hold information about a person, such as the author of the content syndicated in the f...
Definition: person.h:36
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Dec 6 2021 22:54:25 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.