Kgapi

object.cpp
1/*
2 * This file is part of LibKGAPI library
3 *
4 * SPDX-FileCopyrightText: 2013 Daniel Vrátil <dvratil@redhat.com>
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
12using namespace KGAPI2;
13
14class Q_DECL_HIDDEN Object::Private
15{
16public:
17 Private();
18 Private(const Private &other);
19
20 QString etag;
21};
22
23Object::Private::Private()
24{
25}
26
27Object::Private::Private(const Private &other)
28 : etag(other.etag)
29{
30}
31
33 : d(new Private())
34{
35}
36
38 : d(new Private(*(other.d)))
39{
40}
41
43{
44 delete d;
45}
46
47bool 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
56void Object::setEtag(const QString &etag)
57{
58 d->etag = etag;
59}
60
62{
63 return d->etag;
64}
Base class for all objects.
Definition object.h:31
void setEtag(const QString &etag)
Set the etag of this object.
Definition object.cpp:56
Object()
Constructor.
Definition object.cpp:32
virtual ~Object()
Destructor.
Definition object.cpp:42
QString etag() const
Returns etag of this object.
Definition object.cpp:61
A job to fetch a single map tile described by a StaticMapUrl.
Definition blog.h:16
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 6 2024 12:11:00 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.