Sierra Toolkit
Version of the Day
Bootstrap.cpp
1
/*------------------------------------------------------------------------*/
2
/* Copyright 2010 Sandia Corporation. */
3
/* Under terms of Contract DE-AC04-94AL85000, there is a non-exclusive */
4
/* license for use of this work by or on behalf of the U.S. Government. */
5
/* Export of this program may require a license from the */
6
/* United States Government. */
7
/*------------------------------------------------------------------------*/
8
9
#include <stk_util/util/Bootstrap.hpp>
10
11
namespace
stk_classic
{
12
13
Bootstrap *
14
Bootstrap::s_front = 0;
15
16
bool
17
Bootstrap::s_bootstrapped =
false
;
18
19
20
void
21
Bootstrap:: bootstrap
()
22
{
23
s_bootstrapped =
true
;
24
for
(
Bootstrap
*f = s_front; f; f = f->m_next)
25
(*f->m_f)();
26
}
27
28
29
Bootstrap::Bootstrap
(
30
FunctionPtr f)
31
: m_next(s_front),
32
m_f(f)
33
{
34
s_front =
this
;
35
36
// IF already bootstrapped, execute immediately
37
if
(s_bootstrapped)
38
(*f)();
39
}
40
41
}
// namespace stk_classic
stk_classic::Bootstrap::bootstrap
static void bootstrap()
Member function bootstrap runs through the stored bootstrap function pointers and executes each funct...
Definition:
Bootstrap.cpp:21
stk_classic::Bootstrap
Class Bootstrap serves as a bootstrapping mechanism for products in the sierra toolkit and elsewhere.
Definition:
Bootstrap.hpp:35
stk_classic
Sierra Toolkit.
Definition:
AlgorithmRunner.cpp:16
stk_classic::Bootstrap::Bootstrap
Bootstrap(void(*f)())
Creates a new Bootstrap instance.
Definition:
Bootstrap.cpp:29
stk_util
stk_util
util
Bootstrap.cpp
Generated by
1.8.16