Files
NazaraEngine/include/Nazara/Core/CallOnExit.hpp
Lynix c42eff2db0 Added CallOnExit class
Former-commit-id: d4b6bb17a8183f46e4631d727fc8056eb2fcb254
2014-02-18 01:01:30 +01:00

29 lines
539 B
C++

// Copyright (C) 2014 Jérôme Leclercq
// This file is part of the "Nazara Engine - Core module"
// For conditions of distribution and use, see copyright notice in Config.hpp
#pragma once
#ifndef NAZARA_CALLONEXIT_HPP
#define NAZARA_CALLONEXIT_HPP
#include <Nazara/Prerequesites.hpp>
class NzCallOnExit
{
using Func = void (*)();
public:
NzCallOnExit(Func func = nullptr);
~NzCallOnExit();
void Reset(Func func = nullptr);
private:
Func m_func;
};
#include <Nazara/Core/CallOnExit.inl>
#endif // NAZARA_CALLONEXIT_HPP