DebugStringConvertibleItem.cpp 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. /*
  2. * Copyright (c) Facebook, Inc. and its affiliates.
  3. *
  4. * This source code is licensed under the MIT license found in the
  5. * LICENSE file in the root directory of this source tree.
  6. */
  7. #include "DebugStringConvertibleItem.h"
  8. namespace facebook {
  9. namespace react {
  10. #if RN_DEBUG_STRING_CONVERTIBLE
  11. DebugStringConvertibleItem::DebugStringConvertibleItem(
  12. const std::string &name,
  13. const std::string &value,
  14. const SharedDebugStringConvertibleList &props,
  15. const SharedDebugStringConvertibleList &children)
  16. : name_(name), value_(value), debugProps_(props), children_(children) {}
  17. std::string DebugStringConvertibleItem::getDebugName() const {
  18. return name_;
  19. }
  20. std::string DebugStringConvertibleItem::getDebugValue() const {
  21. return value_;
  22. }
  23. SharedDebugStringConvertibleList DebugStringConvertibleItem::getDebugProps()
  24. const {
  25. return debugProps_;
  26. }
  27. SharedDebugStringConvertibleList DebugStringConvertibleItem::getDebugChildren()
  28. const {
  29. return children_;
  30. }
  31. #endif
  32. } // namespace react
  33. } // namespace facebook