mirror of
https://github.com/ValveSoftware/Proton
synced 2025-08-31 06:35:23 +00:00
lsteamclient: Generate C++ interfaces in unix_private_generated.h.
CW-Bug-Id: #22729
This commit is contained in:
committed by
Arkadiusz Hiler
parent
1071c99388
commit
bd51335a8c
@@ -1043,13 +1043,6 @@ def handle_method_c(klass, method, winclassname, cppname, out):
|
||||
def handle_class(klass):
|
||||
cppname = f"cpp{klass.full_name}"
|
||||
|
||||
ext = "cpp"
|
||||
for method in klass.methods:
|
||||
if type(method) is Destructor:
|
||||
continue
|
||||
if is_manual_method(klass, method, "u"):
|
||||
ext = "hpp"
|
||||
|
||||
with open(f"{cppname}.h", "w") as file:
|
||||
out = file.write
|
||||
|
||||
@@ -1072,15 +1065,13 @@ def handle_class(klass):
|
||||
out(u'} /* extern "C" */\n')
|
||||
out(u'#endif /* __cplusplus */\n')
|
||||
|
||||
with open(f"{cppname}.{ext}", "w") as file:
|
||||
with open(f"{cppname}.cpp", "w") as file:
|
||||
out = file.write
|
||||
|
||||
out(u'/* This file is auto-generated, do not edit. */\n')
|
||||
out(u'#include "unix_private.h"\n')
|
||||
out(f'#include "{cppname}.h"\n\n')
|
||||
|
||||
klass.write_definition(out, "u_")
|
||||
|
||||
for method in klass.methods:
|
||||
if type(method) is Destructor:
|
||||
continue
|
||||
@@ -1472,6 +1463,17 @@ with open('steamclient_structs_generated.h', 'w') as file:
|
||||
out(u'\n')
|
||||
|
||||
|
||||
with open("unix_private_generated.h", "w") as file:
|
||||
out = file.write
|
||||
|
||||
out(u'/* This file is auto-generated, do not edit. */\n\n')
|
||||
|
||||
for klass in all_classes.values():
|
||||
sdkver = klass._sdkver
|
||||
klass.write_definition(out, "u_")
|
||||
out(u'\n')
|
||||
|
||||
|
||||
with open('unixlib_generated.cpp', 'w') as file:
|
||||
out = file.write
|
||||
|
||||
|
Reference in New Issue
Block a user