BsSavedResourceData.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. /** @addtogroup Resources-Internal
  9. * @{
  10. */
  11. /**
  12. * Contains information about a resource saved to the disk.
  13. *
  14. * @note Purpose of this class is primarily to be a wrapper around a list of objects to make serialization easier.
  15. */
  16. class BS_CORE_EXPORT SavedResourceData : public IReflectable
  17. {
  18. public:
  19. SavedResourceData();
  20. SavedResourceData(const Vector<String>& dependencies, bool allowAsync);
  21. /** Returns a list of all resource dependencies. */
  22. const Vector<String>& getDependencies() const { return mDependencies; }
  23. /** Returns true if this resource is allow to be asynchronously loaded. */
  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 override;
  35. };
  36. /** @} */
  37. }