|
Sierra Toolkit
Version of the Day
|
00001 /*------------------------------------------------------------------------*/ 00002 /* Copyright 2010 Sandia Corporation. */ 00003 /* Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive */ 00004 /* license for use of this work by or on behalf of the U.S. Government. */ 00005 /* Export of this program may require a license from the */ 00006 /* United States Government. */ 00007 /*------------------------------------------------------------------------*/ 00008 00009 #ifndef STK_UTIL_UTIL_BOOTSTRAP_HPP 00010 #define STK_UTIL_UTIL_BOOTSTRAP_HPP 00011 00012 namespace stk_classic { 00013 00018 00035 class Bootstrap 00036 { 00037 public: 00038 00039 typedef void (*FunctionPtr)(); 00040 00046 static void bootstrap(); 00047 00056 Bootstrap(void (*f)()); 00057 00058 private: 00059 Bootstrap(const Bootstrap &); 00060 Bootstrap &operator=(const Bootstrap &); 00061 00062 public: 00063 ~Bootstrap() 00064 {} 00065 00066 private: 00067 static Bootstrap * s_front; 00068 static bool s_bootstrapped; 00069 00070 Bootstrap * m_next; 00071 FunctionPtr m_f; 00072 }; 00073 00077 00078 } // namespace stk_classic 00079 00080 #endif // STK_UTIL_UTIL_BOOTSTRAP_HPP