Syndication

property.h
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#ifndef SYNDICATION_RDF_PROPERTY_H
9#define SYNDICATION_RDF_PROPERTY_H
10
11#include <syndication/rdf/resource.h>
12
13class QString;
14
15namespace Syndication
16{
17namespace RDF
18{
19//@cond PRIVATE
20class Property;
21typedef QSharedPointer<Property> PropertyPtr;
22//@endcond
23
24/**
25 * a property is node type that represents properties of things,
26 * like "name" is a property of a person, or "color" is a property of e.g.
27 * a car. Properties can be used as predicates in statements.
28 *
29 * @author Frank Osterfeld
30 */
31class Property : public Resource
32{
33public:
34 /**
35 * creates a null property
36 */
37 Property();
38
39 /**
40 * creates a property with a given URI
41 *
42 * @param uri the URI of the property
43 */
44 explicit Property(const QString &uri);
45
46 /**
47 * destructor
48 */
49 ~Property() override;
50
51 /**
52 * Used by visitors for double dispatch. See NodeVisitor
53 * for more information.
54 * @param visitor the visitor calling the method
55 * @param ptr a shared pointer object for this node
56 */
57 void accept(NodeVisitor *visitor, NodePtr ptr) override;
58
59 /**
60 * returns true for properties
61 */
62 bool isProperty() const override;
63
64 /**
65 * creates a copy of the property object
66 */
67 Property *clone() const override;
68};
69
70} // namespace RDF
71} // namespace Syndication
72
73#endif // SYNDICATION_RDF_PROPERTY_H
Visitor interface, following the Visitor design pattern.
Definition nodevisitor.h:42
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
Resources are the entities in the RDF graph.
Definition resource.h:37
virtual QString uri() const
returns the URI of the resource
Definition resource.cpp:207
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 12 2024 11:51:41 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.