KVIrc  4.9.2
DeveloperAPIs
KviKvsObjectController.h
Go to the documentation of this file.
1 #ifndef _KVI_KVS_OBJECT_CONTROLLER_H_
2 #define _KVI_KVS_OBJECT_CONTROLLER_H_
3 //=============================================================================
4 //
5 // File : KviKvsObjectController.h
6 // Creation date : Sun 24 Apr 2005 05:23:04 by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2005-2010 Szymon Stefanek <pragma at kvirc dot net>
10 //
11 // This program is FREE software. You can redistribute it and/or
12 // modify it under the terms of the GNU General Public License
13 // as published by the Free Software Foundation; either version 2
14 // of the License, or (at your option) any later version.
15 //
16 // This program is distributed in the HOPE that it will be USEFUL,
17 // but WITHOUT ANY WARRANTY; without even the implied warranty of
18 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19 // See the GNU General Public License for more details.
20 //
21 // You should have received a copy of the GNU General Public License
22 // along with this program. If not, write to the Free Software Foundation,
23 // Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 //
25 //=============================================================================
26 
27 #include "kvi_settings.h"
28 
29 #include "KviQString.h"
30 #include "KviPointerList.h"
31 
32 #include "KviPointerHashTable.h"
33 
34 #include "KviKvsObject.h"
35 #include "KviKvsObjectClass.h"
36 
38 {
39  friend class KviKvsObject;
40  friend class KviKvsObjectClass;
41 
42 public:
45 
46 protected:
51 protected:
52  // the classes and the objects register themselves with the controller
53  void registerObject(KviKvsObject * pObject);
54  void unregisterObject(KviKvsObject * pObject);
55  void registerClass(KviKvsObjectClass * pClass);
56  void unregisterClass(KviKvsObjectClass * pClass);
57 
58 public:
59  void init();
60  void deleteClass(KviKvsObjectClass * pClass);
61  void clearInstances();
62  void clearUserClasses();
63  void flushUserClasses();
64  void killAllObjectsWithClass(KviKvsObjectClass * pClass);
65  KviKvsObjectClass * lookupClass(const QString & szClass, bool bBuiltinOnly = false);
66  KviKvsObject * lookupObject(kvs_hobject_t hObject) { return m_pObjectDict->find(hObject); };
69 };
70 
71 #endif
KviKvsObjectClass * m_pObjectClass
Definition: KviKvsObjectController.h:50
#define KVIRC_API
Definition: kvi_settings.h:128
void flushUserClasses()
Definition: KviKvs.cpp:137
Definition: KviKvsObjectController.h:37
KviPointerHashTable< QString, KviKvsObjectClass > * m_pClassDict
Definition: KviKvsObjectController.h:49
Definition: KviKvsObject.h:50
Definition: KviKvsObjectClass.h:49
Pointer Hash Table.
KviPointerHashTable< void *, KviKvsObject > * objectDict()
Definition: KviKvsObjectController.h:67
KviPointerHashTable< void *, KviKvsObject > * m_pObjectDict
Definition: KviKvsObjectController.h:48
friend class KviKvsObjectController
Definition: KviKvsObjectClass.h:52
C++ Template based double linked pointer list class.
KviPointerList< KviKvsObject > * m_pTopLevelObjectList
Definition: KviKvsObjectController.h:47
KviKvsObject * lookupObject(kvs_hobject_t hObject)
Definition: KviKvsObjectController.h:66
void * kvs_hobject_t
Definition: KviKvsTypes.h:32
KviPointerHashTable< QString, KviKvsObjectClass > * classDict()
Definition: KviKvsObjectController.h:68
int init()
Definition: winamp.cpp:118
This file contains compile time settings.
Helper functions for the QString class.