BsProjectLibraryEntries.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. //********************************** Banshee Engine (www.banshee3d.com) **************************************************//
  2. //**************** Copyright (c) 2016 Marko Pintera ([email protected]). All rights reserved. **********************//
  3. #pragma once
  4. #include "BsEditorPrerequisites.h"
  5. #include "BsProjectLibrary.h"
  6. #include "BsIReflectable.h"
  7. namespace BansheeEngine
  8. {
  9. /** @cond INTERNAL */
  10. /** @addtogroup Library
  11. * @{
  12. */
  13. /**
  14. * Contains a list of entries used by the ProjectLibrary. Used primarily for serialization purposes, i.e. persisting
  15. * ProjectLibrary state between application runs.
  16. */
  17. class ProjectLibraryEntries : public IReflectable
  18. {
  19. struct ConstructPrivately { };
  20. public:
  21. explicit ProjectLibraryEntries(const ConstructPrivately& dummy);
  22. ProjectLibraryEntries(const ProjectLibrary::DirectoryEntry& rootEntry);
  23. /**
  24. * Creates new project library entries based on a ProjectLibrary root directory entry.
  25. *
  26. * @param[in] rootEntry Root directory entry in ProjectLibrary.
  27. */
  28. static std::shared_ptr<ProjectLibraryEntries> create(const ProjectLibrary::DirectoryEntry& rootEntry);
  29. /** Returns the root directory entry that references the entire entry hierarchy. */
  30. const ProjectLibrary::DirectoryEntry& getRootEntry() const { return mRootEntry; }
  31. private:
  32. ProjectLibrary::DirectoryEntry mRootEntry;
  33. /************************************************************************/
  34. /* SERIALIZATION */
  35. /************************************************************************/
  36. /** Creates new empty project library entries object. Used for serialization purposes. */
  37. static std::shared_ptr<ProjectLibraryEntries> createEmpty();
  38. public:
  39. friend class ProjectLibraryEntriesRTTI;
  40. static RTTITypeBase* getRTTIStatic();
  41. virtual RTTITypeBase* getRTTI() const override;
  42. };
  43. /** @} */
  44. /** @endcond */
  45. }