47 #ifndef __Core_Scope_H__ 48 #define __Core_Scope_H__ 77 virtual void activated() = 0;
79 virtual void deactivated() = 0;
93 template <ScopeID::Value scope>
114 this->deactivateScope();
ObjScopeGuardImpl0< Obj, MemFun > MakeObjGuard(Obj &obj, MemFun memFun)
Definition: ScopeGuard.h:441
~Scope()
Destructor: deactivate the listeners.
Definition: Scope.h:110
void removeScope(ScopeID::Value scope)
Removes a scope and deactivates all listeners which are registered for this scope.
Definition: ScopeManager.cc:48
ScopeListeners register themselves in the corresponding Scope and wait for notifications.
Definition: Scope.h:68
Shared library macros, enums, constants and forward declarations for the core library ...
void Dismiss() const
Definition: ScopeGuard.h:82
void addScope(ScopeID::Value scope)
Adds a scope and activates all listeners which are registered for this scope.
Definition: ScopeManager.cc:42
void deactivateScope()
Deactivates the listeners of this scope in case the scope is destroyed or the construction fails...
Definition: Scope.h:120
bool bActivated_
Definition: Scope.h:82
Output level, used to log the program's internal state in the log file.
Definition: OutputDefinitions.h:97
bool isActive(ScopeID::Value scope)
Returns true if this scope is active.
Definition: ScopeManager.cc:54
static bool isActive()
Returns true if the scope is active.
Definition: Scope.h:126
Declaration of orxonox::ScopeManager.
OutputStream & orxout(OutputLevel level=level::debug_output, const OutputContextContainer &context=context::undefined())
This helper function returns a reference to a commonly used instance of OutputStream.
Definition: Output.h:81
Die Wagnis Klasse hat die folgenden Aufgaben:
Definition: ApplicationPaths.cc:66
#define _CoreExport
Definition: CorePrereqs.h:61
ScopeListener()
Definition: Scope.h:73
Defines the helper function orxout() and includes all necessary headers to use the output system...
Scope()
Constructor: activate the listeners.
Definition: Scope.h:98
Base class used by all ScopeGuard implementations.
Definition: ScopeGuard.h:47
The ScopeManager stores the variables of the Scope templates in a statically linked context...
Definition: ScopeManager.h:56
A scope for a given template argument is either active or not.
Definition: CorePrereqs.h:219
static ScopeManager & getInstance()
Returns a reference to the singleton instance.
Definition: Singleton.h:118