~ubuntu-branches/ubuntu/trusty/protobuf/trusty-proposed

« back to all changes in this revision

Viewing changes to src/google/protobuf/compiler/cpp/cpp_generator.cc

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2011-05-31 14:41:47 UTC
  • mfrom: (2.2.8 sid)
  • Revision ID: james.westby@ubuntu.com-20110531144147-s41g5fozgvyo462l
Tags: 2.4.0a-2ubuntu1
* Merge with Debian; remaining changes:
  - Fix linking with -lpthread.

Show diffs side-by-side

added added

removed removed

Lines of Context:
53
53
 
54
54
bool CppGenerator::Generate(const FileDescriptor* file,
55
55
                            const string& parameter,
56
 
                            OutputDirectory* output_directory,
 
56
                            GeneratorContext* generator_context,
57
57
                            string* error) const {
58
58
  vector<pair<string, string> > options;
59
59
  ParseGeneratorParameter(parameter, &options);
100
100
  // Generate header.
101
101
  {
102
102
    scoped_ptr<io::ZeroCopyOutputStream> output(
103
 
      output_directory->Open(basename + ".h"));
 
103
      generator_context->Open(basename + ".h"));
104
104
    io::Printer printer(output.get(), '$');
105
105
    file_generator.GenerateHeader(&printer);
106
106
  }
108
108
  // Generate cc file.
109
109
  {
110
110
    scoped_ptr<io::ZeroCopyOutputStream> output(
111
 
      output_directory->Open(basename + ".cc"));
 
111
      generator_context->Open(basename + ".cc"));
112
112
    io::Printer printer(output.get(), '$');
113
113
    file_generator.GenerateSource(&printer);
114
114
  }