]>
vaikene.ee Git - evaf/blob - Common/registry.h
2 * @file Common/registry.h
3 * @brief Common registry implementation
6 * Copyright (c) 2011 Enar Vaikene
8 * This file is part of the eVaf C++ cross-platform application development framework.
10 * This file can be used under the terms of the GNU General Public License
11 * version 3.0 as published by the Free Software Foundation and appearing in
12 * the file LICENSE included in the packaging of this file. Please review the
13 * the following information to ensure the GNU General Public License version
14 * 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html.
16 * Alternatively, this file may be used in accordance with the Commercial License
17 * Agreement provided with the Software.
20 #ifndef __COMMON_REGISTRY_H
21 #define __COMMON_REGISTRY_H
23 #include "iregistry.h"
35 * iRegistry interface implementation.
37 * This class implements the global registry for interfaces. Interfaces are stored in a QHash container
38 * and quarded with QPointer.
40 class Registry
: public iRegistry
54 virtual bool registerInterface(QString
const & name
, QObject
* obj
);
56 virtual QObject
* queryInterface(QString
const & name
) const;
61 /// All the registered interfaces
62 QHash
<QString
, QPointer
<QObject
> > mInterfaces
;
66 } // namespace eVaf::Common::Internal
67 } // namespace eVaf::Common