Common.h 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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/Logger.h>
  7. #include <AnKi/Util/MemoryPool.h>
  8. #include <AnKi/Util/HashMap.h>
  9. namespace anki {
  10. /// @addtogroup importer
  11. /// @{
  12. #define ANKI_IMPORTER_LOGI(...) ANKI_LOG("IMPR", kNormal, __VA_ARGS__)
  13. #define ANKI_IMPORTER_LOGV(...) ANKI_LOG("IMPR", kVerbose, __VA_ARGS__)
  14. #define ANKI_IMPORTER_LOGE(...) ANKI_LOG("IMPR", kError, __VA_ARGS__)
  15. #define ANKI_IMPORTER_LOGW(...) ANKI_LOG("IMPR", kWarning, __VA_ARGS__)
  16. #define ANKI_IMPORTER_LOGF(...) ANKI_LOG("IMPR", kFatal, __VA_ARGS__)
  17. class ImporterMemoryPool : public HeapMemoryPool, public MakeSingleton<ImporterMemoryPool>
  18. {
  19. template<typename>
  20. friend class MakeSingleton;
  21. private:
  22. ImporterMemoryPool(AllocAlignedCallback allocCb, void* allocCbUserData)
  23. : HeapMemoryPool(allocCb, allocCbUserData, "ImporterMemPool")
  24. {
  25. }
  26. ~ImporterMemoryPool() = default;
  27. };
  28. ANKI_DEFINE_SUBMODULE_UTIL_CONTAINERS(Importer, ImporterMemoryPool)
  29. /// @}
  30. } // end namespace anki