KVIrc  4.9.2
DeveloperAPIs
KviKvsTreeNodeSpecialCommandSwitch.h
Go to the documentation of this file.
1 #ifndef _KVI_KVS_TREENODE_SPECIALCOMMANDSWITCH_H_
2 #define _KVI_KVS_TREENODE_SPECIALCOMMANDSWITCH_H_
3 //=============================================================================
4 //
5 // File : KviKvsTreeNodeSpecialCommandSwitch.h
6 // Creation date : Fri 02 Jan 2004 13:54:00 by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2004-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 #include "KviKvsTreeNode.h"
31 
35 class KviKvsVariant;
36 
38 {
39 public:
40  KviKvsTreeNodeSpecialCommandSwitchLabel(const QChar * pLocation);
42 
43 protected:
47 
48 public:
49  void setParameter(KviKvsTreeNodeData * pParameter);
50  void setInstruction(KviKvsTreeNodeInstruction * pInstruction);
51  void setTerminatingBreak(bool b) { m_bHasTerminatingBreak = b; };
52  virtual bool execute(KviKvsRunTimeContext * c, KviKvsVariant * pRealParameter, bool * bPassThrough) = 0;
53 };
54 
56 {
57 public:
58  KviKvsTreeNodeSpecialCommandSwitchLabelCase(const QChar * pLocation);
60 
61 public:
62  virtual void contextDescription(QString & szBuffer);
63  virtual void dump(const char * prefix);
64  virtual bool execute(KviKvsRunTimeContext * c, KviKvsVariant * pRealParameter, bool * bPassThrough);
65 };
66 
68 {
69 public:
70  KviKvsTreeNodeSpecialCommandSwitchLabelMatch(const QChar * pLocation);
72 
73 public:
74  virtual void contextDescription(QString & szBuffer);
75  virtual void dump(const char * prefix);
76  virtual bool execute(KviKvsRunTimeContext * c, KviKvsVariant * pRealParameter, bool * bPassThrough);
77 };
78 
80 {
81 public:
82  KviKvsTreeNodeSpecialCommandSwitchLabelRegexp(const QChar * pLocation);
84 
85 public:
86  virtual void contextDescription(QString & szBuffer);
87  virtual void dump(const char * prefix);
88  virtual bool execute(KviKvsRunTimeContext * c, KviKvsVariant * pRealParameter, bool * bPassThrough);
89 };
90 
92 {
93 public:
94  KviKvsTreeNodeSpecialCommandSwitchLabelDefault(const QChar * pLocation);
96 
97 public:
98  virtual void dump(const char * prefix);
99  virtual void contextDescription(QString & szBuffer);
100  virtual bool execute(KviKvsRunTimeContext * c, KviKvsVariant * pRealParameter, bool * bPassThrough);
101 };
102 
104 {
105 public:
108 
109 private:
112 public:
114  bool isEmpty() { return m_pLabels->isEmpty(); };
115  virtual void contextDescription(QString & szBuffer);
116  virtual void dump(const char * prefix);
117  virtual bool execute(KviKvsRunTimeContext * c);
118 };
119 
120 #endif
Treenode class.
Definition: KviKvsTreeNodeBase.h:40
This class defines a new data type which contains variant data.
Definition: KviKvsVariant.h:351
#define KVIRC_API
Definition: kvi_settings.h:128
char s char s char s s s s s char char c s *s c s s s d c s *s d c d d d d c
Definition: KviIrcNumericCodes.h:391
#define l
Definition: detector.cpp:76
virtual bool execute(KviKvsRunTimeContext *c, KviKvsVariant *pRealParameter, bool *bPassThrough)=0
virtual void dump(const char *prefix)=0
Dumps the tree.
#define e
Definition: detector.cpp:69
Definition: KviKvsTreeNodeSpecialCommandSwitch.h:67
KviKvsTreeNodeData * m_pParameter
Definition: KviKvsTreeNodeSpecialCommandSwitch.h:44
bool isEmpty()
Definition: KviKvsTreeNodeSpecialCommandSwitch.h:114
Definition: KviKvsTreeNodeExpression.h:67
Definition: KviKvsTreeNodeSpecialCommandSwitch.h:37
Treenode class to handle instructions.
Definition: KviKvsTreeNodeInstruction.h:42
Treenode instruction handling.
Definition: KviKvsTreeNodeSpecialCommand.h:31
virtual void contextDescription(QString &szBuffer)=0
Sets the buffer.
KviKvsTreeNodeInstruction * m_pInstruction
Definition: KviKvsTreeNodeSpecialCommandSwitch.h:45
Definition: KviKvsRunTimeContext.h:103
void setTerminatingBreak(bool b)
Definition: KviKvsTreeNodeSpecialCommandSwitch.h:51
KviPointerList< KviKvsTreeNodeSpecialCommandSwitchLabel > * m_pLabels
Definition: KviKvsTreeNodeSpecialCommandSwitch.h:111
virtual bool execute(KviKvsRunTimeContext *c)=0
This is the main entry point to the tree visit.
Definition: KviKvsTreeNodeSpecialCommandSwitch.h:91
Definition: KviKvsTreeNodeSpecialCommandSwitch.h:79
Definition: KviKvsTreeNodeSpecialCommandSwitch.h:103
Definition: KviKvsTreeNodeData.h:34
char szBuffer[4096]
Definition: winamp.cpp:77
This file contains compile time settings.
virtual void contextDescription(QString &szBuffer)
Sets the buffer as Instruction.
Definition: KviKvsTreeNodeSpecialCommand.cpp:35
KviKvsTreeNodeExpression * m_pExpression
Definition: KviKvsTreeNodeSpecialCommandSwitch.h:110
Definition: KviKvsTreeNodeSpecialCommandSwitch.h:55
bool m_bHasTerminatingBreak
Definition: KviKvsTreeNodeSpecialCommandSwitch.h:46
Helper functions for the QString class.
virtual void dump(const char *prefix)
Dumps the instructions tree.
Definition: KviKvsTreeNodeSpecialCommand.cpp:42