(self, doc)
| 674 | self._write("// vim: syntax=cpp.doxygen") |
| 675 | |
| 676 | def _write_doc(self, doc): |
| 677 | assert isinstance(doc, member_defs.Doc) |
| 678 | if not doc.doc: |
| 679 | return |
| 680 | |
| 681 | if doc.no_reformat: |
| 682 | self._write("/*") |
| 683 | for i in doc.raw_lines: |
| 684 | self._write("* " + i) |
| 685 | self._write("*/") |
| 686 | return |
| 687 | |
| 688 | doc = doc.doc.replace("\n", " ") |
| 689 | textwidth = 80 - len(self._cur_indent) - 4 |
| 690 | if len(doc) <= textwidth: |
| 691 | self._write("//! " + doc) |
| 692 | return |
| 693 | |
| 694 | self._write("/*!") |
| 695 | for i in textwrap.wrap(doc, textwidth): |
| 696 | self._write(" * " + i) |
| 697 | self._write(" */") |
| 698 | |
| 699 | def _on_param_begin(self, p): |
| 700 | self._write_doc(p.name) |
no test coverage detected