Files
react-native/ReactCommon/react/renderer/mounting/StubView.h
T
David Vacca 8cfd329e9f Extend 'mounting' module to compile in OSS
Summary:
This diff extends the 'mounting' module to compile in OSS

changelog: [internal] internal

Reviewed By: JoshuaGross

Differential Revision: D22918205

fbshipit-source-id: 424e33c827cb03befaaed32897a19cd6eff2dd71
2020-08-06 11:53:04 -07:00

58 lines
1.4 KiB
C++

/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#pragma once
#include <memory>
#include <vector>
#include <react/renderer/core/LayoutMetrics.h>
#include <react/renderer/core/State.h>
#include <react/renderer/debug/debugStringConvertibleUtils.h>
#include <react/renderer/mounting/ShadowView.h>
namespace facebook {
namespace react {
class StubView final {
public:
using Shared = std::shared_ptr<StubView>;
StubView() = default;
StubView(StubView const &stubView) = default;
void update(ShadowView const &shadowView);
ComponentName componentName;
ComponentHandle componentHandle;
Tag tag;
SharedProps props;
SharedEventEmitter eventEmitter;
LayoutMetrics layoutMetrics;
State::Shared state;
std::vector<StubView::Shared> children;
};
bool operator==(StubView const &lhs, StubView const &rhs);
bool operator!=(StubView const &lhs, StubView const &rhs);
#if RN_DEBUG_STRING_CONVERTIBLE
std::string getDebugName(StubView const &stubView);
std::vector<DebugStringConvertibleObject> getDebugProps(
StubView const &stubView,
DebugStringConvertibleOptions options);
std::vector<StubView> getDebugChildren(
StubView const &stubView,
DebugStringConvertibleOptions options);
#endif
} // namespace react
} // namespace facebook