fakir/src/NativeFunction.hpp

27 lines
481 B
C++
Raw Normal View History

2023-09-20 15:17:13 +00:00
#ifndef fk_NATIVEFUNCTION_HPP
#define fk_NATIVEFUNCTION_HPP
#include "commons.hpp"
#include "Constant.hpp"
namespace fk
{
using native_t = std::function
<std::shared_ptr<Constant>(std::vector<std::shared_ptr<Constant>>)>;
class NativeFunction
{
public:
explicit NativeFunction(native_t native);
virtual ~NativeFunction();
std::shared_ptr<Constant>
call(std::vector<std::shared_ptr<Constant>> args);
private:
native_t m_native;
};
}
#endif