ReadOnlyDataInterface.cpp 710 B

12345678910111213141516171819202122232425262728
  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. // Graph Model
  9. #include <GraphModel/Integration/ReadOnlyDataInterface.h>
  10. #include <GraphModel/Integration/IntegrationBus.h>
  11. namespace GraphModelIntegration
  12. {
  13. ReadOnlyDataInterface::ReadOnlyDataInterface(GraphModel::SlotPtr slot)
  14. : m_slot(slot)
  15. {
  16. }
  17. AZStd::string ReadOnlyDataInterface::GetString() const
  18. {
  19. if (GraphModel::SlotPtr slot = m_slot.lock())
  20. {
  21. return slot->GetValue<AZStd::string>();
  22. }
  23. return "";
  24. }
  25. }