KDECore
#include <ksycocafactory.h>
Public Member Functions | |
virtual | ~KSycocaFactory () |
virtual void | addEntry (const KSycocaEntry::Ptr &newEntry) |
virtual KSycocaEntry::List | allEntries () const |
virtual KSycocaEntry * | createEntry (const QString &file, const char *resource) const =0 |
virtual KSycocaEntry * | createEntry (int offset) const =0 |
KSycocaEntryDict * | entryDict () |
virtual KSycocaFactoryId | factoryId () const =0 |
bool | isEmpty () const |
int | offset () const |
void | removeEntry (const QString &entryName) |
const KSycocaResourceList * | resourceList () const |
virtual void | save (QDataStream &str) |
virtual void | saveHeader (QDataStream &str) |
const KSycocaDict * | sycocaDict () const |
Protected Member Functions | |
KSycocaFactory (KSycocaFactoryId factory_id) | |
QDataStream * | stream () const |
virtual void | virtual_hook (int id, void *data) |
Protected Attributes | |
KSycocaEntryDict * | m_entryDict |
KSycocaResourceList * | m_resourceList |
Related Functions | |
(Note that these are not member functions.) | |
enum | KSycocaFactoryId |
Detailed Description
Base class for sycoca factories
Definition at line 36 of file ksycocafactory.h.
Constructor & Destructor Documentation
|
explicitprotected |
Create a factory which can be used to lookup from/create a database (depending on KSycoca::isBuilding())
Definition at line 50 of file ksycocafactory.cpp.
|
virtual |
Definition at line 80 of file ksycocafactory.cpp.
Member Function Documentation
|
virtual |
Add an entry.
Definition at line 146 of file ksycocafactory.cpp.
|
virtual |
Get a list of all entries from the database.
Definition at line 183 of file ksycocafactory.cpp.
|
pure virtual |
Construct an entry from a config file.
To be implemented in the real factories.
Implemented in KProtocolInfoFactory, KServiceTypeFactory, KServiceFactory, KMimeTypeFactory, and KServiceGroupFactory.
|
pure virtual |
Read an entry from the database.
Implemented in KServiceFactory, KMimeTypeFactory, KProtocolInfoFactory, KServiceTypeFactory, and KServiceGroupFactory.
|
inline |
- Returns
- the dict, for special use by KBuildSycoca
Definition at line 59 of file ksycocafactory.h.
|
pure virtual |
bool KSycocaFactory::isEmpty | ( | ) | const |
- Returns
- true if the factory is completely empty - no entries defined
Definition at line 236 of file ksycocafactory.cpp.
int KSycocaFactory::offset | ( | ) | const |
- Returns
- the position of the factory in the sycoca file
Definition at line 221 of file ksycocafactory.cpp.
void KSycocaFactory::removeEntry | ( | const QString & | entryName | ) |
Remove all entries with the given name.
Not very fast (O(N)), use with care.
Definition at line 172 of file ksycocafactory.cpp.
const KSycocaResourceList * KSycocaFactory::resourceList | ( | ) | const |
- Returns
- the resources for which this factory is responsible.
to kbuildsycoca
Definition at line 226 of file ksycocafactory.cpp.
|
virtual |
Saves all entries it maintains as well as index files for these entries to the stream 'str'.
Also sets mOffset to the starting position.
The stream is positioned at the end of the last index.
Don't forget to call the parent first when you override this function.
Definition at line 97 of file ksycocafactory.cpp.
|
virtual |
Writes out a header to the stream 'str'.
The baseclass positions the stream correctly.
Don't forget to call the parent first when you override this function.
Definition at line 87 of file ksycocafactory.cpp.
|
protected |
Definition at line 241 of file ksycocafactory.cpp.
const KSycocaDict * KSycocaFactory::sycocaDict | ( | ) | const |
- Returns
- the sycoca dict, for factories to find entries by name.
Definition at line 231 of file ksycocafactory.cpp.
|
protectedvirtual |
Virtual hook, used to add new "virtual" functions while maintaining binary compatibility.
Unused in this class.
Reimplemented in KServiceFactory, KProtocolInfoFactory, KServiceTypeFactory, and KServiceGroupFactory.
Definition at line 246 of file ksycocafactory.cpp.
Friends And Related Function Documentation
|
related |
A KSycocaFactoryId is a code (out of the KSycocaFactoryId enum) assigned to each class type derived from KSycocaFactory. To use it, call the macro K_SYCOCAFACTORY( your_factory_id ) at the top of your class definition.
Definition at line 44 of file ksycocatype.h.
Member Data Documentation
|
protected |
Definition at line 130 of file ksycocafactory.h.
|
protected |
Definition at line 129 of file ksycocafactory.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:47:11 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.