diff --git a/src/common/configrules.cpp b/src/common/configrules.cpp index 15852a05d..18edc4f40 100644 --- a/src/common/configrules.cpp +++ b/src/common/configrules.cpp @@ -24,7 +24,7 @@ #include "common/configrules.hpp" #include "common/query/mockconfigrules.hpp" //#include "common/util.hpp" -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" diff --git a/src/common/multithread.hpp b/src/common/multithread.hpp index ed1d5ebcc..794d4a18d 100644 --- a/src/common/multithread.hpp +++ b/src/common/multithread.hpp @@ -26,7 +26,7 @@ #ifndef LUMIERA_MULTITHREAD_H #define LUMIERA_MULTITHREAD_H -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #include "common/util.hpp" diff --git a/src/common/query.cpp b/src/common/query.cpp index 28dd06a65..10b43e12e 100644 --- a/src/common/query.cpp +++ b/src/common/query.cpp @@ -23,7 +23,7 @@ #include "common/query.hpp" #include "common/util.hpp" -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #include #include diff --git a/src/common/query/mockconfigrules.cpp b/src/common/query/mockconfigrules.cpp index e40c7d95a..62848245e 100644 --- a/src/common/query/mockconfigrules.cpp +++ b/src/common/query/mockconfigrules.cpp @@ -28,7 +28,7 @@ #include "proc/asset/pipe.hpp" -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #include "common/util.hpp" using util::isnil; diff --git a/src/common/singletonfactory.hpp b/src/common/singletonfactory.hpp index 8523c1a75..ee9548342 100644 --- a/src/common/singletonfactory.hpp +++ b/src/common/singletonfactory.hpp @@ -38,7 +38,7 @@ This code is heavily inspired by #include "common/singletonpolicies.hpp" // several Policies usable together with SingletonFactory #include "common/util.hpp" -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" diff --git a/src/common/test/run.hpp b/src/common/test/run.hpp index 13fcf1bd4..06b1cda95 100644 --- a/src/common/test/run.hpp +++ b/src/common/test/run.hpp @@ -28,7 +28,7 @@ #include "pre.hpp" -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #include "common/test/suite.hpp" #include "common/util.hpp" diff --git a/src/common/test/suite.cpp b/src/common/test/suite.cpp index 7c73cbfdb..0f8036997 100644 --- a/src/common/test/suite.cpp +++ b/src/common/test/suite.cpp @@ -30,7 +30,7 @@ #include #include -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #include "lib/cmdline.hpp" #include "common/test/suite.hpp" #include "common/test/run.hpp" diff --git a/src/gui/workspace/actions.cpp b/src/gui/workspace/actions.cpp index f18c44ccb..3aaa73d6e 100644 --- a/src/gui/workspace/actions.cpp +++ b/src/gui/workspace/actions.cpp @@ -196,7 +196,7 @@ Actions::on_menu_help_about() //dialog.set_program_name(AppTitle); dialog.set_version(AppVersion); - //dialog.set_version(Appconfig::get("version")); + //dialog.set_version(AppState::get("version")); dialog.set_copyright(AppCopyright); dialog.set_website(AppWebsite); dialog.set_authors(StringArrayHandle(AppAuthors, diff --git a/src/include/error.hpp b/src/include/error.hpp index 74ed49721..566a80809 100644 --- a/src/include/error.hpp +++ b/src/include/error.hpp @@ -25,8 +25,8 @@ #define LUMIERA_ERROR_HPP_ #include -#include "include/nobugcfg.hpp" -#include "lumiera/appconfig.hpp" +#include "include/nobugcfg.h" +#include "include/lifecycle.h" #include "lib/error.h" @@ -154,7 +154,7 @@ namespace lumiera { /** install our own handler for undeclared exceptions. Will be * called automatically ON_BASIC_INIT when including errror.hpp * @note it's OK this is defined multiple times... - * @see appconfig.hpp */ + * @see appstate.hpp */ void install_unexpectedException_handler (); namespace { LifecycleHook schedule_ (ON_BASIC_INIT, &install_unexpectedException_handler); diff --git a/src/include/lifecycle.h b/src/include/lifecycle.h new file mode 100644 index 000000000..ba21f3791 --- /dev/null +++ b/src/include/lifecycle.h @@ -0,0 +1,105 @@ +/* + LIFECYCLE.h - interface for registering and triggering lifecycle callbacks + + Copyright (C) Lumiera.org + 2008, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +/** @file lifecycle.h + ** Interface for registering and triggering application lifecycle event callbacks. + ** This service is a facade for and implemented by lumiera::AppState. + ** By placing a static LifecycleHook variable or by calling LifecycleHook::add, + ** a callback can be registered to be executed on a specific application lifecycle + ** event. Examples being #ON_BASIC_INIT, #ON_GLOBAL_INIT. Other subsystems may + ** register additional events for more specific purpose. + ** + ** @see lumiera::AppState + ** @see main.cpp + */ + + +#ifndef LUMIERA_LIFECYCLE_H +#define LUMIERA_LIFECYCLE_H + + +#ifdef __cplusplus + +#include "include/symbol.hpp" +#include + + + +namespace lumiera { + + extern Symbol ON_BASIC_INIT; ///< automatic static init. treated specially + extern Symbol ON_GLOBAL_INIT; ///< to be triggered in main() @note no magic! + extern Symbol ON_GLOBAL_SHUTDOWN; ///< to be triggered at the end of main() @note no magic! + + // client code is free to register and use additional lifecycle events + + + + /** + * define and register a callback for a specific lifecycle event. + * The purpose of this class is to be defined as a static variable in the implementation + * of some subsystem (i.e. in the cpp file), providing the ctor with the pointer to a + * callback function. Thus the callback gets enrolled when the corresponding object file + * is loaded. The event ON_BASIC_INIT is handled specifically, firing off the referred + * callback function as soon as possible. All other labels are just arbitrary (string) + * constants and it is necessary that "someone" cares to fire off the lifecycle events + * at the right place. For example, lumiera-main (and the test runner) calls + * \c AppState::instance().execute(ON_GLOBAL_INIT) (and..SHUTDOWN) + * @note duplicate or repeated calls with the same callback are NOP + */ + class LifecycleHook + : private boost::noncopyable + { + public: + typedef void (*Hook)(void); + + LifecycleHook (Symbol eventLabel, Hook callbackFun); + + /** for chained calls (add multiple callbacks) */ + LifecycleHook& add (Hook callbackFun); + + /** alternative, static interface for registering a callback */ + static void add (Symbol eventLabel, Hook callbackFun); + + /** trigger lifecycle callbacks registered under the given label */ + static void trigger (Symbol eventLabel); + }; + + + +} // namespace lumiera + + + +#else /* =========== C interface ====================== */ + + +extern const char * lumiera_ON_BASIC_INIT; +extern const char * lumiera_ON_GLOBAL_INIT; +extern const char * lumiera_ON_GLOBAL_SHUTDOWN; + + +void lumiera_LifecycleHook_add (const char* eventLabel, void callbackFun(void)); +void lumiera_Lifecycle_trigger (const char* eventLabel); + +#endif +#endif diff --git a/src/include/nobugcfg.h b/src/include/nobugcfg.h index 70de908fb..57df1fe29 100644 --- a/src/include/nobugcfg.h +++ b/src/include/nobugcfg.h @@ -22,7 +22,7 @@ */ -/** @file nobugcfg.hpp +/** @file nobugcfg.h ** This header is for including and configuring NoBug. ** The idea is that configuration and some commonly used flag ** declarations are to be kept in one central location. Subsystems @@ -67,7 +67,7 @@ #ifdef __cplusplus /* ============= C++ ================ */ -#include "lumiera/appstate.hpp" +#include "include/lifecycle.h" #include "include/error.hpp" ///< make assertions throw instead of abort() namespace lumiera { diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index 2ba729d73..dd5f8ed02 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -47,7 +47,7 @@ noinst_HEADERS += \ $(liblumiera_a_srcdir)/mrucache.h \ $(liblumiera_a_srcdir)/time.h \ $(liblumiera_a_srcdir)/ppmpl.h \ - $(liblumiera_a_srcdir)/appconfig.hpp \ + $(liblumiera_a_srcdir)/appstate.hpp \ $(liblumiera_a_srcdir)/allocationcluster.hpp \ $(liblumiera_a_srcdir)/scopedholdertransfer.hpp \ $(liblumiera_a_srcdir)/scopedholder.hpp \ diff --git a/src/lib/cmdline.cpp b/src/lib/cmdline.cpp index 753e4a1c9..a2d62c19a 100644 --- a/src/lib/cmdline.cpp +++ b/src/lib/cmdline.cpp @@ -24,7 +24,7 @@ #include "lib/cmdline.hpp" #include "common/util.hpp" -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #include #include diff --git a/src/lib/lifecycleregistry.hpp b/src/lib/lifecycleregistry.hpp index c23395419..774fc726b 100644 --- a/src/lib/lifecycleregistry.hpp +++ b/src/lib/lifecycleregistry.hpp @@ -23,7 +23,7 @@ /** @file lifecycleregistry.hpp ** Helper for registering lifecycle event callbacks, which are - ** provided as a global service by lumiera::Appconfig. This service + ** provided as a global service by lumiera::AppState. This service ** allows to enrol functions under a given label and then to call ** all those registered functions. ** @note this is in fact an event mechanism, and if we start using @@ -31,7 +31,7 @@ ** boost::signals. (which has the downside of being an binary ** dependency). ** - ** @see appconfig.hpp + ** @see appstate.hpp */ @@ -54,14 +54,14 @@ namespace lumiera { using util::contains; using std::string; - typedef const char * const Symbol; //TODO define a real Symbol class, i.e. same literal string==same pointer, +// typedef const char * const Symbol; //TODO define a real Symbol class, i.e. same literal string==same pointer, // so we don't have to store string keys in the map... /** * Registry of callback functions accessible by a label (ID) * provided at registration. Registered functions will be added - * to a list, which can be triggered via label. Used by Appconfig + * to a list, which can be triggered via label. Used by AppState * to implement the lumiera lifecycle (init, shutdown) hooks. */ class LifecycleRegistry @@ -95,7 +95,7 @@ namespace lumiera { std::map table_; LifecycleRegistry () {} - friend class Appconfig; + friend class AppState; }; diff --git a/src/lumiera/appconfig.hpp b/src/lumiera/appconfig.hpp deleted file mode 100644 index 83c081751..000000000 --- a/src/lumiera/appconfig.hpp +++ /dev/null @@ -1,150 +0,0 @@ -/* - APPCONFIG.hpp - for global initialization and configuration - - Copyright (C) Lumiera.org - 2008, Hermann Vosseler - - This program is free software; you can redistribute it and/or - modify it under the terms of the GNU General Public License as - published by the Free Software Foundation; either version 2 of the - License, or (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY; without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. - -*/ - -/** @file appconfig.hpp - ** Registering and managing some application-global services. - ** Besides \link Appconfig::get querying \endlink for some - ** "Application property" constants, there is a mechanism for - ** registering and firing off application lifecycle event hooks. - ** The implementation of some subsystem can define a static instance - ** variable of class LifecycleHook, which will place the provided - ** callback function into a central registry accessable through - ** the Appconfig singleton instance. - ** - ** @see lumiera.cpp - ** @see nobugcfg.cpp - ** @see sessmanagerimpl.cpp - */ - - -#ifndef LUMIERA_APPCONFIG_H -#define LUMIERA_APPCONFIG_H - -#include -#include -#include -#include -#include "lib/lifecycleregistry.hpp" - - - -namespace lumiera - { - using std::string; - using boost::scoped_ptr; - using boost::noncopyable; - - - /** - * Singleton to hold inevitable global flags and constants - * and for performing early (static) global initialization tasks. - * Appconfig services are available already from static - * initialsation code. - * @warning don't use Appconfig in destuctors. - */ - class Appconfig - : private noncopyable - { - private: - /** perform initialization on first access. - * @see #instance() - */ - Appconfig (); - - ~Appconfig () throw() {}; ///< deletion prohibited - friend void boost::checked_delete(Appconfig*); - - - public: - /** get the (single) Appconfig instance. - * Implemented as Meyers singleton. - * @warning don't use it after the end of main()! - */ - static Appconfig& instance() - { - static scoped_ptr theApp_ (0); - if (!theApp_) theApp_.reset (new Appconfig ()); - return *theApp_; - } - - - /** fire off all lifecycle callbacks - * registered under the given label */ - static void lifecycle (Symbol eventLabel); - - // note: if necessary, we can add support - // for querying the current lifecycle phase... - - private: - typedef scoped_ptr PLife; - - PLife lifecycleHooks_; - - friend class LifecycleHook; - - }; - - - extern Symbol ON_BASIC_INIT; ///< automatic static init. treated specially - extern Symbol ON_GLOBAL_INIT; ///< to be triggered in main() @note no magic! - extern Symbol ON_GLOBAL_SHUTDOWN; ///< to be triggered at the end of main() @note no magic! - - // client code is free to register and use additional lifecycle events - - - /** - * define and register a callback for some lifecycle event. - * The purpose of this class is to be defined as a static variable - * in the implementation of some subsystem (i.e. in the cpp file), - * providing the ctor with the pointer to a callback function. - * Thus the callback gets enrolled when the corresponding object - * file is loaded. The event ON_BASIC_INIT is handled specifically, - * firing off the referred callback function as soon as possible. - * All other lables are just arbitrary (string) constants and it - * is necessary that "someone" cares to fire off the lifcycle events - * at the right place. For example, lumiera-main (and the test runner) - * calls \c Appconfig::instance().execute(ON_GLOBAL_INIT) (and..SHUTDOWN) - * @note duplicate or repeated calls with the same callback are a NOP - */ - class LifecycleHook - : private noncopyable - { - public: - LifecycleHook (Symbol eventLabel, LifecycleRegistry::Hook callbackFun); - - LifecycleHook& add (Symbol eventLabel, LifecycleRegistry::Hook callbackFun); ///< for chained calls (add multiple callbacks) - }; - - - -} // namespace lumiera - - -extern "C" { //TODO provide a separate header if some C code happens to need this... - - void lumiera_LifecycleHook_add (const char* eventLabel, void callbackFun(void)); - void lumiera_Lifecycle_execute (const char* eventLabel); - -} - - -#endif diff --git a/src/lumiera/appconfig.cpp b/src/lumiera/appstate.cpp similarity index 65% rename from src/lumiera/appconfig.cpp rename to src/lumiera/appstate.cpp index c589ade42..73e8285fa 100644 --- a/src/lumiera/appconfig.cpp +++ b/src/lumiera/appstate.cpp @@ -1,5 +1,5 @@ /* - Appconfig - for global initialisation and configuration + AppState - application initialisation and behaviour Copyright (C) Lumiera.org 2008, Hermann Vosseler @@ -21,7 +21,9 @@ * *****************************************************/ -#include "lumiera/appconfig.hpp" +#include "lumiera/appstate.hpp" +#include "lib/lifecycleregistry.hpp" + #include "include/error.hpp" #include "common/util.hpp" @@ -31,41 +33,53 @@ using util::cStr; namespace lumiera { - - + + Symbol ON_BASIC_INIT ("ON_BASIC_INIT"); Symbol ON_GLOBAL_INIT ("ON_GLOBAL_INIT"); Symbol ON_GLOBAL_SHUTDOWN ("ON_GLOBAL_SHUTDOWN"); - + /** perform initialisation triggered on first access. * Will execute the ON_BASIC_INIT hook, but under typical * circumstances this is a NOP, because when callbacks are - * added to this hook, the Appconfig singleton instance has + * added to this hook, the AppState singleton instance has * already been created. For this reason, there is special * treatment for the ON_BASIC_INIT in LifecycleHook::add, * causing the provided callbacks to be fired immediately. * (btw, this is nothing to be worried of, because from * client codes POV it just behaves like intended). */ - Appconfig::Appconfig() + AppState::AppState() : lifecycleHooks_(new LifecycleRegistry) { lifecycleHooks_->execute (ON_BASIC_INIT); // note in most cases a NOP } + AppState::~AppState() { } + + + + AppState& + AppState::instance() // Meyer's singleton + { + static scoped_ptr theApp_ (0); + if (!theApp_) theApp_.reset (new AppState ()); + return *theApp_; + } void - Appconfig::lifecycle (Symbol event_label) + AppState::lifecycle (Symbol event_label) { instance().lifecycleHooks_->execute(event_label); } - - - + + + + // ==== implementation LifecycleHook class ======= @@ -80,12 +94,12 @@ namespace lumiera { LifecycleHook& LifecycleHook::add (Symbol eventLabel, Callback callbackFun) { - bool isNew = Appconfig::instance().lifecycleHooks_->enroll (eventLabel,callbackFun); + bool isNew = AppState::instance().lifecycleHooks_->enroll (eventLabel,callbackFun); if (isNew && !strcmp(ON_BASIC_INIT, eventLabel)) callbackFun(); // when this code executes, // then per definition we are already post "basic init" - // (which happens in the Appconfig ctor); thus fire it immediately + // (which happens in the AppState ctor); thus fire it immediately return *this; } @@ -93,17 +107,28 @@ namespace lumiera { } // namespace lumiera -// ==== implementation C interface ======= -void -lumiera_LifecycleHook_add (const char* eventLabel, void callbackFun(void)) -{ - lumiera::LifecycleHook (eventLabel, callbackFun); +extern "C" { /* ==== implementation C interface for lifecycle hooks ======= */ + + + extern const char * lumiera_ON_BASIC_INIT = lumiera::ON_BASIC_INIT; + extern const char * lumiera_ON_GLOBAL_INIT = lumiera::ON_GLOBAL_INIT; + extern const char * lumiera_ON_GLOBAL_SHUTDOWN = lumiera::ON_GLOBAL_SHUTDOWN; + + + + void + lumiera_LifecycleHook_add (const char* eventLabel, void callbackFun(void)) + { + lumiera::LifecycleHook (eventLabel, callbackFun); + } + + + void + lumiera_Lifecycle_trigger (const char* eventLabel) + { + lumiera::AppState::lifecycle (eventLabel); + } + } - -void -lumiera_Lifecycle_execute (const char* eventLabel) -{ - lumiera::Appconfig::lifecycle (eventLabel); -} diff --git a/src/lumiera/appstate.hpp b/src/lumiera/appstate.hpp new file mode 100644 index 000000000..7339fa235 --- /dev/null +++ b/src/lumiera/appstate.hpp @@ -0,0 +1,96 @@ +/* + APPSTATE.hpp - application initialisation and behaviour + + Copyright (C) Lumiera.org + 2008, Hermann Vosseler + + This program is free software; you can redistribute it and/or + modify it under the terms of the GNU General Public License as + published by the Free Software Foundation; either version 2 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +/** @file appstate.hpp + ** Registering and managing some application-global services. + ** Besides encapsulating the logic for starting up the fundamental parts + ** of the application, there is a mechanism for registering and firing off + ** application lifecycle event callbacks. + ** + ** @see LifecycleHook + ** @see main.cpp + ** @see nobugcfg.h + */ + + +#ifndef LUMIERA_APPSTATE_H +#define LUMIERA_APPSTATE_H + +#include "include/symbol.hpp" + +#include +#include +#include +#include + + + +namespace lumiera { + + using std::string; + using boost::scoped_ptr; + using boost::noncopyable; + + class LifecycleRegistry; + + + /** + * Singleton to hold global flags directing the overall application behaviour, + * for triggering lifecycle events and performing early initialisation tasks. + * AppState services are available already from static initialisation code. + * @warning don't use AppState in destructors. + */ + class AppState + : private noncopyable + { + private: + AppState (); + + ~AppState (); ///< deletion prohibited + friend void boost::checked_delete(AppState*); + + + public: + /** get the (single) AppState instance. + * @warning don't use it after the end of main()! */ + static AppState& instance(); + + + /** fire off all lifecycle callbacks + * registered under the given label */ + static void lifecycle (Symbol eventLabel); + + + + private: + typedef scoped_ptr PLife; + + PLife lifecycleHooks_; + + friend class LifecycleHook; + + }; + + +} // namespace lumiera + +#endif diff --git a/src/lumiera/lumiera.c b/src/lumiera/lumiera.c index 4ffcb8447..289646180 100644 --- a/src/lumiera/lumiera.c +++ b/src/lumiera/lumiera.c @@ -23,7 +23,7 @@ //TODO: Lumiera header includes// -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #include "lumiera/lumiera.h" #include "lumiera/interface.h" #include "lumiera/interfaceregistry.h" diff --git a/src/lumiera/lumiera_init.c b/src/lumiera/lumiera_init.c index 071d2439a..479fb5622 100644 --- a/src/lumiera/lumiera_init.c +++ b/src/lumiera/lumiera_init.c @@ -23,7 +23,7 @@ //TODO: Lumiera header includes// -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #include "lumiera/lumiera.h" #include "lumiera/config_interface.h" diff --git a/src/lumiera/main.cpp b/src/lumiera/main.cpp index 5bf4ec79c..7c310ada4 100644 --- a/src/lumiera/main.cpp +++ b/src/lumiera/main.cpp @@ -28,7 +28,7 @@ using std::cout; using std::endl; -using lumiera::Appconfig; +using lumiera::AppState; using lumiera::ON_GLOBAL_INIT; using lumiera::ON_GLOBAL_SHUTDOWN; @@ -37,10 +37,10 @@ int main (int argc, char* argv[]) { cout << "*** Lumiera NLE for Linux ***" << endl; - Appconfig::lifecycle (ON_GLOBAL_INIT); + AppState::lifecycle (ON_GLOBAL_INIT); // great things are happening here.... - Appconfig::lifecycle (ON_GLOBAL_SHUTDOWN); + AppState::lifecycle (ON_GLOBAL_SHUTDOWN); return 0; } diff --git a/src/lumiera/nobugcfg.cpp b/src/lumiera/nobugcfg.cpp index 9c50d58de..ecbde0e79 100644 --- a/src/lumiera/nobugcfg.cpp +++ b/src/lumiera/nobugcfg.cpp @@ -21,10 +21,10 @@ * *****************************************************/ -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #define NOBUG_INIT_DEFS_ -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #undef NOBUG_INIT_DEFS_ diff --git a/src/proc/Makefile.am b/src/proc/Makefile.am index 580bb637e..9d30d454f 100644 --- a/src/proc/Makefile.am +++ b/src/proc/Makefile.am @@ -219,5 +219,5 @@ noinst_HEADERS += \ $(liblumiproc_a_srcdir)/asset.hpp \ $(liblumiproc_a_srcdir)/assetmanager.hpp \ $(liblumiproc_a_srcdir)/lumiera.hpp \ - $(liblumiproc_a_srcdir)/nobugcfg.hpp + $(liblumiproc_a_srcdir)/nobugcfg.h diff --git a/src/proc/asset.hpp b/src/proc/asset.hpp index 2e82051d7..2298a9a01 100644 --- a/src/proc/asset.hpp +++ b/src/proc/asset.hpp @@ -56,7 +56,7 @@ #include "proc/asset/category.hpp" -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #include "include/error.hpp" #include "common/p.hpp" diff --git a/src/proc/asset/category.cpp b/src/proc/asset/category.cpp index 7467325e4..ad2e22cf0 100644 --- a/src/proc/asset/category.cpp +++ b/src/proc/asset/category.cpp @@ -23,7 +23,7 @@ #include "proc/asset/category.hpp" #include "common/util.hpp" -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #include diff --git a/src/proc/asset/media.cpp b/src/proc/asset/media.cpp index 1344c791d..75f78ea31 100644 --- a/src/proc/asset/media.cpp +++ b/src/proc/asset/media.cpp @@ -29,7 +29,7 @@ #include "proc/mobject/session/clip.hpp" #include "proc/mobject/session/mobjectfactory.hpp" #include "common/util.hpp" -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #include #include diff --git a/src/proc/asset/meta.cpp b/src/proc/asset/meta.cpp index f2f42bc22..8d71b8a1b 100644 --- a/src/proc/asset/meta.cpp +++ b/src/proc/asset/meta.cpp @@ -24,7 +24,7 @@ #include "proc/assetmanager.hpp" #include "proc/asset/meta.hpp" #include "common/util.hpp" -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" namespace asset diff --git a/src/proc/asset/proc.cpp b/src/proc/asset/proc.cpp index d383b8c31..223d3616b 100644 --- a/src/proc/asset/proc.cpp +++ b/src/proc/asset/proc.cpp @@ -24,7 +24,7 @@ #include "proc/assetmanager.hpp" #include "proc/asset/proc.hpp" #include "common/util.hpp" -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" namespace asset diff --git a/src/proc/asset/struct.cpp b/src/proc/asset/struct.cpp index 9305722e0..68764b008 100644 --- a/src/proc/asset/struct.cpp +++ b/src/proc/asset/struct.cpp @@ -31,7 +31,7 @@ #include "proc/asset/structfactoryimpl.hpp" #include "common/util.hpp" -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" #include diff --git a/src/proc/common.hpp b/src/proc/common.hpp index 622c3c1ea..07dc821c3 100644 --- a/src/proc/common.hpp +++ b/src/proc/common.hpp @@ -45,8 +45,8 @@ #include "common/p.hpp" #include "common/util.hpp" #include "common/lumitime.hpp" -#include "include/error.hpp" ///< pulls in NoBug via nobugcfg.hpp -#include "lumiera/appconfig.hpp" +#include "include/error.hpp" ///< pulls in NoBug via nobugcfg.h +#include "lumiera/appstate.hpp" /** diff --git a/src/proc/control/stypemanager.cpp b/src/proc/control/stypemanager.cpp index 2d2982118..6a8301010 100644 --- a/src/proc/control/stypemanager.cpp +++ b/src/proc/control/stypemanager.cpp @@ -52,7 +52,7 @@ namespace control { STypeManager::reset() { reg_.reset(new Registry); - lumiera::Appconfig::lifecycle(ON_STREAMTYPES_RESET); + lumiera::AppState::lifecycle(ON_STREAMTYPES_RESET); } /** \par diff --git a/src/proc/mobject/builder/common.hpp b/src/proc/mobject/builder/common.hpp index 160d0a858..36993fa03 100644 --- a/src/proc/mobject/builder/common.hpp +++ b/src/proc/mobject/builder/common.hpp @@ -24,7 +24,7 @@ #ifndef MOBJECT_BUILDER_COMMON_H #define MOBJECT_BUILDER_COMMON_H -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" namespace mobject { diff --git a/src/proc/mobject/session/fixture.cpp b/src/proc/mobject/session/fixture.cpp index bfccd57a4..88329075d 100644 --- a/src/proc/mobject/session/fixture.cpp +++ b/src/proc/mobject/session/fixture.cpp @@ -22,7 +22,7 @@ #include "proc/mobject/session/fixture.hpp" -#include "include/nobugcfg.hpp" +#include "include/nobugcfg.h" namespace mobject { diff --git a/src/tool/try.cpp b/src/tool/try.cpp index 40c5d2d42..d6b3a95b9 100644 --- a/src/tool/try.cpp +++ b/src/tool/try.cpp @@ -15,7 +15,7 @@ #include -//#include "include/nobugcfg.hpp" +//#include "include/nobugcfg.h" #include //#include diff --git a/tests/common/appconfigtest.cpp b/tests/common/appconfigtest.cpp index aba78fe01..08683fa3b 100644 --- a/tests/common/appconfigtest.cpp +++ b/tests/common/appconfigtest.cpp @@ -1,5 +1,5 @@ /* - Appconfig(Test) - accessing the always-available Appconfig singleton + Appconfig(Test) - accessing the always-available AppState singleton Copyright (C) Lumiera.org 2008, Hermann Vosseler @@ -25,7 +25,7 @@ #include "common/test/run.hpp" #include "common/util.hpp" -#include "lumiera/appconfig.hpp" +#include "lumiera/appstate.hpp" @@ -42,10 +42,10 @@ namespace lumiera { UNIMPLEMENTED ("reorganise config access for C++"); } - /** @test accessing a value from lumiera::Appconfig */ + /** @test accessing a value from lumiera::AppState */ void testAccess (const string& key) { -// string ver = lumiera::Appconfig::get(key); +// string ver = lumiera::AppState::get(key); // ASSERT ( !util::isnil(ver)); } }; diff --git a/tests/common/exceptionerrortest.cpp b/tests/common/exceptionerrortest.cpp index 336b87c0e..9ce45a1c8 100644 --- a/tests/common/exceptionerrortest.cpp +++ b/tests/common/exceptionerrortest.cpp @@ -182,7 +182,7 @@ namespace lumiera * this should result in the global unknown() handler to be called, * so usually it will terminate the testrun. * @note inside error.hpp, an initialisation hook has been installed into - * Appconfig, causing our own unknown() handler to be installed and + * AppState, causing our own unknown() handler to be installed and * invoked, which gives additional diagnostics.*/ void terminateUnknown () throw() { diff --git a/tests/common/lifecycletest.cpp b/tests/common/lifecycletest.cpp index 4d5e3b594..529eda9bf 100644 --- a/tests/common/lifecycletest.cpp +++ b/tests/common/lifecycletest.cpp @@ -1,5 +1,5 @@ /* - LifeCycle(Test) - checking the lifecycle callback hooks provided by Appconfig + LifeCycle(Test) - checking the lifecycle callback hooks provided by AppState Copyright (C) Lumiera.org 2008, Hermann Vosseler @@ -25,7 +25,7 @@ #include "common/test/run.hpp" #include "common/util.hpp" -#include "lumiera/appconfig.hpp" +#include "lumiera/appstate.hpp" @@ -64,7 +64,7 @@ namespace lumiera ASSERT (1 == basicInit, "the basic-init callback has been invoked more than once"); ASSERT (!customCallback); - Appconfig::lifecycle (MY_MAGIC_MEGA_EVENT); + AppState::lifecycle (MY_MAGIC_MEGA_EVENT); ASSERT ( 1 == customCallback); } diff --git a/tests/common/mainsuite.cpp b/tests/common/mainsuite.cpp index d7dbb7903..58024d645 100644 --- a/tests/common/mainsuite.cpp +++ b/tests/common/mainsuite.cpp @@ -23,9 +23,9 @@ #include "common/test/suite.hpp" #include "common/test/testoption.hpp" -#include "lumiera/appconfig.hpp" +#include "lumiera/appstate.hpp" -using lumiera::Appconfig; +using lumiera::AppState; using lumiera::ON_GLOBAL_INIT; using lumiera::ON_GLOBAL_SHUTDOWN; @@ -39,13 +39,13 @@ int main (int argc, const char* argv[]) util::Cmdline args (argc,argv); test::TestOption optparser (args); test::Suite suite (optparser.getTestgroup()); - Appconfig::lifecycle(ON_GLOBAL_INIT); + AppState::lifecycle(ON_GLOBAL_INIT); if (optparser.getDescribe()) suite.describe(); else suite.run (args); - Appconfig::lifecycle(ON_GLOBAL_SHUTDOWN); + AppState::lifecycle(ON_GLOBAL_SHUTDOWN); return 0; }