diff options
| author | nechda <[email protected]> | 2024-08-29 23:50:27 +0300 |
|---|---|---|
| committer | nechda <[email protected]> | 2024-08-30 00:05:25 +0300 |
| commit | e10d6638f07a82edae3ea8197b9f5c0affcc07ea (patch) | |
| tree | 571c38cec05813766a1ad290c9d51ce7ace52919 /contrib/libs/protoc/src/google/protobuf/compiler/java/names.h | |
| parent | e79b38f2bbbf78d295d1901d2a79f898022d5224 (diff) | |
Update cpp-protobuf to 22.5
Привет!\
Этот PR переключат cpp & python библиотеки protobuf на версию 22.5
Если у вас возникли проблемы после влития этого PR:
1. Если начали падать канон тесты, то проведите их переканонизацию
2. Прочитайте <https://wiki.yandex-team.ru/users/nechda/obnovlenie-cpp-protobuf-22.5/> страничку с основными изменениями
3. Если страничка в вики не помогла, то пишите в [DEVTOOLSSUPPORT](https://st.yandex-team.ru/DEVTOOLSSUPPORT)
7fecade616c20a841b9e9af7b7998bdfc8d2807d
Diffstat (limited to 'contrib/libs/protoc/src/google/protobuf/compiler/java/names.h')
| -rw-r--r-- | contrib/libs/protoc/src/google/protobuf/compiler/java/names.h | 37 |
1 files changed, 36 insertions, 1 deletions
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/java/names.h b/contrib/libs/protoc/src/google/protobuf/compiler/java/names.h index 9aeddc81cc2..2f7f1b802ed 100644 --- a/contrib/libs/protoc/src/google/protobuf/compiler/java/names.h +++ b/contrib/libs/protoc/src/google/protobuf/compiler/java/names.h @@ -40,6 +40,12 @@ #include <string> +#include "google/protobuf/descriptor.h" +#include "google/protobuf/compiler/java/options.h" + +// Must be last. +#include "google/protobuf/port_def.inc" + namespace google { namespace protobuf { @@ -85,7 +91,8 @@ TProtoStringType ClassName(const ServiceDescriptor* descriptor); // // Returns: // Java package name. -TProtoStringType FileJavaPackage(const FileDescriptor* descriptor); +TProtoStringType FileJavaPackage(const FileDescriptor* descriptor, + Options options = {}); // Requires: // descriptor != NULL @@ -93,8 +100,36 @@ TProtoStringType FileJavaPackage(const FileDescriptor* descriptor); // Capitalized camel case name field name. TProtoStringType CapitalizedFieldName(const FieldDescriptor* descriptor); +// Returns: +// Converts a name to camel-case. If cap_first_letter is true, capitalize the +// first letter. +TProtoStringType UnderscoresToCamelCase(y_absl::string_view input, + bool cap_next_letter); +// Requires: +// field != NULL +// Returns: +// Converts the field's name to camel-case, e.g. "foo_bar_baz" becomes +// "fooBarBaz" or "FooBarBaz", respectively. +TProtoStringType UnderscoresToCamelCase(const FieldDescriptor* field); + +// Requires: +// method != NULL +// Returns: +// Similar, but for method names. (Typically, this merely has the effect +// of lower-casing the first letter of the name.) +TProtoStringType UnderscoresToCamelCase(const MethodDescriptor* method); + +// Requires: +// field != NULL +// Returns: +// Same as UnderscoresToCamelCase, but checks for reserved keywords +TProtoStringType UnderscoresToCamelCaseCheckReserved(const FieldDescriptor* field); + + } // namespace java } // namespace compiler } // namespace protobuf } // namespace google + +#include "google/protobuf/port_undef.inc" #endif // GOOGLE_PROTOBUF_COMPILER_JAVA_NAMES_H__ |
