MCPcopy Create free account
hub / github.com/battlecode/battlecode-2018 / to_c

Method to_c

bindings/frankenswig/struct.py:207–216  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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.'''

Callers

nothing calls this directly

Calls 2

doxygenFunction · 0.85
formatMethod · 0.80

Tested by

no test coverage detected