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

syndication/rdf

contentvocab.cpp
00001 /*
00002  * This file is part of the syndication library
00003  *
00004  * Copyright (C) 2006 Frank Osterfeld <osterfeld@kde.org>
00005  *
00006  * This library is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU Library General Public
00008  * License as published by the Free Software Foundation; either
00009  * version 2 of the License, or (at your option) any later version.
00010  *
00011  * This library is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014  * Library General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU Library General Public License
00017  * along with this library; see the file COPYING.LIB.  If not, write to
00018  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00019  * Boston, MA 02110-1301, USA.
00020  *
00021  */
00022 
00023 #include "contentvocab.h"
00024 #include "property.h"
00025 
00026 #include <QtCore/QCoreApplication>
00027 #include <QtCore/QString>
00028 
00029 namespace Syndication {
00030 namespace RDF {
00031 
00032 class ContentVocab::ContentVocabPrivate
00033 {
00034     public:
00035         
00036     QString namespaceURI;
00037     PropertyPtr encoded;
00038 
00039     static ContentVocab *sSelf;
00040     static void cleanupContentVocab()
00041     {
00042         delete sSelf;
00043         sSelf = 0;
00044     }
00045 };
00046 ContentVocab *ContentVocab::ContentVocabPrivate::sSelf = 0;
00047 
00048 ContentVocab::ContentVocab() : d(new ContentVocabPrivate)
00049 {
00050     QString ns = QLatin1String("http://purl.org/rss/1.0/modules/content/");
00051     
00052     d->namespaceURI = ns;
00053     
00054     d->encoded = PropertyPtr( new Property(ns + QLatin1String("encoded")) );
00055     
00056 }
00057 
00058 ContentVocab::~ContentVocab()
00059 {
00060     delete d;
00061 }
00062 
00063 ContentVocab* ContentVocab::self()
00064 {
00065     static ContentVocabPrivate p;
00066     if(!p.sSelf) {
00067         p.sSelf = new ContentVocab;
00068         qAddPostRoutine(ContentVocabPrivate::cleanupContentVocab);
00069     }
00070     return p.sSelf;
00071 }
00072         
00073 const QString& ContentVocab::namespaceURI() const
00074 {
00075     return d->namespaceURI;
00076 }
00077 
00078 PropertyPtr ContentVocab::encoded() const
00079 {
00080     return d->encoded;
00081 }
00082 
00083 } // namespace RDF
00084 } // namespace Syndication
This file is part of the KDE documentation.
Documentation copyright © 1996-2012 The KDE developers.
Generated on Thu May 10 2012 22:17:52 by doxygen 1.8.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.8.3 API Reference

Skip menu "kdepimlibs-4.8.3 API Reference"
  • akonadi
  •   contact
  •   kmime
  • kabc
  • kalarmcal
  • kblog
  • kcal
  • kcalcore
  • kcalutils
  • kholidays
  • kimap
  • kioslave
  •   imap4
  •   mbox
  •   nntp
  • kldap
  • kmbox
  • kmime
  • kontactinterface
  • kpimidentities
  • kpimtextedit
  •   richtextbuilders
  • 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