ScriptResource.h 667 B

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