EditorMetricsPlainTextNameRegistration.cpp 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637
  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 "EditorDefs.h"
  9. #include "EditorMetricsPlainTextNameRegistration.h"
  10. namespace Editor
  11. {
  12. EditorMetricsPlainTextNameRegistrationBusListener::EditorMetricsPlainTextNameRegistrationBusListener()
  13. {
  14. AzFramework::MetricsPlainTextNameRegistrationBus::Handler::BusConnect();
  15. }
  16. EditorMetricsPlainTextNameRegistrationBusListener::~EditorMetricsPlainTextNameRegistrationBusListener()
  17. {
  18. AzFramework::MetricsPlainTextNameRegistrationBus::Handler::BusDisconnect();
  19. }
  20. void EditorMetricsPlainTextNameRegistrationBusListener::RegisterForNameSending(const AZStd::vector<AZ::Uuid>& typeIdsThatCanBeSentAsPlainText)
  21. {
  22. m_registeredTypeIds.insert(typeIdsThatCanBeSentAsPlainText.begin(), typeIdsThatCanBeSentAsPlainText.end());
  23. }
  24. bool EditorMetricsPlainTextNameRegistrationBusListener::IsTypeRegisteredForNameSending(const AZ::Uuid& typeId)
  25. {
  26. return (m_registeredTypeIds.find(typeId) != m_registeredTypeIds.end());
  27. }
  28. } // namespace editor