Valentin Shergin 368388bfc8 Fabric: Introducing LocalData concept
Summary:
LocalData might be used to communicate some infomation between `ShadowNode`s
and native component views.

We will use it soon to store (and transmit to mounting layer) prepared for rendering attributed text in Text component.

Reviewed By: mdvacca

Differential Revision: D7738582

fbshipit-source-id: 1ead23ffd105cce0b3d9aeb9fc1d0df47673be50
2018-04-26 18:03:07 -07:00

37 lines
863 B
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.
*/
#pragma once
#include <fabric/core/Sealable.h>
#include <fabric/debug/DebugStringConvertible.h>
namespace facebook {
namespace react {
class LocalData;
using SharedLocalData = std::shared_ptr<const LocalData>;
/*
* Abstract class for any kind of concrete pieces of local data specific for
* some kinds of `ShadowNode`s.
* LocalData might be used to communicate some infomation between `ShadowNode`s
* and native component views.
* All `LocalData` objects *must* be immutable (sealed) when they became
* a part of the shadow tree.
*/
class LocalData:
public Sealable,
public DebugStringConvertible {
// Nothing.
};
} // namespace react
} // namespace facebook