• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_MINI_TABLE_SUB_H_
9 #define UPB_MINI_TABLE_SUB_H_
10 
11 #include "upb/mini_table/enum.h"
12 #include "upb/mini_table/internal/sub.h"
13 #include "upb/mini_table/message.h"
14 
15 // Must be last.
16 #include "upb/port/def.inc"
17 
18 typedef union upb_MiniTableSub upb_MiniTableSub;
19 
20 #ifdef __cplusplus
21 extern "C" {
22 #endif
23 
24 // Constructors
25 
26 UPB_API_INLINE upb_MiniTableSub
27 upb_MiniTableSub_FromEnum(const upb_MiniTableEnum* subenum);
28 
29 UPB_API_INLINE upb_MiniTableSub
30 upb_MiniTableSub_FromMessage(const upb_MiniTable* submsg);
31 
32 // Getters
33 
34 UPB_API_INLINE const upb_MiniTableEnum* upb_MiniTableSub_Enum(
35     upb_MiniTableSub sub);
36 
37 UPB_API_INLINE const upb_MiniTable* upb_MiniTableSub_Message(
38     upb_MiniTableSub sub);
39 
40 #ifdef __cplusplus
41 } /* extern "C" */
42 #endif
43 
44 #include "upb/port/undef.inc"
45 
46 #endif /* UPB_MINI_TABLE_SUB_H_ */
47