zioinfo-mail/app/node_modules/react-native/ReactCommon/react/renderer/mounting/MountingTransaction.h
DESKTOP-TKLFCPR\ython 11c670f2a0 refactor: 101.79.17.164 → zioinfo.co.kr 전체 도메인 변환 + Manager UI 배포
- 37개 파일 IP → zioinfo.co.kr 치환 (소스/매뉴얼/설정/하네스)
- Manager DrConsole/NetworkConsole/CsapConsole 빌드 + /var/www/manager/ 배포
- 테스트: Manager HTTP 200, ITSM 신규 API 7개 전체 200

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-31 10:09:17 +09:00

96 lines
2.8 KiB
C++

/*
* Copyright (c) Meta Platforms, Inc. and 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 <react/renderer/mounting/ShadowViewMutation.h>
#include <react/renderer/telemetry/SurfaceTelemetry.h>
#include <react/renderer/telemetry/TransactionTelemetry.h>
namespace facebook::react {
/*
* Encapsulates all artifacts of `ShadowTree` commit (or a series of them),
* particularly list of mutations and meta-data associated with the commit.
* Movable and copyable, but moving is strongly encouraged.
* Beware: A moved-from object of this type has unspecified value and accessing
* that is UB (Undefined Behaviour).
*/
class MountingTransaction final {
public:
/*
* A Number (or revision) grows continuously starting from `1`. Value `0`
* represents the state before the very first transaction happens.
*/
using Number = int64_t;
/*
* Copying a list of `ShadowViewMutation` is expensive, so the constructor
* accepts it as rvalue reference to discourage copying.
*/
MountingTransaction(
SurfaceId surfaceId,
Number number,
ShadowViewMutationList&& mutations,
TransactionTelemetry telemetry);
/*
* Copy semantic.
* Copying of MountingTransaction is expensive, so copy-constructor is
* explicit and copy-assignment is deleted to prevent accidental copying.
*/
explicit MountingTransaction(const MountingTransaction& mountingTransaction) =
default;
MountingTransaction& operator=(const MountingTransaction& other) = delete;
/*
* Move semantic.
*/
MountingTransaction(MountingTransaction&& mountingTransaction) noexcept =
default;
MountingTransaction& operator=(MountingTransaction&& other) = default;
/*
* Returns a list of mutations that represent the transaction. The list can be
* empty (theoretically).
*/
const ShadowViewMutationList& getMutations() const&;
ShadowViewMutationList getMutations() &&;
/*
* Returns telemetry associated with this transaction.
*/
TransactionTelemetry& getTelemetry() const;
/*
* Returns the id of the surface that the transaction belongs to.
*/
SurfaceId getSurfaceId() const;
/*
* Returns a sequential number of the particular transaction.
*/
Number getNumber() const;
/*
* Merges the given transaction in the current transaction, so they
* can be executed atomatically as a single transaction.
*
* This is required for Android UI, which needs to separately apply
* each ShadowTree mutation due to differences in props representation.
*/
void mergeWith(MountingTransaction&& transaction);
private:
SurfaceId surfaceId_;
Number number_;
ShadowViewMutationList mutations_;
mutable TransactionTelemetry telemetry_;
};
} // namespace facebook::react