Go to the documentation of this file.
33 #include "absl/strings/str_replace.h"
34 #include "absl/strings/substitute.h"
35 #include "google/protobuf/descriptor.h"
36 #include "google/protobuf/io/zero_copy_stream.h"
46 template <
class...
Arg>
55 size_t indent =
data.substr(1).find_first_not_of(
' ');
66 last_line_prefix.resize(last_line_prefix.size() - 2);
67 data.remove_prefix(line_prefix.size());
69 data, {{line_prefix,
"\n"}, {last_line_prefix,
"\n"}});
73 while (!
data.empty()) {
77 data.remove_prefix(to_write);
88 fprintf(
stderr,
"upbc: Failed to write to to output\n");
112 #endif // UPBC_COMMON_H
void EmitFileWarning(const protobuf::FileDescriptor *file, Output &output)
google::protobuf::io::ZeroCopyOutputStream * stream_
bool StartsWith(absl::string_view text, absl::string_view prefix) noexcept
std::string StripExtension(absl::string_view fname)
Arg(64) -> Arg(128) ->Arg(256) ->Arg(512) ->Arg(1024) ->Arg(1536) ->Arg(2048) ->Arg(3072) ->Arg(4096) ->Arg(5120) ->Arg(6144) ->Arg(7168)
std::string HeaderFilename(const google::protobuf::FileDescriptor *file)
memcpy(mem, inblock.get(), min(CONTAINING_RECORD(inblock.get(), MEMBLOCK, data) ->size, size))
std::string ToPreproc(absl::string_view str)
std::string FileLayoutName(const google::protobuf::FileDescriptor *file)
Output(google::protobuf::io::ZeroCopyOutputStream *stream)
void operator()(absl::string_view format, const Arg &... arg)
std::string StrReplaceAll(absl::string_view s, strings_internal::FixedMapping replacements)
std::string MessageName(const protobuf::Descriptor *descriptor)
ABSL_MUST_USE_RESULT std::string Substitute(absl::string_view format)
virtual bool Next(void **data, int *size)=0
static constexpr size_type npos
void Write(absl::string_view data)
static const char descriptor[1336]
std::string ToCIdent(absl::string_view str)
virtual void BackUp(int count)=0
grpc
Author(s):
autogenerated on Fri May 16 2025 02:57:59