Changeset 7323 for code/branches/doc/src/libraries/util/Scope.h
- Timestamp:
- Sep 2, 2010, 3:16:08 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/doc/src/libraries/util/Scope.h
r7266 r7323 27 27 */ 28 28 29 /** 30 @file 31 @ingroup Util SingletonScope 32 @brief Declaration of the classes that are needed to use Scopes: 33 orxonox::Scope, orxonox::ScopeListener, and orxonox::ScopeManager. 34 35 @anchor Scope 36 37 A virtual scope can be represented by an instance of class orxonox::Scope. orxonox::Scope<@a scope> is a template 38 an its template argument defines the name of the virtual scope. See orxonox::ScopeID for an enumeration of the 39 available values for @a scope. The orxonox::Scope object for a given @a scope can be activated or deactivated. 40 Instances of orxonox::ScopeListener can register for a given @a scope and will get a notification if the 41 corresponding orxonox::Scope object changes its state. 42 43 To avoid multiple instances of orxonox::Scope<@a scope> in different libraries, each instance of orxonox::Scope 44 registers in orxonox::ScopeManager, where they are linked statically in the util library. 45 46 Scopes are usually used to control the creation and destruction of Singletons. 47 48 @see orxonox::ScopedSingletonManager 49 @see orxonox::Singleton 50 */ 51 29 52 #ifndef __Util_Scope_H__ 30 53 #define __Util_Scope_H__ … … 42 65 { 43 66 /** 44 @brief The ScopeManager stores the variables of the scope templates in a statically linked context. 67 @brief The ScopeManager stores the variables of the Scope templates in a statically linked context. 68 69 If all Scope objects are managed by this class, they are statically linked in the util library. 70 Without this, a new instance of Scope<T> for each T would be created in every library of Orxonox, 71 which is of course not the desired behavior. 72 73 @see See @ref Scope "this description" for details about the interrelationship of Scope, ScopeListener, and ScopeManager. 45 74 */ 46 75 class _UtilExport ScopeManager … … 56 85 57 86 /** 58 @brief ScopeListeners register themselves in the corresponding scope and wait for notifications. 87 @brief ScopeListeners register themselves in the corresponding Scope and wait for notifications. 88 Notifications are sent if a Scope is activated or deactivated. 89 90 @see See @ref Scope "this description" for details about the interrelationship of Scope, ScopeListener, and ScopeManager. 59 91 */ 60 92 class _UtilExport ScopeListener … … 86 118 Objects inheriting from a ScopeListener are registered in a list (different for each scope). 87 119 If the scope gets activated or deactivated, all objects in this list are notified. 120 121 @see See @ref Scope "this description" for details about the interrelationship of Scope, ScopeListener, and ScopeManager. 88 122 */ 89 123 template <ScopeID::Value scope> … … 130 164 } 131 165 166 //! Deactivates the listeners of this scope in case the scope is destroyed or the construction fails. 132 167 void deactivateListeners() 133 168 {
Note: See TracChangeset
for help on using the changeset viewer.