Kross
object.h
Go to the documentation of this file.
00001 /*************************************************************************** 00002 * object.h 00003 * This file is part of the KDE project 00004 * copyright (C)2004-2006 by Sebastian Sauer (mail@dipe.org) 00005 * 00006 * This program is free software; you can redistribute it and/or 00007 * modify it under the terms of the GNU Library General Public 00008 * License as published by the Free Software Foundation; either 00009 * version 2 of the License, or (at your option) any later version. 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Library General Public License for more details. 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; see the file COPYING. If not, write to 00016 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00017 * Boston, MA 02110-1301, USA. 00018 ***************************************************************************/ 00019 00020 #ifndef KROSS_OBJECT_H 00021 #define KROSS_OBJECT_H 00022 00023 #include <QtCore/QString> 00024 #include <QtCore/QStringList> 00025 #include <QtCore/QMap> 00026 #include <QtCore/QVariant> 00027 #include <QtCore/QSharedData> 00028 00029 #include "krossconfig.h" 00030 #include "errorinterface.h" 00031 00032 #include <ksharedptr.h> 00033 00034 namespace Kross { 00035 00069 class KROSSCORE_EXPORT Object : public QSharedData, public ErrorInterface 00070 { 00071 public: 00072 00076 typedef KSharedPtr<Object> Ptr; 00077 00081 explicit Object(); 00082 00086 Object(const Object &other); 00087 00091 virtual ~Object(); 00092 00102 virtual QVariant callMethod(const QString& name, 00103 const QVariantList& args = QVariantList()); 00104 00110 virtual QStringList methodNames(); 00111 00116 virtual void virtual_hook(int id, void* ptr); 00117 00118 private: 00120 class Private; 00122 Private* const d; 00123 }; 00124 } 00125 00126 Q_DECLARE_METATYPE(Kross::Object::Ptr) 00127 00128 #endif 00129
KDE 4.6 API Reference