JSBHaxe.h 974 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. #pragma once
  2. #include <Atomic/Container/Str.h>
  3. using namespace Atomic;
  4. class JSBFunction;
  5. class JSBPackage;
  6. class JSBModule;
  7. namespace ToolCore
  8. {
  9. class JSBFunctionType;
  10. class JSBHaxe
  11. {
  12. public:
  13. void Emit(JSBPackage* package, const String& path);
  14. private:
  15. String source_;
  16. void Begin();
  17. void End();
  18. void ExportFunction(JSBFunction* function);
  19. String GetScriptType(JSBFunctionType* ftype);
  20. String GetPrimitiveType(JSBPrimitiveType* ptype);
  21. bool checkV(JSBClass* clazz, const String name, const String type);
  22. bool IsOverride(JSBFunction* function);
  23. JSBFunction* findFunctionInBase(JSBFunction* function);
  24. void ExportEnums(JSBModule* moduleName);
  25. void ExportModuleConstants(JSBModule* moduleName);
  26. void ExportModuleClasses(JSBModule* moduleName);
  27. void WriteToFile(const String& path);
  28. JSBPackage* package_;
  29. };
  30. }