LUALocalsTrackerMessages.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. #ifndef LUAEDITOR_LUALOCALSTRACKERMESSAGES_H
  9. #define LUAEDITOR_LUALOCALSTRACKERMESSAGES_H
  10. #include <AzCore/base.h>
  11. #include <AzCore/EBus/EBus.h>
  12. #pragma once
  13. namespace LUAEditor
  14. {
  15. typedef AZStd::vector<AZStd::string> LocalsList;
  16. // messages going FROM the lua Context TO anyone interested in local variables updates (aka the locals panel)
  17. class LUALocalsTrackerMessages
  18. : public AZ::EBusTraits
  19. {
  20. public:
  21. //////////////////////////////////////////////////////////////////////////
  22. // Bus configuration
  23. static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; // we have one bus that we always broadcast to
  24. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ:: EBusHandlerPolicy::Multiple; // we can have multiple listeners
  25. //////////////////////////////////////////////////////////////////////////
  26. typedef AZ::EBus<LUALocalsTrackerMessages> Bus;
  27. typedef Bus::Handler Handler;
  28. virtual void LocalsUpdate(const AZStd::vector<AZStd::string>& vars) = 0;
  29. virtual void LocalsClear() = 0;
  30. virtual ~LUALocalsTrackerMessages() {}
  31. };
  32. // messages going TO the lua Context FROM anyone interested in retrieving local variables info
  33. //class LUALocalsRequestMessages : public AZ::EBusTraits
  34. //{
  35. //public:
  36. // //////////////////////////////////////////////////////////////////////////
  37. // // Bus configuration
  38. // static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; // we have one bus that we always broadcast to
  39. // static const AZ::EBusHandlerPolicy HandlerPolicy = AZ:: EBusHandlerPolicy::Single; // we only have one listener
  40. // //////////////////////////////////////////////////////////////////////////
  41. // typedef AZ::EBus<LUALocalsRequestMessages> Bus;
  42. // typedef Bus::Handler Handler;
  43. // virtual void RequestLocalsClicked(const AZStd::string& name) = 0;
  44. // virtual ~LUALocalsRequestMessages() {}
  45. //};
  46. }
  47. #endif//LUAEDITOR_LUALOCALSTRACKERMESSAGES_H