Syndication

rss2/category.h
1/*
2 This file is part of the syndication library
3 SPDX-FileCopyrightText: 2005 Frank Osterfeld <osterfeld@kde.org>
4
5 SPDX-License-Identifier: LGPL-2.0-or-later
6*/
7
8#ifndef SYNDICATION_RSS2_CATEGORY_H
9#define SYNDICATION_RSS2_CATEGORY_H
10
11#include <syndication/elementwrapper.h>
12
13class QDomElement;
14class QString;
15
16namespace Syndication
17{
18namespace RSS2
19{
20/**
21 * A category which can be assigned to items or whole feeds.
22 * These can be simple tags as known from delicious or Technorati, or
23 * a category from a hierarchical taxonomy or ontology.
24 *
25 * @author Frank Osterfeld
26 */
28{
29public:
30 /**
31 * Creates a Category object wrapping a @c &lt;category> XML element.
32 *
33 * @param element The @c &lt;category> element to wrap
34 */
35 explicit Category(const QDomElement &element);
36
37 /**
38 * Default constructor, creates a null object, for which isNull() is
39 * @c true.
40 */
41 Category();
42
43 /**
44 * Name of the category. This is both to be used as identifier and as
45 * human-readable string. It can bea forward-slash-separated string
46 * to identify a hierarchic location in the domain indicated by
47 * domain(). Examples: "General", "Programming", "Funny",
48 * "Books/History".
49 *
50 * @return The category identifier/name as string or a null string for
51 * null objects.
52 *
53 */
54 QString category() const;
55
56 /**
57 * optional, identifies the domain of the category, i.e. a
58 * categorization taxonomy.
59 *
60 * @return The domain of the category, or a null string if none is set
61 * (and for null objects)
62 */
63 QString domain() const;
64
65 /**
66 * Returns a description of the object for debugging purposes.
67 *
68 * @return debug string
69 */
70 QString debugInfo() const;
71};
72
73} // namespace RSS2
74} // namespace Syndication
75
76#endif // SYNDICATION_RSS2_CATEGORY_H
A wrapper for XML elements.
const QDomElement & element() const
returns the wrapped resource.
A category which can be assigned to items or whole feeds.
QString debugInfo() const
Returns a description of the object for debugging purposes.
QString domain() const
optional, identifies the domain of the category, i.e.
Category()
Default constructor, creates a null object, for which isNull() is true.
QString category() const
Name of the category.
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Nov 22 2024 12:02:57 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.