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

kdecore

  • kdecore
ksycocafactory.h
1 /* This file is part of the KDE libraries
2  * Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License version 2 as published by the Free Software Foundation;
7  *
8  * This library is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11  * Library General Public License for more details.
12  *
13  * You should have received a copy of the GNU Library General Public License
14  * along with this library; see the file COPYING.LIB. If not, write to
15  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
16  * Boston, MA 02110-1301, USA.
17  **/
18 
19 #ifndef __ksycocafactory_h__
20 #define __ksycocafactory_h__
21 
22 #include "ksycocatype.h"
23 #include "ksycocaentry.h"
24 
25 #include <tqdict.h>
26 #include <tqptrlist.h>
27 class KSycoca;
28 class TQStringList;
29 class TQString;
30 class KSycocaDict;
31 class KSycocaResourceList;
32 
33 typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
34 
39 class KDECORE_EXPORT KSycocaFactory
40 {
41 public:
42  virtual KSycocaFactoryId factoryId() const = 0;
43 
44 protected: // virtual class
49  KSycocaFactory( KSycocaFactoryId factory_id );
50 
51 public:
52  virtual ~KSycocaFactory();
53 
57  int offset() { return mOffset; }
58 
62  KSycocaEntryDict * entryDict() { return m_entryDict; }
63 
68  virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
69 
73  virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
74 
79  void removeEntry(KSycocaEntry *newEntry);
80 
84  virtual KSycocaEntry *createEntry(int offset)=0;
85 
89  KSycocaEntry::List allEntries();
90 
102  virtual void save(TQDataStream &str);
103 
111  virtual void saveHeader(TQDataStream &str);
112 
116  virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
117 
118 private:
119  int mOffset;
120 
121 protected:
122  int m_sycocaDictOffset;
123  int m_beginEntryOffset;
124  int m_endEntryOffset;
125  TQDataStream *m_str;
126 
127  KSycocaResourceList *m_resourceList;
128  KSycocaEntryDict *m_entryDict;
129  KSycocaDict *m_sycocaDict;
130 protected:
131  virtual void virtual_hook( int id, void* data );
132 };
133 
137 class KDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
138 {
139 public:
140  KSycocaFactoryList() { }
141 };
142 
143 #endif
KSycocaFactoryList
This, instead of a typedef, allows to declare "class ..." in header files.
Definition: ksycocafactory.h:137
KStdAction::save
KAction * save(const TQObject *recvr, const char *slot, KActionCollection *parent, const char *name=0)
KSycocaEntry
Base class for all Sycoca entries.
Definition: ksycocaentry.h:37

kdecore

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

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.8.11
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |