JSBHaxe.h 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. //
  2. // Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
  3. // LICENSE: Atomic Game Engine Editor and Tools EULA
  4. // Please see LICENSE_ATOMIC_EDITOR_AND_TOOLS.md in repository root for
  5. // license information: https://github.com/AtomicGameEngine/AtomicGameEngine
  6. //
  7. #pragma once
  8. #include <Atomic/Container/Str.h>
  9. using namespace Atomic;
  10. class JSBFunction;
  11. class JSBPackage;
  12. class JSBModule;
  13. namespace ToolCore
  14. {
  15. class JSBFunctionType;
  16. class JSBHaxe
  17. {
  18. public:
  19. void Emit(JSBPackage* package, const String& path);
  20. private:
  21. String source_;
  22. void Begin();
  23. void End();
  24. void ExportFunction(JSBFunction* function);
  25. String GetScriptType(JSBFunctionType* ftype);
  26. String GetPrimitiveType(JSBPrimitiveType* ptype);
  27. bool checkV(JSBClass* clazz, const String name, const String type);
  28. bool IsOverride(JSBFunction* function);
  29. JSBFunction* findFunctionInBase(JSBFunction* function);
  30. void ExportEnums(JSBModule* moduleName);
  31. void ExportModuleConstants(JSBModule* moduleName);
  32. void ExportModuleClasses(JSBModule* moduleName);
  33. void WriteToFile(const String& path);
  34. JSBPackage* package_;
  35. };
  36. }