Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:13:18

0001 // Protocol Buffers - Google's data interchange format
0002 // Copyright 2023 Google LLC.  All rights reserved.
0003 //
0004 // Use of this source code is governed by a BSD-style
0005 // license that can be found in the LICENSE file or at
0006 // https://developers.google.com/open-source/licenses/bsd
0007 
0008 #ifndef UPB_MINI_TABLE_INTERNAL_FILE_H_
0009 #define UPB_MINI_TABLE_INTERNAL_FILE_H_
0010 
0011 // Must be last.
0012 #include "upb/port/def.inc"
0013 
0014 struct upb_MiniTableFile {
0015   const struct upb_MiniTable** UPB_PRIVATE(msgs);
0016   const struct upb_MiniTableEnum** UPB_PRIVATE(enums);
0017   const struct upb_MiniTableExtension** UPB_PRIVATE(exts);
0018   int UPB_PRIVATE(msg_count);
0019   int UPB_PRIVATE(enum_count);
0020   int UPB_PRIVATE(ext_count);
0021 };
0022 
0023 #ifdef __cplusplus
0024 extern "C" {
0025 #endif
0026 
0027 UPB_API_INLINE int upb_MiniTableFile_EnumCount(
0028     const struct upb_MiniTableFile* f) {
0029   return f->UPB_PRIVATE(enum_count);
0030 }
0031 
0032 UPB_API_INLINE int upb_MiniTableFile_ExtensionCount(
0033     const struct upb_MiniTableFile* f) {
0034   return f->UPB_PRIVATE(ext_count);
0035 }
0036 
0037 UPB_API_INLINE int upb_MiniTableFile_MessageCount(
0038     const struct upb_MiniTableFile* f) {
0039   return f->UPB_PRIVATE(msg_count);
0040 }
0041 
0042 UPB_API_INLINE const struct upb_MiniTableEnum* upb_MiniTableFile_Enum(
0043     const struct upb_MiniTableFile* f, int i) {
0044   UPB_ASSERT(i < f->UPB_PRIVATE(enum_count));
0045   return f->UPB_PRIVATE(enums)[i];
0046 }
0047 
0048 UPB_API_INLINE const struct upb_MiniTableExtension* upb_MiniTableFile_Extension(
0049     const struct upb_MiniTableFile* f, int i) {
0050   UPB_ASSERT(i < f->UPB_PRIVATE(ext_count));
0051   return f->UPB_PRIVATE(exts)[i];
0052 }
0053 
0054 UPB_API_INLINE const struct upb_MiniTable* upb_MiniTableFile_Message(
0055     const struct upb_MiniTableFile* f, int i) {
0056   UPB_ASSERT(i < f->UPB_PRIVATE(msg_count));
0057   return f->UPB_PRIVATE(msgs)[i];
0058 }
0059 
0060 #ifdef __cplusplus
0061 } /* extern "C" */
0062 #endif
0063 
0064 #include "upb/port/undef.inc"
0065 
0066 #endif /* UPB_MINI_TABLE_INTERNAL_FILE_H_ */