BsUtility.h 914 B

123456789101112131415161718192021222324252627282930313233
  1. #pragma once
  2. #include "BsCorePrerequisites.h"
  3. namespace BansheeEngine
  4. {
  5. /**
  6. * @brief Static class containing various utility methods that do not
  7. * fit anywhere else.
  8. */
  9. class BS_CORE_EXPORT Utility
  10. {
  11. public:
  12. /**
  13. * @brief Finds all resources referenced by the specified object.
  14. *
  15. * @param object Object to search for resource dependencies.
  16. * @param recursive Determines whether or not child objects will also be
  17. * searched (if object has any children).
  18. *
  19. * @returns A list of unique, non-null resources.
  20. */
  21. static Vector<HResource> findResourceDependencies(IReflectable& object, bool recursive = true);
  22. private:
  23. /**
  24. * @brief Helper method for for recursion when finding resource dependencies.
  25. *
  26. * @see findDependencies
  27. */
  28. static void findResourceDependenciesInternal(IReflectable& object, bool recursive, Map<String, HResource>& dependencies);
  29. };
  30. }