| 236 | self.feature_not_empty = False |
| 237 | |
| 238 | def _endProtectComment(self, protect_str, protect_directive='#ifdef'): |
| 239 | if protect_directive is None or protect_str is None: |
| 240 | raise RuntimeError('Should not call in here without something to protect') |
| 241 | |
| 242 | # Do not put comments after #endif closing blocks if this is not set |
| 243 | if not self.genOpts.conventions.protectProtoComment: |
| 244 | return '' |
| 245 | elif 'ifdef' in protect_directive: |
| 246 | return f' /* {protect_str} */' |
| 247 | else: |
| 248 | return f' /* !{protect_str} */' |
| 249 | |
| 250 | def endFeature(self): |
| 251 | "Actually write the interface to the output file." |