Changeset 5867 for code/branches/core5/src/libraries
- Timestamp:
- Oct 4, 2009, 12:02:28 AM (15 years ago)
- Location:
- code/branches/core5/src/libraries
- Files:
-
- 2 added
- 1 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/core5/src/libraries/core/CMakeLists.txt
r5855 r5867 37 37 PathConfig.cc 38 38 Resource.cc 39 ScopedSingletonManager.cc 39 40 WindowEventListener.cc 40 41 -
code/branches/core5/src/libraries/core/Core.cc
r5863 r5867 65 65 #include "Language.h" 66 66 #include "LuaState.h" 67 #include "ScopedSingletonManager.h" 67 68 #include "Shell.h" 68 69 #include "TclBind.h" … … 433 434 { 434 435 // singletons from other libraries 435 Scope <ScopeID::Root>::update(time);436 ScopedSingletonManager::update(time, ScopeID::Root); 436 437 if (this->bGraphicsLoaded_) 437 438 { … … 441 442 this->guiManager_->update(time); 442 443 // graphics singletons from other libraries 443 Scope <ScopeID::Graphics>::update(time);444 ScopedSingletonManager::update(time, ScopeID::Graphics); 444 445 } 445 446 // process thread commands -
code/branches/core5/src/libraries/util/Scope.h
r5858 r5867 73 73 //! Gets called if the scope is deactivated 74 74 virtual void deactivated() = 0; 75 //! Gets called if the scope is updated76 virtual void updated(const Clock& time) = 0;77 75 78 76 private: … … 124 122 return (ScopeManager::instanceCounts_s[scope] > 0); 125 123 } 126 127 //! Update method for the ScopeListeners (to implement singleton updates)128 static void update(const Clock& time)129 {130 if (isActive())131 {132 for (typename std::set<ScopeListener*>::iterator it = ScopeManager::listeners_s[scope].begin(); it != ScopeManager::listeners_s[scope].end(); )133 (*(it++))->updated(time);134 }135 }136 124 }; 137 125 } -
code/branches/core5/src/libraries/util/Singleton.h
r5738 r5867 55 55 } 56 56 57 //! Update method called by ClassSingletonManager (if used) 58 void updateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->update(time); } 59 //! Empty update method for the static polymorphism 60 void update(const Clock& time) { } 61 57 62 protected: 58 63 //! Constructor sets the singleton instance pointer
Note: See TracChangeset
for help on using the changeset viewer.