BsSavedResourceData.h 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsCorePrerequisites.h"
  5. #include "BsIReflectable.h"
  6. namespace BansheeEngine
  7. {
  8. /** @cond INTERNAL */
  9. /** @addtogroup Resources
  10. * @{
  11. */
  12. /**
  13. * Contains information about a resource saved to the disk.
  14. *
  15. * @note Purpose of this class is primarily to be a wrapper around a list of objects to make serialization easier.
  16. */
  17. class BS_CORE_EXPORT SavedResourceData : public IReflectable
  18. {
  19. public:
  20. SavedResourceData();
  21. SavedResourceData(const Vector<String>& dependencies, bool allowAsync);
  22. /** Returns a list of all resource dependencies. */
  23. const Vector<String>& getDependencies() const { return mDependencies; }
  24. /** Returns true if this resource is allow to be asynchronously loaded. */
  25. bool allowAsyncLoading() const { return mAllowAsync; }
  26. private:
  27. Vector<String> mDependencies;
  28. bool mAllowAsync;
  29. /************************************************************************/
  30. /* SERIALIZATION */
  31. /************************************************************************/
  32. public:
  33. friend class SavedResourceDataRTTI;
  34. static RTTITypeBase* getRTTIStatic();
  35. virtual RTTITypeBase* getRTTI() const override;
  36. };
  37. /** @} */
  38. /** @endcond */
  39. }