aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/cpp_generator_helpers.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/cpp_generator_helpers.h')
-rw-r--r--src/compiler/cpp_generator_helpers.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/cpp_generator_helpers.h b/src/compiler/cpp_generator_helpers.h
index be68cbe695..87e278f1b9 100644
--- a/src/compiler/cpp_generator_helpers.h
+++ b/src/compiler/cpp_generator_helpers.h
@@ -65,6 +65,13 @@ inline grpc::string ClassName(const grpc::protobuf::Descriptor *descriptor,
}
}
+// Get leading or trailing comments in a string. Comment lines start with "// ".
+// Leading detached comments are put in in front of leading comments.
+template <typename DescriptorType>
+inline grpc::string GetCppComments(const DescriptorType *desc, bool leading) {
+ return grpc_generator::GetPrefixedComments(desc, leading, "//");
+}
+
} // namespace grpc_cpp_generator
#endif // GRPC_INTERNAL_COMPILER_CPP_GENERATOR_HELPERS_H