- Timestamp:
- May 31, 2015, 10:22:59 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core7/src/libraries/core/singleton/ScopedSingletonWrapper.h
r10460 r10514 61 61 public: 62 62 /// Constructor: Initializes all the values 63 ScopedSingletonWrapper(const std::string& className, ScopeID::Value scope) 64 : ScopeListener(scope) 65 , className_(className) 63 ScopedSingletonWrapper(const std::string& className) 64 : className_(className) 66 65 { } 67 66 virtual ~ScopedSingletonWrapper() { } … … 74 73 @anchor ClassScopedSingletonWrapper 75 74 76 @brief Manages a scoped singleton for a given scope.75 @brief Manages a scoped singleton 77 76 @param T The managed singleton class 78 @param scope The scope in which the singleton @a T should be active79 77 @param allowedToFail If true, a specialization of this template is used, that uses try-catch blocks to handle possible failures. 80 78 81 This class inherits from ScopeListener for the given scopeand thus its functions79 This class inherits from ScopeListener and is registered for a scope in ScopeManager and thus its functions 82 80 activated() and deactivated() are called whenever the Scope changes its state. 83 81 … … 87 85 @see Singleton 88 86 */ 89 template <class T, ScopeID::Value scope,bool allowedToFail>87 template <class T, bool allowedToFail> 90 88 class ClassScopedSingletonWrapper : public ScopedSingletonWrapper 91 89 { 92 90 public: 93 //! Constructor: Initializes the singleton pointer and passes the scope to ScopedSingletonWrapper and ScopeListener94 91 ClassScopedSingletonWrapper(const std::string& className) 95 : ScopedSingletonWrapper(className , scope)92 : ScopedSingletonWrapper(className) 96 93 , singletonPtr_(NULL) 97 94 { … … 135 132 @brief This class partially spezializes ClassScopedSingletonWrapper for classes @a T that are allowed to fail. 136 133 @param T The managed singleton class 137 @param scope The scope in which the singleton @a T should be active138 134 139 135 Because @a T could fail when being created, this partial spezialization of ClassScopedSingletonWrapper … … 142 138 See @ref ClassScopedSingletonWrapper for a full documentation of the basis template. 143 139 */ 144 template <class T , ScopeID::Value scope>145 class ClassScopedSingletonWrapper<T, scope,true> : public ScopedSingletonWrapper140 template <class T> 141 class ClassScopedSingletonWrapper<T, true> : public ScopedSingletonWrapper 146 142 { 147 143 public: 148 //! Constructor: Initializes the singleton pointer and passes the scope to ScopedSingletonWrapper and ScopeListener149 144 ClassScopedSingletonWrapper(const std::string& className) 150 : ScopedSingletonWrapper(className , scope)145 : ScopedSingletonWrapper(className) 151 146 , singletonPtr_(NULL) 152 147 {
Note: See TracChangeset
for help on using the changeset viewer.