Common.h 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (C) 2009-present, Panagiotis Christopoulos Charitos and contributors.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #pragma once
  6. #include <AnKi/Util/MemoryPool.h>
  7. namespace anki {
  8. // Forward
  9. class LuaBinder;
  10. class ScriptManager;
  11. class ScriptEnvironment;
  12. #define ANKI_SCRIPT_LOGI(...) ANKI_LOG("SCRI", kNormal, __VA_ARGS__)
  13. #define ANKI_SCRIPT_LOGE(...) ANKI_LOG("SCRI", kError, __VA_ARGS__)
  14. #define ANKI_SCRIPT_LOGW(...) ANKI_LOG("SCRI", kWarning, __VA_ARGS__)
  15. #define ANKI_SCRIPT_LOGF(...) ANKI_LOG("SCRI", kFatal, __VA_ARGS__)
  16. #define ANKI_SCRIPT_LOGV(...) ANKI_LOG("SCRI", kVerbose, __VA_ARGS__)
  17. class ScriptMemoryPool : public HeapMemoryPool, public MakeSingleton<ScriptMemoryPool>
  18. {
  19. template<typename>
  20. friend class MakeSingleton;
  21. private:
  22. ScriptMemoryPool(AllocAlignedCallback allocCb, void* allocCbUserData)
  23. : HeapMemoryPool(allocCb, allocCbUserData, "ScriptMemPool")
  24. {
  25. }
  26. ~ScriptMemoryPool() = default;
  27. };
  28. ANKI_DEFINE_SUBMODULE_UTIL_CONTAINERS(Script, ScriptMemoryPool)
  29. } // end namespace anki