GNU Octave
6.2.0
A high-level interpreted language, primarily intended for numerical computations, mostly compatible with Matlab
singleton-cleanup.cc
Go to the documentation of this file.
1
////////////////////////////////////////////////////////////////////////
2
//
3
// Copyright (C) 2012-2021 The Octave Project Developers
4
//
5
// See the file COPYRIGHT.md in the top-level directory of this
6
// distribution or <https://octave.org/copyright/>.
7
//
8
// This file is part of Octave.
9
//
10
// Octave is free software: you can redistribute it and/or modify it
11
// under the terms of the GNU General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
14
//
15
// Octave is distributed in the hope that it will be useful, but
16
// WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU General Public License for more details.
19
//
20
// You should have received a copy of the GNU General Public License
21
// along with Octave; see the file COPYING. If not, see
22
// <https://www.gnu.org/licenses/>.
23
//
24
////////////////////////////////////////////////////////////////////////
25
26
#if defined (HAVE_CONFIG_H)
27
# include "config.h"
28
#endif
29
30
#include "
lo-error.h
"
31
#include "
singleton-cleanup.h
"
32
33
singleton_cleanup_list
*
singleton_cleanup_list::s_instance
=
nullptr
;
34
35
singleton_cleanup_list::~singleton_cleanup_list
(
void
)
36
{
37
for
(
fptr
fcn :
m_fcn_list
)
38
{
39
fcn ();
40
}
41
}
42
43
bool
44
singleton_cleanup_list::instance_ok
(
void
)
45
{
46
bool
retval
=
true
;
47
48
if
(!
s_instance
)
49
s_instance
=
new
singleton_cleanup_list
();
50
51
return
retval
;
52
}
singleton_cleanup_list
Definition:
singleton-cleanup.h:36
singleton_cleanup_list::~singleton_cleanup_list
~singleton_cleanup_list(void)
Definition:
singleton-cleanup.cc:35
singleton_cleanup_list::m_fcn_list
std::set< fptr > m_fcn_list
Definition:
singleton-cleanup.h:77
singleton_cleanup_list::s_instance
static singleton_cleanup_list * s_instance
Definition:
singleton-cleanup.h:67
singleton_cleanup_list::fptr
void(* fptr)(void)
Definition:
singleton-cleanup.h:43
singleton_cleanup_list::singleton_cleanup_list
singleton_cleanup_list(void)
Definition:
singleton-cleanup.h:39
singleton_cleanup_list::instance_ok
static bool instance_ok(void)
Definition:
singleton-cleanup.cc:44
lo-error.h
retval
octave_value::octave_value(const Array< char > &chm, char type) return retval
Definition:
ov.cc:811
singleton-cleanup.h
liboctave
util
singleton-cleanup.cc
Generated on Tue Apr 13 2021 15:27:51 for GNU Octave by
1.9.1