aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/compiler/cpp_generator.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/compiler/cpp_generator.h')
-rw-r--r--src/compiler/cpp_generator.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/compiler/cpp_generator.h b/src/compiler/cpp_generator.h
index 69fd8a93e9..6119ebe289 100644
--- a/src/compiler/cpp_generator.h
+++ b/src/compiler/cpp_generator.h
@@ -65,6 +65,8 @@ struct Parameters {
bool use_system_headers;
// Prefix to any grpc include
grpc::string grpc_search_path;
+ // Generate GMOCK code to facilitate unit testing.
+ bool generate_mock_code;
};
// Return the prologue of the generated header file.
@@ -99,6 +101,38 @@ grpc::string GetSourceServices(grpc_generator::File *file,
grpc::string GetSourceEpilogue(grpc_generator::File *file,
const Parameters &params);
+// Return the prologue of the generated mock file.
+grpc::string GetMockPrologue(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the includes needed for generated mock file.
+grpc::string GetMockIncludes(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the services for generated mock file.
+grpc::string GetMockServices(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the epilogue of generated mock file.
+grpc::string GetMockEpilogue(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the prologue of the generated mock file.
+grpc::string GetMockPrologue(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the includes needed for generated mock file.
+grpc::string GetMockIncludes(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the services for generated mock file.
+grpc::string GetMockServices(grpc_generator::File *file,
+ const Parameters &params);
+
+// Return the epilogue of generated mock file.
+grpc::string GetMockEpilogue(grpc_generator::File *file,
+ const Parameters &params);
+
} // namespace grpc_cpp_generator
#endif // GRPC_INTERNAL_COMPILER_CPP_GENERATOR_H