File indexing completed on 2024-03-24 04:38:35
0001 /* 0002 * XDebug-specific Variable 0003 * 0004 * Copyright 2009 Vladimir Prus <ghost@cs.msu.su> 0005 * Copyright 2009 Niko Sams <niko.sams@gmail.com> 0006 * 0007 * This program is free software; you can redistribute it and/or modify 0008 * it under the terms of the GNU General Public License as 0009 * published by the Free Software Foundation; either version 2 of the 0010 * License, or (at your option) any later version. 0011 * 0012 * This program is distributed in the hope that it will be useful, 0013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 0014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 0015 * GNU General Public License for more details. 0016 * 0017 * You should have received a copy of the GNU General Public 0018 * License along with this program; if not, write to the 0019 * Free Software Foundation, Inc., 0020 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 0021 */ 0022 0023 #ifndef XDEBUGVARIABLE_H 0024 #define XDEBUGVARIABLE_H 0025 0026 #include <QMap> 0027 0028 #include <debugger/variable/variablecollection.h> 0029 0030 class QDomElement; 0031 0032 namespace XDebug { 0033 class PropertyGetCallback; 0034 class Variable 0035 : public KDevelop::Variable 0036 { 0037 public: 0038 Variable(KDevelop::TreeModel* model, KDevelop::TreeItem* parent, 0039 const QString& expression, 0040 const QString& display = ""); 0041 0042 ~Variable() override; 0043 0044 public: // Variable overrides 0045 void attachMaybe(QObject* callback = nullptr, const char* callbackMethod = nullptr) override; 0046 void fetchMoreChildren() override; 0047 0048 protected: 0049 QString fullName() const; 0050 0051 private: // Internal 0052 friend class PropertyGetCallback; 0053 friend class VariableController; 0054 0055 void handleProperty(const QDomElement& xml); 0056 0057 QString m_fullName; 0058 }; 0059 } 0060 0061 #endif