(self,
prefix: Optional[str] = None)
| 329 | return decl_list |
| 330 | |
| 331 | def virtual_output_declarations(self, |
| 332 | prefix: Optional[str] = None) -> List[str]: |
| 333 | container_type = self.type.remove_generic().basic().str() |
| 334 | container = (container_type == "std::vector" |
| 335 | or container_type == "vector") |
| 336 | decl_list: List[str] = [] |
| 337 | for t, n, in self.cparams: |
| 338 | if not decl_list and container: |
| 339 | inner_t = self.type.inner_type() |
| 340 | if inner_t: |
| 341 | decl_list.append( |
| 342 | 'std::array<{inner_t}, 1024> {prefix}{n};'.format( |
| 343 | inner_t=inner_t.str(), prefix=prefix or '', n=n)) |
| 344 | else: |
| 345 | decl_list.append( |
| 346 | 'std::remove_pointer_t<{type}> {prefix}{n}'.format( |
| 347 | type=Type(t).str(), prefix=prefix or '', n=n)) |
| 348 | decl_list[-1] += '=1024;' if container else ';' |
| 349 | return decl_list |
| 350 | |
| 351 | def virtual_output(self, prefix: Optional[str] = None) -> str: |
| 352 | write = self.virtual_write |
no test coverage detected