WPILibC++ 2027.0.0-alpha-3
Loading...
Searching...
No Matches
copy.h
Go to the documentation of this file.
1// Protocol Buffers - Google's data interchange format
2// Copyright 2023 Google LLC. All rights reserved.
3//
4// Use of this source code is governed by a BSD-style
5// license that can be found in the LICENSE file or at
6// https://developers.google.com/open-source/licenses/bsd
7
8#ifndef UPB_MESSAGE_COPY_H_
9#define UPB_MESSAGE_COPY_H_
10
11#include "upb/mem/arena.h"
12#include "upb/message/array.h"
13#include "upb/message/map.h"
14#include "upb/message/message.h"
16
17// Must be last.
18#include "upb/port/def.inc"
19
20#ifdef __cplusplus
21extern "C" {
22#endif
23
24// Deep clones a message using the provided target arena.
26 const upb_MiniTable* m, upb_Arena* arena);
27
28// Shallow clones a message using the provided target arena.
30 const upb_MiniTable* m, upb_Arena* arena);
31
32// Deep clones array contents.
34 const upb_MiniTable* sub, upb_Arena* arena);
35
36// Deep clones map contents.
38 upb_CType value_type,
39 const upb_MiniTable* map_entry_table,
40 upb_Arena* arena);
41
42// Deep copies the message from src to dst.
44 const upb_MiniTable* m, upb_Arena* arena);
45
46// Shallow copies the message from src to dst.
48 const upb_MiniTable* m);
49
50#ifdef __cplusplus
51} /* extern "C" */
52#endif
53
54#include "upb/port/undef.inc"
55
56#endif // UPB_MESSAGE_COPY_H_
bool upb_Message_DeepCopy(upb_Message *dst, const upb_Message *src, const upb_MiniTable *m, upb_Arena *arena)
upb_Message * upb_Message_DeepClone(const upb_Message *msg, const upb_MiniTable *m, upb_Arena *arena)
upb_Map * upb_Map_DeepClone(const upb_Map *map, upb_CType key_type, upb_CType value_type, const upb_MiniTable *map_entry_table, upb_Arena *arena)
upb_Message * upb_Message_ShallowClone(const upb_Message *msg, const upb_MiniTable *m, upb_Arena *arena)
upb_Array * upb_Array_DeepClone(const upb_Array *array, upb_CType value_type, const upb_MiniTable *sub, upb_Arena *arena)
void upb_Message_ShallowCopy(upb_Message *dst, const upb_Message *src, const upb_MiniTable *m)
upb_CType
Definition descriptor_constants.h:18
Definition arena.h:29
Definition array.h:30
Definition map.h:38
Definition types.h:18
Definition message.h:54