LuaDataFormatter.h 760 B

12345678910111213141516171819202122232425262728
  1. #ifndef ROCKETCORELUALUADATAFORMATTER_H
  2. #define ROCKETCORELUALUADATAFORMATTER_H
  3. #include <Rocket/Core/Lua/lua.hpp>
  4. #include <Rocket/Controls/DataFormatter.h>
  5. using Rocket::Controls::DataFormatter;
  6. namespace Rocket {
  7. namespace Core {
  8. namespace Lua {
  9. class LuaDataFormatter : public Rocket::Controls::DataFormatter
  10. {
  11. public:
  12. LuaDataFormatter(const String& name = "");
  13. ~LuaDataFormatter();
  14. virtual void FormatData(Rocket::Core::String& formatted_data, const Rocket::Core::StringList& raw_data);
  15. //Helper function used to push on to the stack the table where the function ref should be stored
  16. static void PushDataFormatterFunctionTable(lua_State* L);
  17. int ref_FormatData; //the lua reference to the FormatData function
  18. };
  19. }
  20. }
  21. }
  22. #endif