KVIrc  4.9.2
DeveloperAPIs
KviKvsObjectFunctionHandler.h
Go to the documentation of this file.
1 #ifndef _KVI_KVS_OBJECT_FUNCTIONHANDLER_H_
2 #define _KVI_KVS_OBJECT_FUNCTIONHANDLER_H_
3 //=============================================================================
4 //
5 // File : KviKvsObjectFunctionHandler.h
6 // Creation date : Sat 23 Apr 2005 21:53:23 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 #include "KviQString.h"
29 
30 class KviKvsObjectClass;
32 class KviKvsObject;
33 
35 {
36  friend class KviKvsObject;
37  friend class KviKvsObjectClass;
38 
39 public:
40  enum Flags
41  {
42  Internal = 1
43  };
44 
45 protected:
46  unsigned int m_uFlags;
47  bool m_bClone;
48 
49 protected:
50  KviKvsObjectFunctionHandler(unsigned int uFlags = 0);
51 
52 public:
53  virtual ~KviKvsObjectFunctionHandler();
54 
55 public:
56  void setClone(bool bCl) { m_bClone = bCl; };
57  bool isClone();
58  unsigned int flags() { return m_uFlags; };
59 protected:
60  virtual bool isScriptHandler();
61  virtual QString scriptHandlerCode();
62  virtual QString reminder();
63  virtual void setReminder(const QString & szReminder);
64  virtual KviKvsObjectFunctionHandler * clone() = 0;
65  virtual bool call(KviKvsObject * pObject, KviKvsObjectFunctionCall * pCall) = 0;
66 };
67 
68 #endif
bool isScriptHandler(const QString &szFunctionName)
Definition: KviKvsObjectClass.h:79
void setReminder(const QString &szReminder, KviKvsObjectFunctionHandler *h)
Definition: KviKvsObjectClass.cpp:220
#define KVIRC_API
Definition: kvi_settings.h:128
Definition: KviKvsObjectFunctionCall.h:33
Definition: KviKvsObject.h:50
unsigned int m_uFlags
Definition: KviKvsObjectFunctionHandler.h:46
Definition: KviKvsObjectClass.h:49
unsigned int flags()
Definition: KviKvsObjectFunctionHandler.h:58
QString reminder(KviKvsObjectFunctionHandler *h)
Definition: KviKvsObjectClass.cpp:224
bool m_bClone
Definition: KviKvsObjectFunctionHandler.h:47
void setClone(bool bCl)
Definition: KviKvsObjectFunctionHandler.h:56
Flags
Definition: KviKvsObjectFunctionHandler.h:40
This file contains compile time settings.
Helper functions for the QString class.
Definition: KviKvsObjectFunctionHandler.h:34