/* * Copyright (c) 2013 Remko Tronçon * Licensed under the GNU General Public License. * See the COPYING file for more information. */ #pragma once #include #include #include #include struct lua_State; namespace Swift { class Element; class LuaElementConvertor { public: static boost::optional NO_RESULT; struct Documentation { Documentation(const std::string& className, const std::string& description) : className(className), description(description) {} std::string className; std::string description; }; virtual ~LuaElementConvertor(); virtual boost::shared_ptr convertFromLua(lua_State*, int index, const std::string& type) = 0; virtual boost::optional convertToLua(lua_State*, boost::shared_ptr) = 0; virtual boost::optional getDocumentation() const { return boost::optional(); } }; }