• 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 THIRD_PARTY_UPB_UPB_GENERATOR_MINITABLE_NAMES_INTERNAL_H_
9 #define THIRD_PARTY_UPB_UPB_GENERATOR_MINITABLE_NAMES_INTERNAL_H_
10 
11 #include <string>
12 
13 #include "absl/strings/string_view.h"
14 
15 namespace upb {
16 namespace generator {
17 
18 // Like the public MiniTableHeaderFilename, but also handles the case where we
19 // are generating a bootstrap header.
20 std::string MiniTableHeaderFilename(absl::string_view proto_filename,
21                                     bool bootstrap);
22 
23 // Global static variables used in the generated .c file.
24 constexpr char kEnumsInit[] = "enums_layout";
25 constexpr char kExtensionsInit[] = "extensions_layout";
26 constexpr char kMessagesInit[] = "messages_layout";
27 
28 // Per-message static variables used in the generated .c file.
29 std::string MiniTableFieldsVarName(absl::string_view msg_full_name);
30 std::string MiniTableSubMessagesVarName(absl::string_view msg_full_name);
31 
32 }  // namespace generator
33 }  // namespace upb
34 
35 #endif  // THIRD_PARTY_UPB_UPB_GENERATOR_MINITABLE_NAMES_INTERNAL_H_
36