ScriptResource.h 659 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. // Copyright (C) 2009-2021, 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/Resource/ResourceObject.h>
  7. namespace anki
  8. {
  9. /// @addtogroup resource
  10. /// @{
  11. /// Script resource.
  12. class ScriptResource : public ResourceObject
  13. {
  14. public:
  15. ScriptResource(ResourceManager* manager)
  16. : ResourceObject(manager)
  17. {
  18. }
  19. ~ScriptResource();
  20. ANKI_USE_RESULT Error load(const ResourceFilename& filename, Bool async);
  21. CString getSource() const
  22. {
  23. return m_source.toCString();
  24. }
  25. private:
  26. String m_source;
  27. };
  28. /// @}
  29. } // namespace anki