Franky 1.1.0
A High-Level Motion API for Franka
Loading...
Searching...
No Matches
scope_guard.hpp
Go to the documentation of this file.
1#include <functional>
2#include <utility>
3
4namespace franky {
5
10 public:
17 explicit scope_guard(std::function<void()> f) : f_(std::move(f)) {}
18
19 ~scope_guard() { f_(); }
20
21 private:
22 std::function<void()> f_;
23};
24
25} // namespace franky
A scope guard that executes a function when it goes out of scope.
Definition scope_guard.hpp:9
~scope_guard()
Definition scope_guard.hpp:19
scope_guard(std::function< void()> f)
Constructor that takes a function to execute when the guard goes out of scope.
Definition scope_guard.hpp:17
Definition dynamics_limit.cpp:8
std::array< double, dims > toStdD(const Eigen::Matrix< double, dims, 1 > &vector)
Definition util.hpp:18