Kgapi

object.cpp
1 /*
2  * This file is part of LibKGAPI library
3  *
4  * SPDX-FileCopyrightText: 2013 Daniel Vr├ítil <[email protected]>
5  *
6  * SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
7  */
8 
9 #include "object.h"
10 #include "../debug.h"
11 
12 using namespace KGAPI2;
13 
14 class Q_DECL_HIDDEN Object::Private
15 {
16  public:
17  Private();
18  Private(const Private& other);
19 
20  QString etag;
21 };
22 
23 Object::Private::Private()
24 {
25 }
26 
27 Object::Private::Private(const Private& other):
28  etag(other.etag)
29 {
30 }
31 
33  d(new Private())
34 {
35 }
36 
37 Object::Object(const Object& other):
38  d(new Private(*(other.d)))
39 {
40 }
41 
43 {
44  delete d;
45 }
46 
47 bool Object::operator==(const Object &other) const
48 {
49  if (d->etag != other.d->etag) {
50  qCDebug(KGAPIDebug) << "ETags don't match";
51  return false;
52  }
53  return true;
54 }
55 
56 
58 {
59  d->etag = etag;
60 }
61 
63 {
64  return d->etag;
65 }
Base class for all objects.
Definition: object.h:30
Object()
Constructor.
Definition: object.cpp:32
QString etag() const
Returns etag of this object.
Definition: object.cpp:62
A job to fetch a single map tile described by a StaticMapUrl.
Definition: blog.h:15
void setEtag(const QString &etag)
Set the etag of this object.
Definition: object.cpp:57
virtual ~Object()
Destructor.
Definition: object.cpp:42
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Mon Sep 27 2021 23:13:53 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.