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

Class Var

bindings/frankenswig/helpers.py:50–67  ·  view source on GitHub ↗

This is kinda a weird class. It represents an entry in an argument list / struct body.

Source from the content-addressed store, hash-verified

48 return name.split('::')[-1]
49
50class Var(object):
51 '''This is kinda a weird class.
52 It represents an entry in an argument list / struct body.'''
53 def __init__(self, type, name):
54 self.type = type
55 self.name = name
56
57 def to_swig(self):
58 return f'{self.type.to_swig()} {self.name}'
59
60 def to_c(self):
61 return f'{self.type.to_c()} {self.name}'
62
63 def to_rust(self):
64 return f'{self.name}: {self.type.to_rust()}'
65
66 def to_python(self):
67 return self.name

Callers 11

generate.pyFile · 0.85
methodMethod · 0.85
vecMethod · 0.85
to_pythonMethod · 0.85
serializeMethod · 0.85
debugMethod · 0.85
eqMethod · 0.85
__init__Method · 0.85
memberMethod · 0.85
methodMethod · 0.85
to_pythonMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected