#include <BnetCodeGenerator.h>
bool BnetCodeGenerator::Generate |
( |
pb::FileDescriptor const * |
file, |
|
|
std::string const & |
parameter, |
|
|
pbc::GeneratorContext * |
generator_context, |
|
|
std::string * |
error |
|
) |
| const |
|
override |
17 std::vector<std::pair<std::string, std::string>> options;
18 google::protobuf::compiler::ParseGeneratorParameter(parameter, &options);
25 for (
int i = 0; i < options.size(); i++)
27 if (options[i].first ==
"dllexport_decl")
31 else if (options[i].first ==
"safe_boundary_check")
37 *error =
"Unknown generator option: " + options[i].first;
46 basename.append(
".pb");
52 pb::scoped_ptr <google::protobuf::io::ZeroCopyOutputStream>
output(
53 generator_context->Open(basename +
".h"));
55 file_generator.GenerateHeader(&printer);
60 pb::scoped_ptr <google::protobuf::io::ZeroCopyOutputStream>
output(
61 generator_context->Open(basename +
".cc"));
63 file_generator.GenerateSource(&printer);
Definition: cpp_options.h:45
Definition: BnetFileGenerator.h:76
bool safe_boundary_check
Definition: cpp_options.h:49
string StripProto(const string &filename)
string dllexport_decl
Definition: cpp_options.h:48
The documentation for this class was generated from the following files: