• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Protocol Buffers - Google's data interchange format
2 // Copyright 2008 Google Inc.  All rights reserved.
3 //
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file or at
6 // https://developers.google.com/open-source/licenses/bsd
7 
8 // Author: kenton@google.com (Kenton Varda)
9 //
10 // This is a dummy code generator plugin used by
11 // command_line_interface_unittest.
12 
13 #include <stdlib.h>
14 
15 #include <string>
16 
17 #include "google/protobuf/compiler/mock_code_generator.h"
18 #include "google/protobuf/compiler/plugin.h"
19 
20 namespace google {
21 namespace protobuf {
22 namespace compiler {
23 
ProtobufMain(int argc,char * argv[])24 int ProtobufMain(int argc, char* argv[]) {
25   MockCodeGenerator generator("test_plugin");
26   return PluginMain(argc, argv, &generator);
27 }
28 
29 }  // namespace compiler
30 }  // namespace protobuf
31 }  // namespace google
32 
main(int argc,char * argv[])33 int main(int argc, char* argv[]) {
34 #ifdef _MSC_VER
35   // Don't print a silly message or stick a modal dialog box in my face,
36   // please.
37   _set_abort_behavior(0, ~0);
38 #endif  // !_MSC_VER
39   return google::protobuf::compiler::ProtobufMain(argc, argv);
40 }
41