• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdepimlibs-4.14.10 API Reference
  • KDE Home
  • Contact Us
 

syndication/rdf

  • syndication
  • rdf
contentvocab.cpp
1/*
2 * This file is part of the syndication library
3 *
4 * Copyright (C) 2006 Frank Osterfeld <osterfeld@kde.org>
5 *
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Library General Public
8 * License as published by the Free Software Foundation; either
9 * version 2 of the License, or (at your option) any later version.
10 *
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Library General Public License for more details.
15 *
16 * You should have received a copy of the GNU Library General Public License
17 * along with this library; see the file COPYING.LIB. If not, write to
18 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
19 * Boston, MA 02110-1301, USA.
20 *
21 */
22
23#include "contentvocab.h"
24#include "property.h"
25
26#include <QtCore/QCoreApplication>
27#include <QtCore/QString>
28
29namespace Syndication {
30namespace RDF {
31
32class ContentVocab::ContentVocabPrivate
33{
34 public:
35
36 QString namespaceURI;
37 PropertyPtr encoded;
38
39 static ContentVocab *sSelf;
40 static void cleanupContentVocab()
41 {
42 delete sSelf;
43 sSelf = 0;
44 }
45};
46ContentVocab *ContentVocab::ContentVocabPrivate::sSelf = 0;
47
48ContentVocab::ContentVocab() : d(new ContentVocabPrivate)
49{
50 QString ns = QLatin1String("http://purl.org/rss/1.0/modules/content/");
51
52 d->namespaceURI = ns;
53
54 d->encoded = PropertyPtr( new Property(ns + QLatin1String("encoded")) );
55
56}
57
58ContentVocab::~ContentVocab()
59{
60 delete d;
61}
62
63ContentVocab* ContentVocab::self()
64{
65 static ContentVocabPrivate p;
66 if(!p.sSelf) {
67 p.sSelf = new ContentVocab;
68 qAddPostRoutine(ContentVocabPrivate::cleanupContentVocab);
69 }
70 return p.sSelf;
71}
72
73const QString& ContentVocab::namespaceURI() const
74{
75 return d->namespaceURI;
76}
77
78PropertyPtr ContentVocab::encoded() const
79{
80 return d->encoded;
81}
82
83} // namespace RDF
84} // namespace Syndication
Syndication::RDF::ContentVocab
Singleton holding RDF class and property constants of the RSS 1.0 content module.
Definition contentvocab.h:49
Syndication::RDF::ContentVocab::self
static ContentVocab * self()
returns the singleton instance
Definition contentvocab.cpp:63
Syndication::RDF::ContentVocab::namespaceURI
const QString & namespaceURI() const
Namespace of the Content module.
Definition contentvocab.cpp:73
Syndication::RDF::ContentVocab::encoded
PropertyPtr encoded() const
content:encoded property
Definition contentvocab.cpp:78
Syndication::RDF::ContentVocab::~ContentVocab
~ContentVocab()
destructor
Definition contentvocab.cpp:58
Syndication::RDF::Property
a property is node type that represents properties of things, like "name" is a property of a person,...
Definition property.h:46
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Wed Jan 24 2024 00:00:00 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

syndication/rdf

Skip menu "syndication/rdf"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List

kdepimlibs-4.14.10 API Reference

Skip menu "kdepimlibs-4.14.10 API Reference"
  • akonadi
  •   contact
  •   kmime
  •   socialutils
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  • kpimutils
  • kresources
  • ktnef
  • kxmlrpcclient
  • mailtransport
  • microblog
  • qgpgme
  • syndication
  •   atom
  •   rdf
  •   rss2
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal