ScriptResource.h 659 B

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