Syndication

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

KDE's Doxygen guidelines are available online.