| OLD | NEW |
| 1 // Protocol Buffers - Google's data interchange format | 1 // Protocol Buffers - Google's data interchange format |
| 2 // Copyright 2008 Google Inc. All rights reserved. | 2 // Copyright 2008 Google Inc. All rights reserved. |
| 3 // https://developers.google.com/protocol-buffers/ | 3 // https://developers.google.com/protocol-buffers/ |
| 4 // | 4 // |
| 5 // Redistribution and use in source and binary forms, with or without | 5 // Redistribution and use in source and binary forms, with or without |
| 6 // modification, are permitted provided that the following conditions are | 6 // modification, are permitted provided that the following conditions are |
| 7 // met: | 7 // met: |
| 8 // | 8 // |
| 9 // * Redistributions of source code must retain the above copyright | 9 // * Redistributions of source code must retain the above copyright |
| 10 // notice, this list of conditions and the following disclaimer. | 10 // notice, this list of conditions and the following disclaimer. |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 namespace compiler { | 52 namespace compiler { |
| 53 namespace cpp { | 53 namespace cpp { |
| 54 | 54 |
| 55 CppGenerator::CppGenerator() {} | 55 CppGenerator::CppGenerator() {} |
| 56 CppGenerator::~CppGenerator() {} | 56 CppGenerator::~CppGenerator() {} |
| 57 | 57 |
| 58 bool CppGenerator::Generate(const FileDescriptor* file, | 58 bool CppGenerator::Generate(const FileDescriptor* file, |
| 59 const string& parameter, | 59 const string& parameter, |
| 60 GeneratorContext* generator_context, | 60 GeneratorContext* generator_context, |
| 61 string* error) const { | 61 string* error) const { |
| 62 vector<pair<string, string> > options; | 62 std::vector<std::pair<string, string> > options; |
| 63 ParseGeneratorParameter(parameter, &options); | 63 ParseGeneratorParameter(parameter, &options); |
| 64 | 64 |
| 65 // ----------------------------------------------------------------- | 65 // ----------------------------------------------------------------- |
| 66 // parse generator options | 66 // parse generator options |
| 67 | 67 |
| 68 // TODO(kenton): If we ever have more options, we may want to create a | 68 // TODO(kenton): If we ever have more options, we may want to create a |
| 69 // class that encapsulates them which we can pass down to all the | 69 // class that encapsulates them which we can pass down to all the |
| 70 // generator classes. Currently we pass dllexport_decl down to all of | 70 // generator classes. Currently we pass dllexport_decl down to all of |
| 71 // them via the constructors, but we don't want to have to add another | 71 // them via the constructors, but we don't want to have to add another |
| 72 // constructor parameter for every option. | 72 // constructor parameter for every option. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 file_generator.GenerateSource(&printer); | 159 file_generator.GenerateSource(&printer); |
| 160 } | 160 } |
| 161 | 161 |
| 162 return true; | 162 return true; |
| 163 } | 163 } |
| 164 | 164 |
| 165 } // namespace cpp | 165 } // namespace cpp |
| 166 } // namespace compiler | 166 } // namespace compiler |
| 167 } // namespace protobuf | 167 } // namespace protobuf |
| 168 } // namespace google | 168 } // namespace google |
| OLD | NEW |