Changeset 6751 for code/trunk
- Timestamp:
- Apr 17, 2010, 10:04:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/trunk/src/libraries/util/Singleton.h
r6746 r6751 49 49 public: 50 50 //! Returns a reference to the singleton instance 51 FORCEINLINEstatic T& getInstance()51 static T& getInstance() 52 52 { 53 53 assert(T::singletonPtr_s != NULL); … … 56 56 57 57 //! Tells whether the singleton has been created 58 FORCEINLINEstatic bool exists()58 static bool exists() 59 59 { 60 60 return (T::singletonPtr_s != NULL); … … 62 62 63 63 //! Update method called by ClassSingletonManager (if used) 64 FORCEINLINEvoid preUpdateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->preUpdate(time); }64 void preUpdateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->preUpdate(time); } 65 65 //! Empty update method for the static polymorphism 66 FORCEINLINEvoid preUpdate(const Clock& time) { }66 void preUpdate(const Clock& time) { } 67 67 //! Update method called by ClassSingletonManager (if used) 68 FORCEINLINEvoid postUpdateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->postUpdate(time); }68 void postUpdateSingleton(const Clock& time) { static_cast<T*>(T::singletonPtr_s)->postUpdate(time); } 69 69 //! Empty update method for the static polymorphism 70 FORCEINLINEvoid postUpdate(const Clock& time) { }70 void postUpdate(const Clock& time) { } 71 71 72 72 protected:
Note: See TracChangeset
for help on using the changeset viewer.