27 lines
416 B
C++
27 lines
416 B
C++
#ifndef jk_FUNCTION_HPP
|
|
#define jk_FUNCTION_HPP
|
|
|
|
#include "commons.hpp"
|
|
|
|
namespace jk
|
|
{
|
|
class Value;
|
|
|
|
using value_t = std::shared_ptr<Value>;
|
|
using foreign_t = std::function<value_t(std::vector<value_t>)>;
|
|
|
|
class Function
|
|
{
|
|
public:
|
|
explicit Function(foreign_t foreign);
|
|
virtual ~Function();
|
|
|
|
value_t call(std::vector<value_t> const& args);
|
|
|
|
private:
|
|
foreign_t m_foreign;
|
|
};
|
|
}
|
|
|
|
#endif
|