LuaReference.h 513 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. * LuaReference.h, part of VCMI engine
  3. *
  4. * Authors: listed in file AUTHORS in main folder
  5. *
  6. * License: GNU General Public License v2.0 or later
  7. * Full text of license available in license.txt file, in main folder
  8. *
  9. */
  10. #pragma once
  11. namespace scripting
  12. {
  13. class LuaReference : public boost::noncopyable
  14. {
  15. public:
  16. //pop from the top of stack
  17. LuaReference(lua_State * L);
  18. LuaReference(LuaReference && other);
  19. ~LuaReference();
  20. void push();
  21. private:
  22. bool doCleanup;
  23. int key;
  24. lua_State * l;
  25. };
  26. }