scriptDefs.h
Upload User: kairuinn
Upload Date: 2009-02-07
Package Size: 2922k
Code Size: 2k
Category:

Graph program

Development Platform:

Visual C++

  1. #ifndef __SCRIPT_DEFS_
  2. #define __SCRIPT_DEFS_
  3. #define MAX_CHARS_IN_ERROR 280
  4. int  sc_printf(const char *message,...);
  5. int  _hasArgs(lua_State* LS, int minArgs, char* method);
  6. void _argError(lua_State* LS, int arg, char* type, char* method);
  7. void _argMustBeMoreThanError(lua_State* LS, int arg, double minVal, char* method);
  8. void _argMustBeLessThanError(lua_State* LS, int arg, double maxVal, char* method);
  9. void _cantCreateObjectError(lua_State* LS, char* method);
  10. void _badObject(lua_State* LS);
  11. void _isArgNumber(lua_State* LS, int arg, char* method);
  12. void _isArgString(lua_State* LS, int arg, char* method);
  13. void _isArgPointer(lua_State* LS, int arg, char* method);
  14. void _isArgTable(lua_State* LS, int arg, char* method);
  15. void _isArgFunction(lua_State* LS, int arg, char* method);
  16. void _getTableElement(lua_State* LS, int table, int idx, int tag, char* type, char* method);
  17. bool _isChild(lua_State* LS, int arg, int tag);
  18. void _createInstance(lua_State* LS, int tag, void* pointer);
  19. void* _getInstance(lua_State* LS, int tableIndex = -2);
  20. void* _getSelfInstance(lua_State* LS);
  21. void _deleteSelfInstance(lua_State* LS);
  22. bool     _getBool(lua_State* LS, int nargs, int arg, bool def = false);
  23. int      _getInt(lua_State* LS, int nargs, int arg, int def);
  24. double   _getDouble(lua_State* LS, int nargs, int arg, float def);
  25. char*    _getString(lua_State* LS, int nargs, int arg);
  26. void*    _getPointer(lua_State* LS, int nargs, int arg);
  27. typedef lua_CFunction LLCFunction;
  28. void _addMethod(lua_State* LS, char* name, LLCFunction f);
  29. int  _methodFinder(lua_State* LS);
  30. void _setupClass(lua_State* LS, int& tag, void (*addMethods)(lua_State* LS),
  31. int parentTag = LUA_NOTAG) ;
  32. void _setDestroyer(lua_State* LS, int tag, LLCFunction destroyer) ;
  33. #endif