summaryrefslogtreecommitdiffstats
path: root/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
diff options
context:
space:
mode:
authorheretic <[email protected]>2022-06-14 13:29:31 +0300
committerheretic <[email protected]>2022-06-14 13:29:31 +0300
commit16f8be4f481c275c34795233c18f8d078382fcb3 (patch)
tree2363f1306ce2e17e72c0a48614256acd046990e6 /contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
parent647dc68b78e469e5ab416e9b62885c9846fd511d (diff)
Update protobuf to 3.18.1
ref:4846abb21711ea0dc148d4c5df7b5edd3d1bdc69
Diffstat (limited to 'contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_helpers.h')
-rw-r--r--contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_helpers.h19
1 files changed, 16 insertions, 3 deletions
diff --git a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_helpers.h b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
index 9fb24936c24..2e291dbd6bd 100644
--- a/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
+++ b/contrib/libs/protoc/src/google/protobuf/compiler/objectivec/objectivec_helpers.h
@@ -46,6 +46,19 @@ namespace protobuf {
namespace compiler {
namespace objectivec {
+// Get/Set if the proto package should be used to make the default prefix for
+// symbols. This will then impact most of the type naming apis below. It is done
+// as a global to not break any other generator reusing the methods since they
+// are exported.
+bool PROTOC_EXPORT UseProtoPackageAsDefaultPrefix();
+void PROTOC_EXPORT SetUseProtoPackageAsDefaultPrefix(bool on_or_off);
+// Get/Set the path to a file to load as exceptions when
+// `UseProtoPackageAsDefaultPrefixUseProtoPackageAsDefaultPrefix()` is `true`.
+// And empty string means there should be no exceptions loaded.
+TProtoStringType PROTOC_EXPORT GetProtoPackagePrefixExceptionList();
+void PROTOC_EXPORT SetProtoPackagePrefixExceptionList(
+ const TProtoStringType& file_path);
+
// Generator options (see objectivec_generator.cc for a description of each):
struct Options {
Options();
@@ -70,7 +83,7 @@ bool PROTOC_EXPORT IsRetainedName(const TProtoStringType& name);
// handling under ARC.
bool PROTOC_EXPORT IsInitName(const TProtoStringType& name);
-// Gets the objc_class_prefix.
+// Gets the objc_class_prefix or the prefix made from the proto package.
TProtoStringType PROTOC_EXPORT FileClassPrefix(const FileDescriptor* file);
// Gets the path of the file we're going to generate (sans the .pb.h
@@ -90,7 +103,7 @@ TProtoStringType PROTOC_EXPORT FileClassName(const FileDescriptor* file);
// descriptor.
TProtoStringType PROTOC_EXPORT ClassName(const Descriptor* descriptor);
TProtoStringType PROTOC_EXPORT ClassName(const Descriptor* descriptor,
- TProtoStringType* out_suffix_added);
+ TProtoStringType* out_suffix_added);
TProtoStringType PROTOC_EXPORT EnumName(const EnumDescriptor* descriptor);
// Returns the fully-qualified name of the enum value corresponding to the
@@ -296,7 +309,7 @@ class PROTOC_EXPORT ImportWriter {
ProtoFrameworkCollector(std::map<TProtoStringType, TProtoStringType>* inout_proto_file_to_framework_name)
: map_(inout_proto_file_to_framework_name) {}
- virtual bool ConsumeLine(const StringPiece& line, TProtoStringType* out_error);
+ virtual bool ConsumeLine(const StringPiece& line, TProtoStringType* out_error) override;
private:
std::map<TProtoStringType, TProtoStringType>* map_;