MCPcopy Index your code
hub / github.com/SeleniumHQ/selenium / generate_cc_source

Function generate_cc_source

javascript/private/gen_file.py:124–147  ·  view source on GitHub ↗
(out, js_map, utf8)

Source from the content-addressed store, hash-verified

122
123
124def generate_cc_source(out, js_map, utf8):
125 out.write(
126 f"""{_copyright}
127
128/* AUTO GENERATED - DO NOT EDIT BY HAND */
129
130#include <stddef.h> // For NULL.
131#include "atoms.h"
132
133namespace webdriver {{
134namespace atoms {{
135
136"""
137 )
138
139 for name, file in js_map.items():
140 contents = open(file).read()
141 write_atom_literal(out, name, contents, "cc", utf8)
142
143 out.write("""
144} // namespace atoms
145} // namespace webdriver
146
147""")
148
149
150def generate_java_source(file_name, out, preamble, js_map):

Callers 1

mainFunction · 0.85

Calls 3

write_atom_literalFunction · 0.85
readMethod · 0.65
writeMethod · 0.45

Tested by

no test coverage detected