Syndication

property.h
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 #ifndef SYNDICATION_RDF_PROPERTY_H
9 #define SYNDICATION_RDF_PROPERTY_H
10 
11 #include <syndication/rdf/resource.h>
12 
13 class QString;
14 
15 namespace Syndication
16 {
17 namespace RDF
18 {
19 //@cond PRIVATE
20 class Property;
21 typedef 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  */
31 class SYNDICATION_EXPORT Property : public Resource
32 {
33 public:
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
a property is node type that represents properties of things, like "name" is a property of a person,...
Definition: property.h:31
Visitor interface, following the Visitor design pattern.
Definition: nodevisitor.h:41
Property
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:57:11 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.