LUATargetContextTrackerMessages.h 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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_LUATARGETCONTEXTTRACKERMESSAGES_H
  9. #define LUAEDITOR_LUATARGETCONTEXTTRACKERMESSAGES_H
  10. #include <AzCore/base.h>
  11. #include <AzCore/EBus/EBus.h>
  12. #pragma once
  13. namespace LUAEditor
  14. {
  15. // messages going FROM the lua Context TO anyone interested in target contexts
  16. //class LUATargetContextTrackerMessages : public AZ::EBusTraits
  17. //{
  18. //public:
  19. // //////////////////////////////////////////////////////////////////////////
  20. // // Bus configuration
  21. // static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; // we have one bus that we always broadcast to
  22. // static const AZ::EBusHandlerPolicy HandlerPolicy = AZ:: EBusHandlerPolicy::Multiple; // we can have multiple listeners
  23. // //////////////////////////////////////////////////////////////////////////
  24. // typedef AZ::EBus<LUATargetContextTrackerMessages> Bus;
  25. // typedef Bus::Handler Handler;
  26. // virtual ~LUATargetContextTrackerMessages() {}
  27. //};
  28. // messages going TO the lua Context FROM anyone interested in retrieving or setting target context info
  29. class LUATargetContextRequestMessages
  30. : public AZ::EBusTraits
  31. {
  32. public:
  33. //////////////////////////////////////////////////////////////////////////
  34. // Bus configuration
  35. static const AZ::EBusAddressPolicy AddressPolicy = AZ::EBusAddressPolicy::Single; // we have one bus that we always broadcast to
  36. static const AZ::EBusHandlerPolicy HandlerPolicy = AZ:: EBusHandlerPolicy::Single; // we only have one listener
  37. //////////////////////////////////////////////////////////////////////////
  38. typedef AZ::EBus<LUATargetContextRequestMessages> Bus;
  39. typedef Bus::Handler Handler;
  40. virtual const AZStd::vector<AZStd::string> RequestTargetContexts() = 0;
  41. virtual const AZStd::string RequestCurrentTargetContext() = 0;
  42. virtual void SetCurrentTargetContext(AZStd::string& contextName) = 0;
  43. virtual ~LUATargetContextRequestMessages() {}
  44. };
  45. }
  46. #endif//LUAEDITOR_LUATARGETCONTEXTTRACKERMESSAGES_H