~ubuntu-branches/ubuntu/precise/protobuf/precise

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Steve Kowalik
  • Date: 2009-11-16 10:41:33 UTC
  • mfrom: (2.1.2 sid)
  • Revision ID: james.westby@ubuntu.com-20091116104133-ykhy3deg5l4975tw
Tags: 2.1.0-1ubuntu1
* Merge from Debian testing.
* Remaining Ubuntu changes:
  - Disable the death tests on IA64, now as a quilt patch.
  - Don't use python2.4, also as a quilt patch.

Show diffs side-by-side

added added

removed removed

Lines of Context:
176
176
    "$classname$::~$classname$() {}\n"
177
177
    "\n"
178
178
    "const ::google::protobuf::ServiceDescriptor* $classname$::descriptor() {\n"
 
179
    "  protobuf_AssignDescriptorsOnce();\n"
179
180
    "  return $classname$_descriptor_;\n"
180
181
    "}\n"
181
182
    "\n"
182
183
    "const ::google::protobuf::ServiceDescriptor* $classname$::GetDescriptor() {\n"
 
184
    "  protobuf_AssignDescriptorsOnce();\n"
183
185
    "  return $classname$_descriptor_;\n"
184
186
    "}\n"
185
187
    "\n");
279
281
 
280
282
  printer->Print(vars_,
281
283
    "    const ::google::protobuf::MethodDescriptor* method) const {\n"
282
 
    "  GOOGLE_DCHECK_EQ(method->service(), $classname$_descriptor_);\n"
 
284
    "  GOOGLE_DCHECK_EQ(method->service(), descriptor());\n"
283
285
    "  switch(method->index()) {\n");
284
286
 
285
287
  for (int i = 0; i < descriptor_->method_count(); i++) {
320
322
      "                              const $input_type$* request,\n"
321
323
      "                              $output_type$* response,\n"
322
324
      "                              ::google::protobuf::Closure* done) {\n"
323
 
      "  channel_->CallMethod($classname$_descriptor_->method($index$),\n"
 
325
      "  channel_->CallMethod(descriptor()->method($index$),\n"
324
326
      "                       controller, request, response, done);\n"
325
327
      "}\n");
326
328
  }