1 #include "google/protobuf/compiler/code_generator.h"
2 #include "google/protobuf/io/zero_copy_stream.h"
3 #include "google/protobuf/io/printer.h"
4 #include "google/protobuf/descriptor.h"
5 #include "google/protobuf/descriptor.pb.h"
8 #include "google/protobuf/compiler/plugin.h"
39 const string& parameter,
41 string*
error)
const {
42 for (
int i = 0;
i <
files.size();
i++) {
55 const string& parameter,
57 string*
error)
const {
59 file->CopyTo(&new_file);
60 SchemaGroupStripper::StripFile(
file, &new_file);
64 ExtensionStripper::StripFile(&new_file);
65 FieldScrubber::ScrubFile(&new_file);
71 std::vector<std::pair<string,string>> option_pairs;
74 std::unique_ptr<google::protobuf::io::ZeroCopyOutputStream>
output(
75 context->Open(basename +
".proto"));
87 for (
int j = 0; j <
file->dependency_count(); j++) {
92 for (
int j = 0; j <
file->public_dependency_count(); j++) {
94 file->public_dependency(j)->
name()) ==
nullptr) {
98 for (
int j = 0; j <
file->weak_dependency_count(); j++) {
100 file->weak_dependency(j)->
name()) ==
nullptr) {
112 int main(
int argc,
char* argv[]) {