| 205 | return self |
| 206 | |
| 207 | def to_c(self): |
| 208 | definition = doxygen(self.docs) |
| 209 | definition += 'typedef struct {0.c_name} {0.c_name};\n'.format(self) |
| 210 | if self.constructor_: |
| 211 | definition += self.constructor_.to_c() |
| 212 | definition += self.destructor.to_c() |
| 213 | definition += ''.join(getter.to_c() for getter in self.getters) |
| 214 | definition += ''.join(setter.to_c() for setter in self.setters) |
| 215 | definition += ''.join(method.to_c() for method in self.methods) |
| 216 | return definition |
| 217 | |
| 218 | def to_swig(self): |
| 219 | '''Generate a SWIG interface for this struct.''' |