4 This file is part of GammaRay, the Qt application inspection and
7 Copyright (C) 2011 Klarälvdalens Datakonsult AB, a KDAB Group company, info@kdab.com
8 Author: Volker Krause <volker.krause@kdab.com>
10 This program is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation, either version 2 of the License, or
13 (at your option) any later version.
15 This program is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with this program. If not, see <http://www.gnu.org/licenses/>.
24 #ifndef GAMMARAY_METAOBJECTREPOSITORY_H
25 #define GAMMARAY_METAOBJECTREPOSITORY_H
36 * Repository of compile-time introspection information for stuff
37 * not covered by the Qt meta object system.
39 class MetaObjectRepository
42 ~MetaObjectRepository();
44 /** Singleton accessor. */
45 static MetaObjectRepository
*instance();
48 * Adds object type information to the repository.
50 void addMetaObject(MetaObject
*mo
);
53 * Returns the introspection information for the type with the given name.
55 MetaObject
*metaObject(const QString
&typeName
) const;
58 * Returns whether a meta object is known for the given type name.
60 bool hasMetaObject(const QString
&typeName
) const;
63 MetaObjectRepository();
66 void initBuiltInTypes();
67 void initQObjectTypes();
68 void initGraphicsViewTypes();
71 QHash
<QString
, MetaObject
*> m_metaObjects
;
76 #endif // GAMMARAY_METAOBJECTREPOSITORY_H