MCPcopy Create free account
hub / github.com/IENT/YUView / HeaderFile

Class HeaderFile

tools/standardTextToCode/writeTablesC++.py:40–57  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38 */\n\n""")
39
40class HeaderFile:
41 def __init__ (self, path, name, namespace):
42 self.f = open(f"{path}/{name}.h", "w")
43 writeLicense(self.f)
44 self.f.write("#pragma once\n\n")
45 self.f.write("#include \"NalUnitVVC.h\"\n")
46 self.f.write("#include \"parser/common/SubByteReaderLogging.h\"\n\n")
47 self.f.write(f"""namespace {namespace}""")
48 self.f.write("\n{\n\n")
49 self.namespace = namespace
50 self.spaces = 0
51 def __del__(self):
52 self.f.write(f"""}} // namespace {self.namespace}""")
53 self.f.write("\n")
54 def write(self, s):
55 for i in range(self.spaces):
56 self.f.write(" ")
57 self.f.write(s)
58
59class CppFile:
60 def __init__ (self, path, name, namespace):

Callers 1

writeTablesToCppFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected