GemRepoInfo.cpp 850 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * Copyright (c) Contributors to the Open 3D Engine Project.
  3. * For complete copyright and license terms please see the LICENSE at the root of this distribution.
  4. *
  5. * SPDX-License-Identifier: Apache-2.0 OR MIT
  6. *
  7. */
  8. #include <GemRepo/GemRepoInfo.h>
  9. namespace O3DE::ProjectManager
  10. {
  11. GemRepoInfo::GemRepoInfo(
  12. const QString& name,
  13. const QString& creator,
  14. const QDateTime& lastUpdated,
  15. bool isEnabled = true)
  16. : m_name(name)
  17. , m_origin(creator)
  18. , m_lastUpdated(lastUpdated)
  19. , m_isEnabled(isEnabled)
  20. {
  21. }
  22. bool GemRepoInfo::IsValid() const
  23. {
  24. return !m_name.isEmpty();
  25. }
  26. bool GemRepoInfo::operator<(const GemRepoInfo& gemRepoInfo) const
  27. {
  28. return (m_lastUpdated < gemRepoInfo.m_lastUpdated);
  29. }
  30. } // namespace O3DE::ProjectManager