]>
vaikene.ee Git - evaf/blob - src/libs/Common/globals.cpp
5054bd1e05c71f1d4d8093277e564d7b3240a67f
2 * @file Common/globals.cpp
3 * @brief Global constants and macros for eVaf
6 * Copyright (c) 2011-2012 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.
28 #include <QCoreApplication>
31 //-------------------------------------------------------------------
33 bool eVaf::Common::init()
35 if (QCoreApplication::instance() == 0) {
36 EVAF_FATAL_ERROR("QApplication is not instantiated");
40 EVAF_INFO("Initializing %s-Globals", VER_MODULE_NAME_STR
);
42 // Initialize all the common interface implementations in the proper sequence
44 eVaf::Common::Internal::App
* app
=
45 qobject_cast
<eVaf::Common::Internal::App
*>(eVaf::Common::iApp::instance());
50 eVaf::Common::Internal::Config
* config
=
51 qobject_cast
<eVaf::Common::Internal::Config
*>(eVaf::Common::iConfig::instance());
56 eVaf::Common::Internal::Prop
* prop
=
57 qobject_cast
<eVaf::Common::Internal::Prop
*>(eVaf::Common::iProp::instance());
62 eVaf::Common::Internal::Logger
* logger
=
63 qobject_cast
<eVaf::Common::Internal::Logger
*>(eVaf::Common::iLogger::instance());
69 EVAF_INFO("%s-Globals initialized", VER_MODULE_NAME_STR
);