Syndication

property.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 "property.h"
9#include "nodevisitor.h"
10
11namespace Syndication
12{
13namespace RDF
14{
16 : Resource()
17{
18}
19
21 : Resource(uri)
22{
23}
24
28
30{
31 return true;
32}
33
34void Property::accept(NodeVisitor *visitor, NodePtr ptr)
35{
37
38 if (!visitor->visitProperty(pptr)) {
39 Resource::accept(visitor, ptr);
40 }
41}
42
44{
45 return new Property(*this);
46}
47
48} // namespace RDF
49} // namespace Syndication
Visitor interface, following the Visitor design pattern.
Definition nodevisitor.h:42
virtual bool visitProperty(PropertyPtr property)
reimplement this method to handle properties.
a property is node type that represents properties of things, like "name" is a property of a person,...
Definition property.h:32
Property * clone() const override
creates a copy of the property object
Definition property.cpp:43
Property()
creates a null property
Definition property.cpp:15
bool isProperty() const override
returns true for properties
Definition property.cpp:29
void accept(NodeVisitor *visitor, NodePtr ptr) override
Used by visitors for double dispatch.
Definition property.cpp:34
~Property() override
destructor
Definition property.cpp:25
QSharedPointer< X > staticCast() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:14:15 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.