KVIrc  4.9.2
DeveloperAPIs
KviKvsTreeNodeData.h
Go to the documentation of this file.
1 #ifndef _KVI_KVS_TREENODE_DATA_H_
2 #define _KVI_KVS_TREENODE_DATA_H_
3 //=============================================================================
4 //
5 // File : KviKvsTreeNodeData.h
6 // Creation date : Sun 05 Oct 2003 21.42 CEST by Szymon Stefanek
7 //
8 // This file is part of the KVIrc IRC client distribution
9 // Copyright (C) 2003-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 "KviKvsTreeNodeBase.h"
28 #include "KviKvsVariant.h"
29 #include "KviKvsRunTimeContext.h"
31 
32 class KviKvsObject;
33 
35 {
36 public:
37  KviKvsTreeNodeData(const QChar * pLocation);
39 
40 protected:
41  const QChar * m_pEndingLocation; // note that this MIGHT be not set (it's set for sure for anything parsed by parseCommaSeparatedParameter()
42 public:
43  void setEndingLocation(const QChar * pEndingLocation) { m_pEndingLocation = pEndingLocation; };
44  const QChar * endingLocation() { return m_pEndingLocation; };
45 
46  virtual bool evaluateReadOnly(KviKvsRunTimeContext * c, KviKvsVariant * pBuffer);
47  virtual KviKvsRWEvaluationResult * evaluateReadWrite(KviKvsRunTimeContext * c); // error by default
48 
49  virtual bool evaluateReadOnlyInObjectScope(KviKvsObject * o, KviKvsRunTimeContext * c, KviKvsVariant * pBuffer); // error by default
50  virtual KviKvsRWEvaluationResult * evaluateReadWriteInObjectScope(KviKvsObject * o, KviKvsRunTimeContext * c); // error by default
51 
52  virtual void contextDescription(QString & szBuffer);
53  virtual void dump(const char * prefix);
54 
55  virtual bool isReadOnly(); // true by default
56  virtual bool canEvaluateToObjectReference(); // no by default
57  virtual bool isFunctionCall(); // no by default
58  virtual bool canEvaluateInObjectScope(); // no by default
59 
60  virtual bool convertStringConstantToNumeric(); // this does nothing by default and is reimplemented only by KviKvsTreeNodeConstantData
61 };
62 
63 #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
Treenode handling.
Definition: KviKvsObject.h:50
virtual void dump(const char *prefix)=0
Dumps the tree.
const QChar * endingLocation()
Definition: KviKvsTreeNodeData.h:44
void setEndingLocation(const QChar *pEndingLocation)
Definition: KviKvsTreeNodeData.h:43
virtual void contextDescription(QString &szBuffer)=0
Sets the buffer.
Definition: KviKvsRunTimeContext.h:103
#define o
Definition: detector.cpp:79
Handling of variant data type in KVS.
Definition: KviKvsTreeNodeData.h:34
char szBuffer[4096]
Definition: winamp.cpp:77
const QChar * m_pEndingLocation
Definition: KviKvsTreeNodeData.h:41
Definition: KviKvsRWEvaluationResult.h:30