Modular bindings: add the std::ios::openmode constants
This commit is contained in:
@@ -73,6 +73,8 @@ def main(argv):
|
||||
root_module.set_name(extension_name)
|
||||
root_module.add_include('"ns3/%s-module.h"' % module_name)
|
||||
|
||||
ns3modulegen_core_customizations.add_std_ios_openmode(root_module)
|
||||
|
||||
# -----------
|
||||
module_apidefs.register_types(root_module)
|
||||
|
||||
|
||||
@@ -418,7 +418,11 @@ def add_std_ofstream(module):
|
||||
ofstream.add_constructor([Parameter.new("const char *", 'filename'),
|
||||
Parameter.new("::std::ofstream::openmode", 'mode', default_value="std::ios_base::out")])
|
||||
ofstream.add_method('close', None, [])
|
||||
|
||||
add_std_ios_openmode(module)
|
||||
|
||||
|
||||
def add_std_ios_openmode(module):
|
||||
import pybindgen.typehandlers.base
|
||||
for alias in "std::_Ios_Openmode", "std::ios::openmode":
|
||||
pybindgen.typehandlers.base.param_type_matcher.add_type_alias(alias, "int")
|
||||
|
||||
Reference in New Issue
Block a user