parent
ccad7a42d9
commit
57e2ced52b
@ -1,38 +0,0 @@
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN
|
||||
"http://www.w3.org/TR/html4/loose.dtd"">
|
||||
<html>
|
||||
<head>
|
||||
<title>kspell globals</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta name="GENERATOR" content="wabbit dumphtml">
|
||||
</head>
|
||||
<body>
|
||||
<h4>PyKDE - Python Bindings for KDE</h4>
|
||||
<hr>
|
||||
<table width="100%"><tr>
|
||||
<td width ="70%">
|
||||
<h1>kspell Globals</h1><hr>
|
||||
</td>
|
||||
<td width="30%" valign="top" align="right">
|
||||
<table>
|
||||
<tr><td align="right"><a href="doc/index.html">Table of contents</a></td></tr>
|
||||
<tr><td align="right"><a href="../index.html">Modules</a></td></tr>
|
||||
<tr><td align="right"><a href="index.html">kspell Classes</a></td></tr>
|
||||
<tr><td align="right"><a href="../allclasses.html">All Classes</a></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr></table>
|
||||
<h3>enums</h3><ul>
|
||||
<li><b><a href="sip/kspell/all-globals.html#Encoding">Encoding</a></b> = {KS_E_ASCII, KS_E_LATIN1, KS_E_LATIN2, KS_E_LATIN3, KS_E_LATIN4, KS_E_LATIN5, KS_E_LATIN7, KS_E_LATIN8, KS_E_LATIN9, KS_E_LATIN13, KS_E_LATIN15, KS_E_UTF8, KS_E_KOI8R, KS_E_KOI8U, KS_E_CP1251, KS_E_CP1255
|
||||
}<li><b><a href="sip/kspell/all-globals.html#Encoding">Encoding</a></b> = {KS_E_ASCII, KS_E_LATIN1, KS_E_LATIN2, KS_E_LATIN3, KS_E_LATIN4, KS_E_LATIN5, KS_E_LATIN7, KS_E_LATIN8, KS_E_LATIN9, KS_E_LATIN13, KS_E_LATIN15, KS_E_UTF8, KS_E_KOI8R, KS_E_KOI8U, KS_E_CP1251
|
||||
}<li><b><a href="sip/kspell/all-globals.html#Encoding">Encoding</a></b> = {KS_E_ASCII, KS_E_LATIN1, KS_E_LATIN2, KS_E_LATIN3, KS_E_LATIN4, KS_E_LATIN5, KS_E_LATIN7, KS_E_LATIN8, KS_E_LATIN9, KS_E_LATIN15, KS_E_UTF8, KS_E_KOI8R, KS_E_KOI8U, KS_E_CP1251, KS_E_LATIN13
|
||||
}<li><b><a href="sip/kspell/all-globals.html#KS_RESULT">KS_RESULT</a></b> = {KS_CANCEL, KS_REPLACE, KS_REPLACEALL, KS_IGNORE, KS_IGNOREALL, KS_ADD, KS_STOP, KS_SUGGEST, KS_CONFIG
|
||||
}<li><b><a href="sip/kspell/all-globals.html#KS_RESULT">KS_RESULT</a></b> = {KS_CANCEL, KS_REPLACE, KS_REPLACEALL, KS_IGNORE, KS_IGNOREALL, KS_ADD, KS_STOP
|
||||
}<li><b><a href="sip/kspell/all-globals.html#KSpellClients">KSpellClients</a></b> = {KS_CLIENT_ISPELL, KS_CLIENT_ASPELL, KS_CLIENT_HSPELL, KS_CLIENT_ZEMBEREK
|
||||
}<li><b><a href="sip/kspell/all-globals.html#KSpellClients">KSpellClients</a></b> = {KS_CLIENT_ISPELL, KS_CLIENT_ASPELL, KS_CLIENT_HSPELL
|
||||
}<li><b><a href="sip/kspell/all-globals.html#KSpellClients">KSpellClients</a></b> = {KS_CLIENT_ISPELL, KS_CLIENT_ASPELL
|
||||
}</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
@ -0,0 +1,38 @@
|
||||
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN
|
||||
"http://www.w3.org/TR/html4/loose.dtd"">
|
||||
<html>
|
||||
<head>
|
||||
<title>tdespell globals</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<meta name="GENERATOR" content="wabbit dumphtml">
|
||||
</head>
|
||||
<body>
|
||||
<h4>PyKDE - Python Bindings for KDE</h4>
|
||||
<hr>
|
||||
<table width="100%"><tr>
|
||||
<td width ="70%">
|
||||
<h1>tdespell Globals</h1><hr>
|
||||
</td>
|
||||
<td width="30%" valign="top" align="right">
|
||||
<table>
|
||||
<tr><td align="right"><a href="doc/index.html">Table of contents</a></td></tr>
|
||||
<tr><td align="right"><a href="../index.html">Modules</a></td></tr>
|
||||
<tr><td align="right"><a href="index.html">tdespell Classes</a></td></tr>
|
||||
<tr><td align="right"><a href="../allclasses.html">All Classes</a></td></tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr></table>
|
||||
<h3>enums</h3><ul>
|
||||
<li><b><a href="sip/tdespell/all-globals.html#Encoding">Encoding</a></b> = {KS_E_ASCII, KS_E_LATIN1, KS_E_LATIN2, KS_E_LATIN3, KS_E_LATIN4, KS_E_LATIN5, KS_E_LATIN7, KS_E_LATIN8, KS_E_LATIN9, KS_E_LATIN13, KS_E_LATIN15, KS_E_UTF8, KS_E_KOI8R, KS_E_KOI8U, KS_E_CP1251, KS_E_CP1255
|
||||
}<li><b><a href="sip/tdespell/all-globals.html#Encoding">Encoding</a></b> = {KS_E_ASCII, KS_E_LATIN1, KS_E_LATIN2, KS_E_LATIN3, KS_E_LATIN4, KS_E_LATIN5, KS_E_LATIN7, KS_E_LATIN8, KS_E_LATIN9, KS_E_LATIN13, KS_E_LATIN15, KS_E_UTF8, KS_E_KOI8R, KS_E_KOI8U, KS_E_CP1251
|
||||
}<li><b><a href="sip/tdespell/all-globals.html#Encoding">Encoding</a></b> = {KS_E_ASCII, KS_E_LATIN1, KS_E_LATIN2, KS_E_LATIN3, KS_E_LATIN4, KS_E_LATIN5, KS_E_LATIN7, KS_E_LATIN8, KS_E_LATIN9, KS_E_LATIN15, KS_E_UTF8, KS_E_KOI8R, KS_E_KOI8U, KS_E_CP1251, KS_E_LATIN13
|
||||
}<li><b><a href="sip/tdespell/all-globals.html#KS_RESULT">KS_RESULT</a></b> = {KS_CANCEL, KS_REPLACE, KS_REPLACEALL, KS_IGNORE, KS_IGNOREALL, KS_ADD, KS_STOP, KS_SUGGEST, KS_CONFIG
|
||||
}<li><b><a href="sip/tdespell/all-globals.html#KS_RESULT">KS_RESULT</a></b> = {KS_CANCEL, KS_REPLACE, KS_REPLACEALL, KS_IGNORE, KS_IGNOREALL, KS_ADD, KS_STOP
|
||||
}<li><b><a href="sip/tdespell/all-globals.html#KSpellClients">KSpellClients</a></b> = {KS_CLIENT_ISPELL, KS_CLIENT_ASPELL, KS_CLIENT_HSPELL, KS_CLIENT_ZEMBEREK
|
||||
}<li><b><a href="sip/tdespell/all-globals.html#KSpellClients">KSpellClients</a></b> = {KS_CLIENT_ISPELL, KS_CLIENT_ASPELL, KS_CLIENT_HSPELL
|
||||
}<li><b><a href="sip/tdespell/all-globals.html#KSpellClients">KSpellClients</a></b> = {KS_CLIENT_ISPELL, KS_CLIENT_ASPELL
|
||||
}</ul>
|
||||
|
||||
</body>
|
||||
</html>
|
Before Width: | Height: | Size: 71 KiB After Width: | Height: | Size: 71 KiB |
@ -1,137 +0,0 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __ksycocafactory_h__
|
||||
#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $"
|
||||
|
||||
#include "ksycocatype.h"
|
||||
#include "ksycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,137 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __tdesycocafactory_h__
|
||||
#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $"
|
||||
|
||||
#include "tdesycocatype.h"
|
||||
#include "tdesycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -1,137 +0,0 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __ksycocafactory_h__
|
||||
#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $"
|
||||
|
||||
#include "ksycocatype.h"
|
||||
#include "ksycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,137 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __tdesycocafactory_h__
|
||||
#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.13 2002/09/21 15:07:27 tjansen Exp $"
|
||||
|
||||
#include "tdesycocatype.h"
|
||||
#include "tdesycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -1,143 +0,0 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __ksycocafactory_h__
|
||||
#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $"
|
||||
|
||||
#include "ksycocatype.h"
|
||||
#include "ksycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,143 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __tdesycocafactory_h__
|
||||
#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $"
|
||||
|
||||
#include "tdesycocatype.h"
|
||||
#include "tdesycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -1,143 +0,0 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __ksycocafactory_h__
|
||||
#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $"
|
||||
|
||||
#include "ksycocatype.h"
|
||||
#include "ksycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,143 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __tdesycocafactory_h__
|
||||
#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $"
|
||||
|
||||
#include "tdesycocatype.h"
|
||||
#include "tdesycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -1,143 +0,0 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __ksycocafactory_h__
|
||||
#define __ksycocafactory_h__ "$Id: ksycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $"
|
||||
|
||||
#include "ksycocatype.h"
|
||||
#include "ksycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,143 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __tdesycocafactory_h__
|
||||
#define __tdesycocafactory_h__ "$Id: tdesycocafactory.h,v 1.14 2003/10/29 17:59:18 waba Exp $"
|
||||
|
||||
#include "tdesycocatype.h"
|
||||
#include "tdesycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -1,143 +0,0 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __ksycocafactory_h__
|
||||
#define __ksycocafactory_h__
|
||||
|
||||
#include "ksycocatype.h"
|
||||
#include "ksycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,143 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __tdesycocafactory_h__
|
||||
#define __tdesycocafactory_h__
|
||||
|
||||
#include "tdesycocatype.h"
|
||||
#include "tdesycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -1,143 +0,0 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __ksycocafactory_h__
|
||||
#define __ksycocafactory_h__
|
||||
|
||||
#include "ksycocatype.h"
|
||||
#include "ksycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,143 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __tdesycocafactory_h__
|
||||
#define __tdesycocafactory_h__
|
||||
|
||||
#include "tdesycocatype.h"
|
||||
#include "tdesycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -1,143 +0,0 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __ksycocafactory_h__
|
||||
#define __ksycocafactory_h__
|
||||
|
||||
#include "ksycocatype.h"
|
||||
#include "ksycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,143 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __tdesycocafactory_h__
|
||||
#define __tdesycocafactory_h__
|
||||
|
||||
#include "tdesycocatype.h"
|
||||
#include "tdesycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -1,143 +0,0 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __ksycocafactory_h__
|
||||
#define __ksycocafactory_h__
|
||||
|
||||
#include "ksycocatype.h"
|
||||
#include "ksycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -0,0 +1,143 @@
|
||||
/* This file is part of the KDE libraries
|
||||
* Copyright (C) 1999 Waldo Bastian <bastian@kde.org>
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Library General Public
|
||||
* License version 2 as published by the Free Software Foundation;
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Library General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Library General Public License
|
||||
* along with this library; see the file COPYING.LIB. If not, write to
|
||||
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
* Boston, MA 02110-1301, USA.
|
||||
**/
|
||||
|
||||
#ifndef __tdesycocafactory_h__
|
||||
#define __tdesycocafactory_h__
|
||||
|
||||
#include "tdesycocatype.h"
|
||||
#include "tdesycocaentry.h"
|
||||
|
||||
#include <tqdict.h>
|
||||
#include <tqptrlist.h>
|
||||
class KSycoca;
|
||||
class TQStringList;
|
||||
class TQString;
|
||||
class KSycocaDict;
|
||||
class KSycocaResourceList;
|
||||
|
||||
typedef TQDict<KSycocaEntry::Ptr> KSycocaEntryDict;
|
||||
|
||||
/**
|
||||
* @internal
|
||||
* Base class for sycoca factories
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactory
|
||||
{
|
||||
public:
|
||||
virtual KSycocaFactoryId factoryId() const = 0;
|
||||
|
||||
protected: // virtual class
|
||||
/**
|
||||
* Create a factory which can be used to lookup from/create a database
|
||||
* (depending on KSycoca::isBuilding())
|
||||
*/
|
||||
KSycocaFactory( KSycocaFactoryId factory_id );
|
||||
|
||||
public:
|
||||
virtual ~KSycocaFactory();
|
||||
|
||||
/**
|
||||
* @return the position of the factory in the sycoca file
|
||||
*/
|
||||
int offset() { return mOffset; }
|
||||
|
||||
/**
|
||||
* @return the dict, for special use by KBuildSycoca
|
||||
*/
|
||||
KSycocaEntryDict * entryDict() { return m_entryDict; }
|
||||
|
||||
/**
|
||||
* Construct an entry from a config file.
|
||||
* To be implemented in the real factories.
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(const TQString &file, const char *resource) = 0;
|
||||
|
||||
/**
|
||||
* Add an entry
|
||||
*/
|
||||
virtual void addEntry(KSycocaEntry *newEntry, const char *resource);
|
||||
|
||||
/**
|
||||
* Remove an entry
|
||||
* Not very fast, use with care. O(N)
|
||||
*/
|
||||
void removeEntry(KSycocaEntry *newEntry);
|
||||
|
||||
/**
|
||||
* Read an entry from the database
|
||||
*/
|
||||
virtual KSycocaEntry *createEntry(int offset)=0;
|
||||
|
||||
/**
|
||||
* Get a list of all entries from the database.
|
||||
*/
|
||||
KSycocaEntry::List allEntries();
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void save(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* 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.
|
||||
*/
|
||||
virtual void saveHeader(TQDataStream &str);
|
||||
|
||||
/**
|
||||
* @return the resources for which this factory is responsible.
|
||||
*/
|
||||
virtual const KSycocaResourceList * resourceList() const { return m_resourceList; }
|
||||
|
||||
private:
|
||||
int mOffset;
|
||||
|
||||
protected:
|
||||
int m_sycocaDictOffset;
|
||||
int m_beginEntryOffset;
|
||||
int m_endEntryOffset;
|
||||
TQDataStream *m_str;
|
||||
|
||||
KSycocaResourceList *m_resourceList;
|
||||
KSycocaEntryDict *m_entryDict;
|
||||
KSycocaDict *m_sycocaDict;
|
||||
protected:
|
||||
virtual void virtual_hook( int id, void* data );
|
||||
};
|
||||
|
||||
/** This, instead of a typedef, allows to declare "class ..." in header files
|
||||
* @internal
|
||||
*/
|
||||
class TDECORE_EXPORT KSycocaFactoryList : public TQPtrList<KSycocaFactory>
|
||||
{
|
||||
public:
|
||||
KSycocaFactoryList() { }
|
||||
};
|
||||
|
||||
#endif
|
@ -1,3 +0,0 @@
|
||||
- %Include ksconfig.sip
|
||||
- %Include kspell.sip
|
||||
- %Include kspelldlg.sip
|
@ -0,0 +1,3 @@
|
||||
- %Include ksconfig.sip
|
||||
- %Include tdespell.sip
|
||||
- %Include tdespelldlg.sip
|
Loading…
Reference in new issue