SST
8.0.0
StructuralSimulationToolkit
Main Page
Related Pages
Data Structures
Files
File List
statics.h
1
// Copyright 2009-2018 NTESS. Under the terms
2
// of Contract DE-NA0003525 with NTESS, the U.S.
3
// Government retains certain rights in this software.
4
//
5
// Copyright (c) 2009-2018, NTESS
6
// All rights reserved.
7
//
8
// This file is part of the SST software package. For license
9
// information, see the LICENSE file in the top level directory of the
10
// distribution.
11
12
#ifndef SST_CORE_SERIALIZATION_STATICS_H
13
#define SST_CORE_SERIALIZATION_STATICS_H
14
15
#include <list>
16
17
namespace
SST {
18
namespace
Core {
19
namespace
Serialization {
20
21
class
statics
{
22
public
:
23
typedef
void (*clear_fxn)(void);
24
25
static
void
26
register_finish(clear_fxn fxn);
27
28
static
void
29
finish();
30
31
protected
:
32
static
std::list<clear_fxn>* fxns_;
33
34
};
35
36
template
<
class
T>
37
class
need_delete_statics
{
38
public
:
39
need_delete_statics
(){
40
statics::register_finish(&T::delete_statics);
41
}
42
};
43
44
#define free_static_ptr(x) \
45
if (x) delete x; x = 0
46
47
}
48
}
49
}
50
51
#endif // STATICS_H
SST::Core::Serialization::statics
Definition:
statics.h:21
SST::Core::Serialization::need_delete_statics
Definition:
statics.h:37
src
sst
core
serialization
statics.h
Generated on Tue May 29 2018 08:43:29 for SST by
1.8.5