• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdecore
 

tdecore

tdesycocafactory.h

00001 /*  This file is part of the KDE libraries
00002  *  Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
00003  *
00004  *  This library is free software; you can redistribute it and/or
00005  *  modify it under the terms of the GNU Library General Public
00006  *  License version 2 as published by the Free Software Foundation;
00007  *
00008  *  This library is distributed in the hope that it will be useful,
00009  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00010  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00011  *  Library General Public License for more details.
00012  *
00013  *  You should have received a copy of the GNU Library General Public License
00014  *  along with this library; see the file COPYING.LIB.  If not, write to
00015  *  the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
00016  *  Boston, MA 02110-1301, USA.
00017  **/
00018 
00019 #ifndef __tdesycocafactory_h__
00020 #define __tdesycocafactory_h__
00021 
00022 #include "tdesycocatype.h"
00023 #include "tdesycocaentry.h"
00024 
00025 #include <tqdict.h>
00026 #include <tqptrlist.h>
00027 class KSycoca;
00028 class TQStringList;
00029 class TQString;
00030 class KSycocaDict;
00031 class KSycocaResourceList;
00032 
00033 typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
00034 
00039 class TDECORE_EXPORT KSycocaFactory
00040 {
00041 public:
00042    virtual KSycocaFactoryId factoryId() const = 0;
00043  
00044 protected: // virtual class
00049    KSycocaFactory( KSycocaFactoryId factory_id );
00050 
00051 public:
00052    virtual ~KSycocaFactory();
00053 
00057    int offset() { return mOffset; }
00058 
00062    KSycocaEntryDict * entryDict() { return m_entryDict; }
00063 
00068    virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
00069 
00073    virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
00074 
00079    void removeEntry(KSycocaEntry *newEntry);
00080 
00084    virtual KSycocaEntry *createEntry(int offset)=0;
00085 
00089    KSycocaEntry::List allEntries();
00090 
00102    virtual void save(TQDataStream &str);
00103 
00111    virtual void saveHeader(TQDataStream &str);
00112 
00116    virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
00117 
00118 private:
00119    int mOffset;
00120 
00121 protected:
00122    int m_sycocaDictOffset;
00123    int m_beginEntryOffset;
00124    int m_endEntryOffset;
00125    TQDataStream *m_str;
00126 
00127    KSycocaResourceList *m_resourceList;
00128    KSycocaEntryDict *m_entryDict;
00129    KSycocaDict *m_sycocaDict;
00130 protected:
00131    virtual void virtual_hook( int id, void* data );
00132 };
00133 
00137 class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
00138 {
00139 public:
00140    KSycocaFactoryList() { }
00141 };
00142 
00143 #endif

tdecore

Skip menu "tdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdecore

Skip menu "tdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdecore by doxygen 1.7.1
This website is maintained by Timothy Pearson.