MCPcopy Create free account
hub / github.com/SakuraEngine/SakuraEngine / write

Method write

tools/meta_codegen/framework/old_framework.py:155–165  ·  view source on GitHub ↗
(self, path, content)

Source from the content-addressed store, hash-verified

153 return self.retType + "(" + (record.name + "::" if record else "") + "*)(" + str.join(", ", [x.type for name, x in vars(desc.fields).items()]) + ")" + ("const" if desc.isConst else "")
154
155 def write(self, path, content):
156 RE_PYTHON_ADDR = re.compile(r"<.+? object at 0x[0-9a-fA-F]+>")
157 directory = os.path.dirname(path)
158 if not os.path.exists(directory):
159 os.makedirs(directory, exist_ok=True)
160 open(path, "wb").write(content.encode("utf-8"))
161
162 python_addr = RE_PYTHON_ADDR.search(content)
163 if python_addr:
164 abort('Found "{}" in {} ({})'.format(
165 python_addr.group(0), os.path.basename(path), path))
166
167
168def load_generator(i, path):

Callers 4

output_contentMethod · 0.45
main.cppFile · 0.45
Graph.cppFile · 0.45
bitpack.cppFile · 0.45

Calls 6

groupMethod · 0.80
abortFunction · 0.70
compileMethod · 0.45
encodeMethod · 0.45
searchMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected