BsSavedResourceData.h 1.1 KB

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