Script.h 661 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. // Copyright (C) 2009-2015, Panagiotis Christopoulos Charitos.
  2. // All rights reserved.
  3. // Code licensed under the BSD License.
  4. // http://www.anki3d.org/LICENSE
  5. #ifndef ANKI_RESOURCE_SCRIPT_H
  6. #define ANKI_RESOURCE_SCRIPT_H
  7. #include "anki/resource/Common.h"
  8. namespace anki {
  9. /// @addtogroup resource
  10. /// @{
  11. /// Script resource.
  12. class Script
  13. {
  14. public:
  15. Script(ResourceAllocator<U8>&)
  16. {}
  17. ~Script();
  18. ANKI_USE_RESULT Error load(
  19. const CString& filename, ResourceInitializer& init);
  20. CString getSource() const
  21. {
  22. return m_source.toCString();
  23. }
  24. private:
  25. ResourceString m_source;
  26. ResourceAllocator<char> m_alloc;
  27. };
  28. /// @}
  29. } // end namespace
  30. #endif