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 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 // (We don't skip "just whitespace" lines, either.) | 67 // (We don't skip "just whitespace" lines, either.) |
68 for (std::vector<string>::iterator it = lines.begin(); it != lines.end(); ++
it) { | 68 for (std::vector<string>::iterator it = lines.begin(); it != lines.end(); ++
it) { |
69 string line = *it; | 69 string line = *it; |
70 if (line.empty()) { | 70 if (line.empty()) { |
71 last_was_empty = true; | 71 last_was_empty = true; |
72 } else { | 72 } else { |
73 if (last_was_empty) { | 73 if (last_was_empty) { |
74 printer->Print("///\n"); | 74 printer->Print("///\n"); |
75 } | 75 } |
76 last_was_empty = false; | 76 last_was_empty = false; |
77 printer->Print("///$line$\n", "line", *it); | 77 printer->Print("/// $line$\n", "line", *it); |
78 } | 78 } |
79 } | 79 } |
80 printer->Print("/// </summary>\n"); | 80 printer->Print("/// </summary>\n"); |
81 } | 81 } |
82 | 82 |
83 template <typename DescriptorType> | 83 template <typename DescriptorType> |
84 static void WriteDocCommentBody( | 84 static void WriteDocCommentBody( |
85 io::Printer* printer, const DescriptorType* descriptor) { | 85 io::Printer* printer, const DescriptorType* descriptor) { |
86 SourceLocation location; | 86 SourceLocation location; |
87 if (descriptor->GetSourceLocation(&location)) { | 87 if (descriptor->GetSourceLocation(&location)) { |
(...skipping 17 matching lines...) Expand all Loading... |
105 } | 105 } |
106 | 106 |
107 void WriteMethodDocComment(io::Printer* printer, const MethodDescriptor* method)
{ | 107 void WriteMethodDocComment(io::Printer* printer, const MethodDescriptor* method)
{ |
108 WriteDocCommentBody(printer, method); | 108 WriteDocCommentBody(printer, method); |
109 } | 109 } |
110 | 110 |
111 } // namespace csharp | 111 } // namespace csharp |
112 } // namespace compiler | 112 } // namespace compiler |
113 } // namespace protobuf | 113 } // namespace protobuf |
114 } // namespace google | 114 } // namespace google |
OLD | NEW |