SharedDataSlotExample.cpp 1.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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 "SharedDataSlotExample.h"
  9. namespace ScriptCanvasTesting
  10. {
  11. namespace Nodeables
  12. {
  13. AZStd::string InputMethodSharedDataSlotExample::AppendHello(const ScriptCanvas::Data::StringType& arg)
  14. {
  15. return AZStd::string::format("%sHello", arg.c_str());
  16. }
  17. AZStd::string InputMethodSharedDataSlotExample::ConcatenateTwo(const ScriptCanvas::Data::StringType& arg1, const ScriptCanvas::Data::StringType& arg2)
  18. {
  19. return AZStd::string::format("%s%s", arg1.c_str(), arg2.c_str());
  20. }
  21. AZStd::string InputMethodSharedDataSlotExample::ConcatenateThree(const ScriptCanvas::Data::StringType& arg1, const ScriptCanvas::Data::StringType& arg2, const ScriptCanvas::Data::StringType& arg3)
  22. {
  23. return AZStd::string::format("%s%s%s", arg1.c_str(), arg2.c_str(), arg3.c_str());
  24. }
  25. void BranchMethodSharedDataSlotExample::StringMagicbox(int arg)
  26. {
  27. switch (arg)
  28. {
  29. case 1:
  30. CallOneString("Hello1");
  31. break;
  32. case 2:
  33. CallTwoStrings("Bob", "Hello2");
  34. break;
  35. case 3:
  36. CallThreeStrings("Square", "Pants", "Hello3");
  37. break;
  38. }
  39. }
  40. }
  41. }