mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Summary: This diff opens a diffstack where we migrate the generation of all prop conversions (convertRawProp) and pretty-printing (debugStringConvertibleItem) functions to C++ templates (instead of using `#define`s). So, this diff implements base versions of those functions as templated functions. For now we still need #define-based version, but eventually, we will get rid of it. Reviewed By: fkgozali Differential Revision: D7958247 fbshipit-source-id: 24346297c1bd17e8054758f0eb84698eebfa21e2
48 lines
1.2 KiB
C++
48 lines
1.2 KiB
C++
/**
|
|
* Copyright (c) 2015-present, Facebook, Inc.
|
|
*
|
|
* This source code is licensed under the MIT license found in the
|
|
* LICENSE file in the root directory of this source tree.
|
|
*/
|
|
|
|
#include "ParagraphLocalData.h"
|
|
|
|
#include <fabric/debug/debugStringConvertibleUtils.h>
|
|
#include <fabric/attributedstring/debugStringConvertibleUtils.h>
|
|
|
|
namespace facebook {
|
|
namespace react {
|
|
|
|
AttributedString ParagraphLocalData::getAttributedString() const {
|
|
return attributedString_;
|
|
}
|
|
|
|
void ParagraphLocalData::setAttributedString(AttributedString attributedString) {
|
|
ensureUnsealed();
|
|
attributedString_ = attributedString;
|
|
}
|
|
|
|
SharedTextLayoutManager ParagraphLocalData::getTextLayoutManager() const {
|
|
return textLayoutManager_;
|
|
}
|
|
|
|
void ParagraphLocalData::setTextLayoutManager(SharedTextLayoutManager textLayoutManager) {
|
|
ensureUnsealed();
|
|
textLayoutManager_ = textLayoutManager;
|
|
}
|
|
|
|
#pragma mark - DebugStringConvertible
|
|
|
|
std::string ParagraphLocalData::getDebugName() const {
|
|
return "ParagraphLocalData";
|
|
}
|
|
|
|
SharedDebugStringConvertibleList ParagraphLocalData::getDebugProps() const {
|
|
return {
|
|
debugStringConvertibleItem("attributedString", attributedString_, "")
|
|
};
|
|
}
|
|
|
|
} // namespace react
|
|
} // namespace facebook
|