2 #include "namespaces.hh"
3 #include <boost/variant/variant.hpp>
7 #include "ext/luawrapper/include/LuaContext.hpp"
9 class BaseLua4 : public boost::noncopyable
12 std::unique_ptr<LuaContext> d_lw; // this is way on top because it must get destroyed _last_
16 void loadFile(const std::string& fname);
17 void loadString(const std::string& script);
18 void loadStream(std::istream& is);
19 virtual ~BaseLua4(); // this is so unique_ptr works with an incomplete type
21 void prepareContext();
22 virtual void postPrepareContext() = 0;
23 virtual void postLoad() = 0;
24 typedef vector<pair<string, int>> in_t;
25 vector<pair<string, boost::variant<int, in_t, struct timeval*>>> d_pd;
26 typedef vector<pair<string, boost::variant<string, bool, int, double>>> Features;
27 virtual void getFeatures(Features&);