TestDeviceAttribute.cpp 967 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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 "TestDeviceAttribute.h"
  9. namespace UnitTest
  10. {
  11. TestDeviceAttribute::TestDeviceAttribute(AZStd::string_view name, AZStd::string_view description, AZStd::any value, EvalFunc eval)
  12. : m_name(name)
  13. , m_description(description)
  14. , m_eval(eval)
  15. , m_value(value)
  16. {
  17. }
  18. AZStd::string_view TestDeviceAttribute::GetName() const
  19. {
  20. return m_name;
  21. }
  22. AZStd::string_view TestDeviceAttribute::GetDescription() const
  23. {
  24. return m_description;
  25. }
  26. bool TestDeviceAttribute::Evaluate(AZStd::string_view rule) const
  27. {
  28. return m_eval(rule);
  29. }
  30. AZStd::any TestDeviceAttribute::GetValue() const
  31. {
  32. return m_value;
  33. }
  34. } // namespace UnitTest