TAMSVIZ
Visualization and annotation tool for ROS
Main Page
Classes
Files
File List
src
core
destructor.h
1
// TAMSVIZ
2
// (c) 2020 Philipp Ruppel
3
4
#pragma once
5
6
#include <functional>
7
8
class
Destructor
{
9
std::function<void()> fn;
10
11
public
:
12
Destructor
() {}
13
Destructor
(
const
Destructor
&) =
delete
;
14
Destructor
&operator=(
const
Destructor
&) =
delete
;
15
Destructor
(
const
std::function<
void
()> &fn) : fn(fn) {}
16
Destructor
&operator=(
const
std::function<
void
()> &f) { fn = f; }
17
~
Destructor
() {
18
if
(fn) {
19
fn();
20
}
21
}
22
};
Destructor
Definition:
destructor.h:8
Generated by
1.8.11