bindings/python/ns3modulegen_core_customizations.py
changeset 6984 15c619b2ca1d
parent 6943 9ae2596b385d
child 10142 3dc19f3ac5a7
equal deleted inserted replaced
6983:0fb01581be59 6984:15c619b2ca1d
   416             ('trunc', 'std::ios_base::trunc'),
   416             ('trunc', 'std::ios_base::trunc'),
   417             ])
   417             ])
   418     ofstream.add_constructor([Parameter.new("const char *", 'filename'),
   418     ofstream.add_constructor([Parameter.new("const char *", 'filename'),
   419                               Parameter.new("::std::ofstream::openmode", 'mode', default_value="std::ios_base::out")])
   419                               Parameter.new("::std::ofstream::openmode", 'mode', default_value="std::ios_base::out")])
   420     ofstream.add_method('close', None, [])
   420     ofstream.add_method('close', None, [])
   421 
   421     
       
   422     add_std_ios_openmode(module)
       
   423 
       
   424 
       
   425 def add_std_ios_openmode(module):
   422     import pybindgen.typehandlers.base
   426     import pybindgen.typehandlers.base
   423     for alias in "std::_Ios_Openmode", "std::ios::openmode":
   427     for alias in "std::_Ios_Openmode", "std::ios::openmode":
   424         pybindgen.typehandlers.base.param_type_matcher.add_type_alias(alias, "int")
   428         pybindgen.typehandlers.base.param_type_matcher.add_type_alias(alias, "int")
   425 
   429 
   426     for flag in 'in', 'out', 'ate', 'app', 'trunc', 'binary':
   430     for flag in 'in', 'out', 'ate', 'app', 'trunc', 'binary':