bindings/python/ns3_module_core.py
changeset 4204 1b2a20c85856
parent 4073 b7c683c2479e
child 4236 6ef5bba17bf9
equal deleted inserted replaced
4203:53a87941480f 4204:1b2a20c85856
    43     module.add_enum('v_e', ['value'], outer_class=root_module['ns3::IntToType< 5 >'])
    43     module.add_enum('v_e', ['value'], outer_class=root_module['ns3::IntToType< 5 >'])
    44     ## int-to-type.h: ns3::IntToType<6> [struct]
    44     ## int-to-type.h: ns3::IntToType<6> [struct]
    45     module.add_class('IntToType', template_parameters=['6'])
    45     module.add_class('IntToType', template_parameters=['6'])
    46     ## int-to-type.h: ns3::IntToType<6>::v_e [enumeration]
    46     ## int-to-type.h: ns3::IntToType<6>::v_e [enumeration]
    47     module.add_enum('v_e', ['value'], outer_class=root_module['ns3::IntToType< 6 >'])
    47     module.add_enum('v_e', ['value'], outer_class=root_module['ns3::IntToType< 6 >'])
       
    48     ## names.h: ns3::Names [class]
       
    49     module.add_class('Names')
    48     ## object-base.h: ns3::ObjectBase [class]
    50     ## object-base.h: ns3::ObjectBase [class]
    49     module.add_class('ObjectBase', allow_subclassing=True)
    51     module.add_class('ObjectBase', allow_subclassing=True)
    50     ## object-factory.h: ns3::ObjectFactory [class]
    52     ## object-factory.h: ns3::ObjectFactory [class]
    51     module.add_class('ObjectFactory')
    53     module.add_class('ObjectFactory')
    52     ## random-variable.h: ns3::RandomVariable [class]
    54     ## random-variable.h: ns3::RandomVariable [class]
   221     register_Ns3IntToType__2_methods(root_module, root_module['ns3::IntToType< 2 >'])
   223     register_Ns3IntToType__2_methods(root_module, root_module['ns3::IntToType< 2 >'])
   222     register_Ns3IntToType__3_methods(root_module, root_module['ns3::IntToType< 3 >'])
   224     register_Ns3IntToType__3_methods(root_module, root_module['ns3::IntToType< 3 >'])
   223     register_Ns3IntToType__4_methods(root_module, root_module['ns3::IntToType< 4 >'])
   225     register_Ns3IntToType__4_methods(root_module, root_module['ns3::IntToType< 4 >'])
   224     register_Ns3IntToType__5_methods(root_module, root_module['ns3::IntToType< 5 >'])
   226     register_Ns3IntToType__5_methods(root_module, root_module['ns3::IntToType< 5 >'])
   225     register_Ns3IntToType__6_methods(root_module, root_module['ns3::IntToType< 6 >'])
   227     register_Ns3IntToType__6_methods(root_module, root_module['ns3::IntToType< 6 >'])
       
   228     register_Ns3Names_methods(root_module, root_module['ns3::Names'])
   226     register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase'])
   229     register_Ns3ObjectBase_methods(root_module, root_module['ns3::ObjectBase'])
   227     register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory'])
   230     register_Ns3ObjectFactory_methods(root_module, root_module['ns3::ObjectFactory'])
   228     register_Ns3RandomVariable_methods(root_module, root_module['ns3::RandomVariable'])
   231     register_Ns3RandomVariable_methods(root_module, root_module['ns3::RandomVariable'])
   229     register_Ns3RefCountBase_methods(root_module, root_module['ns3::RefCountBase'])
   232     register_Ns3RefCountBase_methods(root_module, root_module['ns3::RefCountBase'])
   230     register_Ns3RngStream_methods(root_module, root_module['ns3::RngStream'])
   233     register_Ns3RngStream_methods(root_module, root_module['ns3::RngStream'])
   459 def register_Ns3IntToType__6_methods(root_module, cls):
   462 def register_Ns3IntToType__6_methods(root_module, cls):
   460     ## int-to-type.h: ns3::IntToType<6>::IntToType(ns3::IntToType<6> const & arg0) [copy constructor]
   463     ## int-to-type.h: ns3::IntToType<6>::IntToType(ns3::IntToType<6> const & arg0) [copy constructor]
   461     cls.add_constructor([param('ns3::IntToType< 6 > const &', 'arg0')])
   464     cls.add_constructor([param('ns3::IntToType< 6 > const &', 'arg0')])
   462     ## int-to-type.h: ns3::IntToType<6>::IntToType() [constructor]
   465     ## int-to-type.h: ns3::IntToType<6>::IntToType() [constructor]
   463     cls.add_constructor([])
   466     cls.add_constructor([])
       
   467     return
       
   468 
       
   469 def register_Ns3Names_methods(root_module, cls):
       
   470     ## names.h: ns3::Names::Names(ns3::Names const & arg0) [copy constructor]
       
   471     cls.add_constructor([param('ns3::Names const &', 'arg0')])
       
   472     ## names.h: ns3::Names::Names() [constructor]
       
   473     cls.add_constructor([])
       
   474     ## names.h: static bool ns3::Names::Add(std::string name, ns3::Ptr<ns3::Object> obj) [member function]
       
   475     cls.add_method('Add', 
       
   476                    'bool', 
       
   477                    [param('std::string', 'name'), param('ns3::Ptr< ns3::Object >', 'obj')], 
       
   478                    is_static=True)
       
   479     ## names.h: static bool ns3::Names::Add(std::string path, std::string name, ns3::Ptr<ns3::Object> object) [member function]
       
   480     cls.add_method('Add', 
       
   481                    'bool', 
       
   482                    [param('std::string', 'path'), param('std::string', 'name'), param('ns3::Ptr< ns3::Object >', 'object')], 
       
   483                    is_static=True)
       
   484     ## names.h: static bool ns3::Names::Add(ns3::Ptr<ns3::Object> context, std::string name, ns3::Ptr<ns3::Object> object) [member function]
       
   485     cls.add_method('Add', 
       
   486                    'bool', 
       
   487                    [param('ns3::Ptr< ns3::Object >', 'context'), param('std::string', 'name'), param('ns3::Ptr< ns3::Object >', 'object')], 
       
   488                    is_static=True)
       
   489     ## names.h: static bool ns3::Names::Rename(std::string oldpath, std::string newname) [member function]
       
   490     cls.add_method('Rename', 
       
   491                    'bool', 
       
   492                    [param('std::string', 'oldpath'), param('std::string', 'newname')], 
       
   493                    is_static=True)
       
   494     ## names.h: static bool ns3::Names::Rename(std::string path, std::string oldname, std::string newname) [member function]
       
   495     cls.add_method('Rename', 
       
   496                    'bool', 
       
   497                    [param('std::string', 'path'), param('std::string', 'oldname'), param('std::string', 'newname')], 
       
   498                    is_static=True)
       
   499     ## names.h: static bool ns3::Names::Rename(ns3::Ptr<ns3::Object> context, std::string oldname, std::string newname) [member function]
       
   500     cls.add_method('Rename', 
       
   501                    'bool', 
       
   502                    [param('ns3::Ptr< ns3::Object >', 'context'), param('std::string', 'oldname'), param('std::string', 'newname')], 
       
   503                    is_static=True)
       
   504     ## names.h: static std::string ns3::Names::FindName(ns3::Ptr<ns3::Object> object) [member function]
       
   505     cls.add_method('FindName', 
       
   506                    'std::string', 
       
   507                    [param('ns3::Ptr< ns3::Object >', 'object')], 
       
   508                    is_static=True)
       
   509     ## names.h: static std::string ns3::Names::FindPath(ns3::Ptr<ns3::Object> object) [member function]
       
   510     cls.add_method('FindPath', 
       
   511                    'std::string', 
       
   512                    [param('ns3::Ptr< ns3::Object >', 'object')], 
       
   513                    is_static=True)
       
   514     ## names.h: static void ns3::Names::Delete() [member function]
       
   515     cls.add_method('Delete', 
       
   516                    'void', 
       
   517                    [], 
       
   518                    is_static=True)
   464     return
   519     return
   465 
   520 
   466 def register_Ns3ObjectBase_methods(root_module, cls):
   521 def register_Ns3ObjectBase_methods(root_module, cls):
   467     ## object-base.h: ns3::ObjectBase::ObjectBase(ns3::ObjectBase const & arg0) [copy constructor]
   522     ## object-base.h: ns3::ObjectBase::ObjectBase(ns3::ObjectBase const & arg0) [copy constructor]
   468     cls.add_constructor([param('ns3::ObjectBase const &', 'arg0')])
   523     cls.add_constructor([param('ns3::ObjectBase const &', 'arg0')])
  2060                         template_parameters=['float'])
  2115                         template_parameters=['float'])
  2061     ## type-name.h: extern std::string ns3::TypeNameGet() [free function]
  2116     ## type-name.h: extern std::string ns3::TypeNameGet() [free function]
  2062     module.add_function('TypeNameGet', 
  2117     module.add_function('TypeNameGet', 
  2063                         'std::string', 
  2118                         'std::string', 
  2064                         [], 
  2119                         [], 
  2065                         template_parameters=['long long'])
  2120                         template_parameters=['long'])
  2066     ## type-name.h: extern std::string ns3::TypeNameGet() [free function]
  2121     ## type-name.h: extern std::string ns3::TypeNameGet() [free function]
  2067     module.add_function('TypeNameGet', 
  2122     module.add_function('TypeNameGet', 
  2068                         'std::string', 
  2123                         'std::string', 
  2069                         [], 
  2124                         [], 
  2070                         template_parameters=['int'])
  2125                         template_parameters=['int'])
  2080                         template_parameters=['signed char'])
  2135                         template_parameters=['signed char'])
  2081     ## type-name.h: extern std::string ns3::TypeNameGet() [free function]
  2136     ## type-name.h: extern std::string ns3::TypeNameGet() [free function]
  2082     module.add_function('TypeNameGet', 
  2137     module.add_function('TypeNameGet', 
  2083                         'std::string', 
  2138                         'std::string', 
  2084                         [], 
  2139                         [], 
  2085                         template_parameters=['unsigned long long'])
  2140                         template_parameters=['unsigned long'])
  2086     ## type-name.h: extern std::string ns3::TypeNameGet() [free function]
  2141     ## type-name.h: extern std::string ns3::TypeNameGet() [free function]
  2087     module.add_function('TypeNameGet', 
  2142     module.add_function('TypeNameGet', 
  2088                         'std::string', 
  2143                         'std::string', 
  2089                         [], 
  2144                         [], 
  2090                         template_parameters=['unsigned int'])
  2145                         template_parameters=['unsigned int'])