• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

KDECore

KSycocaFactory Class Reference

#include <ksycocafactory.h>

Inheritance diagram for KSycocaFactory:

Inheritance graph
[legend]

List of all members.


Public Member Functions

virtual void addEntry (KSycocaEntry *newEntry, const char *resource)
KSycocaEntry::List allEntries ()
virtual KSycocaEntry * createEntry (int offset)=0
virtual KSycocaEntry * createEntry (const QString &file, const char *resource)=0
KSycocaEntryDict * entryDict ()
virtual KSycocaFactoryId factoryId () const =0
int offset ()
void removeEntry (KSycocaEntry *newEntry)
virtual const KSycocaResourceList * resourceList () const
virtual void save (QDataStream &str)
virtual void saveHeader (QDataStream &str)
virtual ~KSycocaFactory ()

Protected Member Functions

 KSycocaFactory (KSycocaFactoryId factory_id)
virtual void virtual_hook (int id, void *data)

Protected Attributes

int m_beginEntryOffset
int m_endEntryOffset
KSycocaEntryDict * m_entryDict
KSycocaResourceList * m_resourceList
QDataStream * m_str
KSycocaDict * m_sycocaDict
int m_sycocaDictOffset

Related Functions

(Note that these are not member functions.)

enum  KSycocaFactoryId

Detailed Description

For internal use only.

Base class for sycoca factories

Definition at line 39 of file ksycocafactory.h.


Constructor & Destructor Documentation

KSycocaFactory::KSycocaFactory ( KSycocaFactoryId  factory_id  )  [protected]

Create a factory which can be used to lookup from/create a database (depending on KSycoca::isBuilding()).

Definition at line 31 of file ksycocafactory.cpp.

KSycocaFactory::~KSycocaFactory (  )  [virtual]

Definition at line 71 of file ksycocafactory.cpp.


Member Function Documentation

void KSycocaFactory::addEntry ( KSycocaEntry *  newEntry,
const char *  resource 
) [virtual]

Add an entry.

Definition at line 140 of file ksycocafactory.cpp.

KSycocaEntry::List KSycocaFactory::allEntries (  ) 

Get a list of all entries from the database.

Definition at line 165 of file ksycocafactory.cpp.

virtual KSycocaEntry* KSycocaFactory::createEntry ( int  offset  )  [pure virtual]

Read an entry from the database.

Implemented in KProtocolInfoFactory.

virtual KSycocaEntry* KSycocaFactory::createEntry ( const QString &  file,
const char *  resource 
) [pure virtual]

Construct an entry from a config file.

To be implemented in the real factories.

Implemented in KProtocolInfoFactory.

KSycocaEntryDict* KSycocaFactory::entryDict (  )  [inline]

Returns:
the dict, for special use by KBuildSycoca

Definition at line 62 of file ksycocafactory.h.

virtual KSycocaFactoryId KSycocaFactory::factoryId (  )  const [pure virtual]

int KSycocaFactory::offset (  )  [inline]

Returns:
the position of the factory in the sycoca file

Definition at line 57 of file ksycocafactory.h.

void KSycocaFactory::removeEntry ( KSycocaEntry *  newEntry  ) 

Remove an entry Not very fast, use with care.

O(N)

Definition at line 153 of file ksycocafactory.cpp.

virtual const KSycocaResourceList* KSycocaFactory::resourceList (  )  const [inline, virtual]

Returns:
the resources for which this factory is responsible.

Definition at line 116 of file ksycocafactory.h.

void KSycocaFactory::save ( QDataStream &  str  )  [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 88 of file ksycocafactory.cpp.

void KSycocaFactory::saveHeader ( QDataStream &  str  )  [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 78 of file ksycocafactory.cpp.

void KSycocaFactory::virtual_hook ( int  id,
void *  data 
) [protected, virtual]

Reimplemented in KProtocolInfoFactory.

Definition at line 200 of file ksycocafactory.cpp.


Friends And Related Function Documentation

enum KSycocaFactoryId [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 50 of file ksycocatype.h.


Member Data Documentation

int KSycocaFactory::m_beginEntryOffset [protected]

Definition at line 123 of file ksycocafactory.h.

int KSycocaFactory::m_endEntryOffset [protected]

Definition at line 124 of file ksycocafactory.h.

KSycocaEntryDict* KSycocaFactory::m_entryDict [protected]

Definition at line 128 of file ksycocafactory.h.

KSycocaResourceList* KSycocaFactory::m_resourceList [protected]

Definition at line 127 of file ksycocafactory.h.

QDataStream* KSycocaFactory::m_str [protected]

Definition at line 125 of file ksycocafactory.h.

KSycocaDict* KSycocaFactory::m_sycocaDict [protected]

Definition at line 129 of file ksycocafactory.h.

int KSycocaFactory::m_sycocaDictOffset [protected]

Definition at line 122 of file ksycocafactory.h.


The documentation for this class was generated from the following files:
  • ksycocafactory.h
  • ksycocatype.h
  • ksycocafactory.cpp

KDECore

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

API Reference

Skip menu "API Reference"
  • dcop
  • DNSSD
  • interfaces
  • Kate
  • kconf_update
  • KDECore
  • KDED
  • kdefx
  • KDEsu
  • kdeui
  • KDocTools
  • KHTML
  • KImgIO
  • KInit
  • kio
  • kioslave
  • KJS
  • KNewStuff
  • KParts
  • KUtils
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal