BsSavedResourceData.h 1.2 KB

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