2018-03-08 17:50:17 -08:00
|
|
|
/**
|
2018-09-11 15:27:47 -07:00
|
|
|
* Copyright (c) Facebook, Inc. and its affiliates.
|
2018-03-08 17:50:17 -08:00
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "DebugStringConvertibleItem.h"
|
|
|
|
|
|
|
|
namespace facebook {
|
|
|
|
namespace react {
|
|
|
|
|
2018-09-28 10:24:38 -07:00
|
|
|
#if RN_DEBUG_STRING_CONVERTIBLE
|
|
|
|
|
2018-03-08 17:50:17 -08:00
|
|
|
DebugStringConvertibleItem::DebugStringConvertibleItem(
|
2018-10-09 16:25:13 -07:00
|
|
|
const std::string &name,
|
|
|
|
const std::string &value,
|
|
|
|
const SharedDebugStringConvertibleList &props,
|
|
|
|
const SharedDebugStringConvertibleList &children)
|
|
|
|
: name_(name), value_(value), props_(props), children_(children) {}
|
2018-03-08 17:50:17 -08:00
|
|
|
|
|
|
|
std::string DebugStringConvertibleItem::getDebugName() const {
|
|
|
|
return name_;
|
|
|
|
}
|
|
|
|
|
|
|
|
std::string DebugStringConvertibleItem::getDebugValue() const {
|
|
|
|
return value_;
|
|
|
|
}
|
|
|
|
|
2018-10-09 16:25:13 -07:00
|
|
|
SharedDebugStringConvertibleList DebugStringConvertibleItem::getDebugProps()
|
|
|
|
const {
|
2018-03-08 17:50:17 -08:00
|
|
|
return props_;
|
|
|
|
}
|
|
|
|
|
2018-10-09 16:25:13 -07:00
|
|
|
SharedDebugStringConvertibleList DebugStringConvertibleItem::getDebugChildren()
|
|
|
|
const {
|
2018-03-08 17:50:17 -08:00
|
|
|
return children_;
|
|
|
|
}
|
|
|
|
|
2018-09-28 10:24:38 -07:00
|
|
|
#endif
|
|
|
|
|
2018-03-08 17:50:17 -08:00
|
|
|
} // namespace react
|
|
|
|
} // namespace facebook
|