Changeset 5850 for code/branches/core5/src/libraries/util/Scope.h
- Timestamp:
- Oct 1, 2009, 11:44:53 AM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/libraries/util/Scope.h
r5738 r5850 31 31 32 32 #include "UtilPrereqs.h" 33 33 34 #include <cassert> 35 #include <map> 34 36 #include <set> 35 #include <map>36 37 #include "Debug.h" 37 38 … … 45 46 enum Value 46 47 { 47 GSRoot, 48 GSGraphics, 49 GSLevel 48 Root, 49 Graphics 50 50 }; 51 51 } 52 52 53 class ScopeListener; // Forward declaration 53 // Forward declarations 54 class ScopeListener; 55 class Clock; 54 56 55 57 /** … … 87 89 //! Gets called if the scope is deactivated 88 90 virtual void deactivated() = 0; 91 //! Gets called if the scope is updated 92 virtual void updated(const Clock& time) = 0; 89 93 90 94 private: … … 136 140 return (ScopeManager::instanceCounts_s[scope] > 0); 137 141 } 142 143 //! Update method for the ScopeListeners (to implement singleton updates) 144 static void update(const Clock& time) 145 { 146 if (isActive()) 147 { 148 for (typename std::set<ScopeListener*>::iterator it = ScopeManager::listeners_s[scope].begin(); it != ScopeManager::listeners_s[scope].end(); ) 149 (*(it++))->updated(time); 150 } 151 } 138 152 }; 139 153 }
Note: See TracChangeset
for help on using the changeset viewer.