/TGame/TData/Format/DataFormatLua.cpp

http://awoe.googlecode.com/ · C++ · 19 lines · 15 code · 4 blank · 0 comment · 0 complexity · f33c6554a5629517643a55e2a2844cdb MD5 · raw file

  1. #include "stdafx.h"
  2. #include "DataFormatLua.h"
  3. #include "Manager/DataManagerLua.h"
  4. bool
  5. DataFormatLua::load(const string& fileName, IDataManager* mgr)
  6. {
  7. DataManagerLua::push(Lua::instance()->state(), mgr);
  8. Lua::instance()->push(fileName); // file name as table name of the data
  9. return Lua::instance()->call("onLoadDatas", 2, 0);
  10. }
  11. bool
  12. DataFormatLua::save(const string& fileName, IDataManager* mgr)
  13. {
  14. return true;
  15. }