JSBModuleWriter.h 846 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. namespace ToolCore
  11. {
  12. class JSBModule;
  13. class JSBModuleWriter
  14. {
  15. public:
  16. JSBModuleWriter(JSBModule* module);
  17. void GenerateSource(String& sourceOut);
  18. private:
  19. void WriteIncludes(String& source);
  20. void WriteForwardDeclarations(String& source);
  21. void WriteClassDeclaration(String& source);
  22. void WriteClassDefine(String& source);
  23. void WriteModulePreInit(String& source);
  24. void WriteModuleInit(String& source);
  25. JSBModule* module_;
  26. String source_;
  27. };
  28. }