From 893360bfe5de4a20d1f7925c732d6ad3f6de5563 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Fri, 14 Aug 2009 11:53:27 +0200 Subject: [PATCH] rescan python --- bindings/python/ns3_module_core.py | 154 +++++++++++++++++++++++++ bindings/python/ns3_module_mobility.py | 73 ------------ 2 files changed, 154 insertions(+), 73 deletions(-) diff --git a/bindings/python/ns3_module_core.py b/bindings/python/ns3_module_core.py index 1d5cd0e9a..9b0535a14 100644 --- a/bindings/python/ns3_module_core.py +++ b/bindings/python/ns3_module_core.py @@ -83,6 +83,10 @@ def register_types(module): module.add_class('UniformVariable', parent=root_module['ns3::RandomVariable']) ## attribute-list.h: ns3::UnsafeAttributeList [class] module.add_class('UnsafeAttributeList') + ## vector.h: ns3::Vector2D [class] + module.add_class('Vector2D') + ## vector.h: ns3::Vector3D [class] + module.add_class('Vector3D') ## random-variable.h: ns3::WeibullVariable [class] module.add_class('WeibullVariable', parent=root_module['ns3::RandomVariable']) ## random-variable.h: ns3::ZipfVariable [class] @@ -165,6 +169,14 @@ def register_types(module): module.add_class('TypeIdValue', parent=root_module['ns3::AttributeValue']) ## uinteger.h: ns3::UintegerValue [class] module.add_class('UintegerValue', parent=root_module['ns3::AttributeValue']) + ## vector.h: ns3::Vector2DChecker [class] + module.add_class('Vector2DChecker', parent=root_module['ns3::AttributeChecker']) + ## vector.h: ns3::Vector2DValue [class] + module.add_class('Vector2DValue', parent=root_module['ns3::AttributeValue']) + ## vector.h: ns3::Vector3DChecker [class] + module.add_class('Vector3DChecker', parent=root_module['ns3::AttributeChecker']) + ## vector.h: ns3::Vector3DValue [class] + module.add_class('Vector3DValue', parent=root_module['ns3::AttributeValue']) ## traced-value.h: ns3::TracedValue [class] module.add_class('TracedValue', template_parameters=['unsigned int']) ## traced-value.h: ns3::TracedValue [class] @@ -175,6 +187,12 @@ def register_types(module): root_module['ns3::TracedValue< unsigned int >'].implicitly_converts_to(root_module['ns3::BooleanValue']) ## traced-value.h: ns3::TracedValue [class] root_module['ns3::TracedValue< unsigned int >'].implicitly_converts_to(root_module['ns3::EnumValue']) + typehandlers.add_type_alias('ns3::Vector3D', 'ns3::Vector') + module.add_typedef(root_module['ns3::Vector3D'], 'Vector') + typehandlers.add_type_alias('ns3::Vector3DValue', 'ns3::VectorValue') + module.add_typedef(root_module['ns3::Vector3DValue'], 'VectorValue') + typehandlers.add_type_alias('ns3::Vector3DChecker', 'ns3::VectorChecker') + module.add_typedef(root_module['ns3::Vector3DChecker'], 'VectorChecker') ## Register a nested module for the namespace Config @@ -261,6 +279,8 @@ def register_methods(root_module): register_Ns3TypeIdAttributeInfo_methods(root_module, root_module['ns3::TypeId::AttributeInfo']) register_Ns3UniformVariable_methods(root_module, root_module['ns3::UniformVariable']) register_Ns3UnsafeAttributeList_methods(root_module, root_module['ns3::UnsafeAttributeList']) + register_Ns3Vector2D_methods(root_module, root_module['ns3::Vector2D']) + register_Ns3Vector3D_methods(root_module, root_module['ns3::Vector3D']) register_Ns3WeibullVariable_methods(root_module, root_module['ns3::WeibullVariable']) register_Ns3ZipfVariable_methods(root_module, root_module['ns3::ZipfVariable']) register_Ns3Empty_methods(root_module, root_module['ns3::empty']) @@ -302,6 +322,10 @@ def register_methods(root_module): register_Ns3TypeIdChecker_methods(root_module, root_module['ns3::TypeIdChecker']) register_Ns3TypeIdValue_methods(root_module, root_module['ns3::TypeIdValue']) register_Ns3UintegerValue_methods(root_module, root_module['ns3::UintegerValue']) + register_Ns3Vector2DChecker_methods(root_module, root_module['ns3::Vector2DChecker']) + register_Ns3Vector2DValue_methods(root_module, root_module['ns3::Vector2DValue']) + register_Ns3Vector3DChecker_methods(root_module, root_module['ns3::Vector3DChecker']) + register_Ns3Vector3DValue_methods(root_module, root_module['ns3::Vector3DValue']) register_Ns3TracedValue__Unsigned_int_methods(root_module, root_module['ns3::TracedValue< unsigned int >']) register_Ns3ConfigMatchContainer_methods(root_module, root_module['ns3::Config::MatchContainer']) return @@ -1180,6 +1204,36 @@ def register_Ns3UnsafeAttributeList_methods(root_module, cls): is_const=True) return +def register_Ns3Vector2D_methods(root_module, cls): + cls.add_output_stream_operator() + ## vector.h: ns3::Vector2D::Vector2D(ns3::Vector2D const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Vector2D const &', 'arg0')]) + ## vector.h: ns3::Vector2D::Vector2D(double _x, double _y) [constructor] + cls.add_constructor([param('double', '_x'), param('double', '_y')]) + ## vector.h: ns3::Vector2D::Vector2D() [constructor] + cls.add_constructor([]) + ## vector.h: ns3::Vector2D::x [variable] + cls.add_instance_attribute('x', 'double', is_const=False) + ## vector.h: ns3::Vector2D::y [variable] + cls.add_instance_attribute('y', 'double', is_const=False) + return + +def register_Ns3Vector3D_methods(root_module, cls): + cls.add_output_stream_operator() + ## vector.h: ns3::Vector3D::Vector3D(ns3::Vector3D const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Vector3D const &', 'arg0')]) + ## vector.h: ns3::Vector3D::Vector3D(double _x, double _y, double _z) [constructor] + cls.add_constructor([param('double', '_x'), param('double', '_y'), param('double', '_z')]) + ## vector.h: ns3::Vector3D::Vector3D() [constructor] + cls.add_constructor([]) + ## vector.h: ns3::Vector3D::x [variable] + cls.add_instance_attribute('x', 'double', is_const=False) + ## vector.h: ns3::Vector3D::y [variable] + cls.add_instance_attribute('y', 'double', is_const=False) + ## vector.h: ns3::Vector3D::z [variable] + cls.add_instance_attribute('z', 'double', is_const=False) + return + def register_Ns3WeibullVariable_methods(root_module, cls): ## random-variable.h: ns3::WeibullVariable::WeibullVariable(ns3::WeibullVariable const & arg0) [copy constructor] cls.add_constructor([param('ns3::WeibullVariable const &', 'arg0')]) @@ -2046,6 +2100,86 @@ def register_Ns3UintegerValue_methods(root_module, cls): is_virtual=True) return +def register_Ns3Vector2DChecker_methods(root_module, cls): + ## vector.h: ns3::Vector2DChecker::Vector2DChecker(ns3::Vector2DChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Vector2DChecker const &', 'arg0')]) + ## vector.h: ns3::Vector2DChecker::Vector2DChecker() [constructor] + cls.add_constructor([]) + return + +def register_Ns3Vector2DValue_methods(root_module, cls): + ## vector.h: ns3::Vector2DValue::Vector2DValue(ns3::Vector2DValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Vector2DValue const &', 'arg0')]) + ## vector.h: ns3::Vector2DValue::Vector2DValue() [constructor] + cls.add_constructor([]) + ## vector.h: ns3::Vector2DValue::Vector2DValue(ns3::Vector2D const & value) [constructor] + cls.add_constructor([param('ns3::Vector2D const &', 'value')]) + ## vector.h: void ns3::Vector2DValue::Set(ns3::Vector2D const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Vector2D const &', 'value')]) + ## vector.h: ns3::Vector2D ns3::Vector2DValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Vector2D', + [], + is_const=True) + ## vector.h: ns3::Ptr ns3::Vector2DValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## vector.h: std::string ns3::Vector2DValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## vector.h: bool ns3::Vector2DValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + return + +def register_Ns3Vector3DChecker_methods(root_module, cls): + ## vector.h: ns3::Vector3DChecker::Vector3DChecker(ns3::Vector3DChecker const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Vector3DChecker const &', 'arg0')]) + ## vector.h: ns3::Vector3DChecker::Vector3DChecker() [constructor] + cls.add_constructor([]) + return + +def register_Ns3Vector3DValue_methods(root_module, cls): + ## vector.h: ns3::Vector3DValue::Vector3DValue(ns3::Vector3DValue const & arg0) [copy constructor] + cls.add_constructor([param('ns3::Vector3DValue const &', 'arg0')]) + ## vector.h: ns3::Vector3DValue::Vector3DValue() [constructor] + cls.add_constructor([]) + ## vector.h: ns3::Vector3DValue::Vector3DValue(ns3::Vector3D const & value) [constructor] + cls.add_constructor([param('ns3::Vector3D const &', 'value')]) + ## vector.h: void ns3::Vector3DValue::Set(ns3::Vector3D const & value) [member function] + cls.add_method('Set', + 'void', + [param('ns3::Vector3D const &', 'value')]) + ## vector.h: ns3::Vector3D ns3::Vector3DValue::Get() const [member function] + cls.add_method('Get', + 'ns3::Vector3D', + [], + is_const=True) + ## vector.h: ns3::Ptr ns3::Vector3DValue::Copy() const [member function] + cls.add_method('Copy', + 'ns3::Ptr< ns3::AttributeValue >', + [], + is_const=True, is_virtual=True) + ## vector.h: std::string ns3::Vector3DValue::SerializeToString(ns3::Ptr checker) const [member function] + cls.add_method('SerializeToString', + 'std::string', + [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_const=True, is_virtual=True) + ## vector.h: bool ns3::Vector3DValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] + cls.add_method('DeserializeFromString', + 'bool', + [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], + is_virtual=True) + return + def register_Ns3TracedValue__Unsigned_int_methods(root_module, cls): ## traced-value.h: ns3::TracedValue::TracedValue() [constructor] cls.add_constructor([]) @@ -2153,6 +2287,14 @@ def register_functions(root_module): module.add_function('BreakpointFallback', 'void', []) + ## vector.h: extern double ns3::CalculateDistance(ns3::Vector2D const & a, ns3::Vector2D const & b) [free function] + module.add_function('CalculateDistance', + 'double', + [param('ns3::Vector2D const &', 'a'), param('ns3::Vector2D const &', 'b')]) + ## vector.h: extern double ns3::CalculateDistance(ns3::Vector3D const & a, ns3::Vector3D const & b) [free function] + module.add_function('CalculateDistance', + 'double', + [param('ns3::Vector3D const &', 'a'), param('ns3::Vector3D const &', 'b')]) ## ptr.h: extern ns3::Ptr ns3::Create() [free function] module.add_function('Create', 'ns3::Ptr< ns3::ObjectVectorValue >', @@ -2207,6 +2349,18 @@ def register_functions(root_module): module.add_function('MakeTypeIdChecker', 'ns3::Ptr< ns3::AttributeChecker const >', []) + ## vector.h: extern ns3::Ptr ns3::MakeVector2DChecker() [free function] + module.add_function('MakeVector2DChecker', + 'ns3::Ptr< ns3::AttributeChecker const >', + []) + ## vector.h: extern ns3::Ptr ns3::MakeVector3DChecker() [free function] + module.add_function('MakeVector3DChecker', + 'ns3::Ptr< ns3::AttributeChecker const >', + []) + ## vector.h: extern ns3::Ptr ns3::MakeVectorChecker() [free function] + module.add_function('MakeVectorChecker', + 'ns3::Ptr< ns3::AttributeChecker const >', + []) ## type-name.h: extern std::string ns3::TypeNameGet() [free function] module.add_function('TypeNameGet', 'std::string', diff --git a/bindings/python/ns3_module_mobility.py b/bindings/python/ns3_module_mobility.py index fdf2f0bdd..4b89e1731 100644 --- a/bindings/python/ns3_module_mobility.py +++ b/bindings/python/ns3_module_mobility.py @@ -9,8 +9,6 @@ def register_types(module): module.add_class('Rectangle') ## rectangle.h: ns3::Rectangle::Side [enumeration] module.add_enum('Side', ['RIGHT', 'LEFT', 'TOP', 'BOTTOM'], outer_class=root_module['ns3::Rectangle']) - ## vector.h: ns3::Vector [class] - module.add_class('Vector') ## position-allocator.h: ns3::PositionAllocator [class] module.add_class('PositionAllocator', parent=root_module['ns3::Object']) ## position-allocator.h: ns3::RandomDiscPositionAllocator [class] @@ -21,10 +19,6 @@ def register_types(module): module.add_class('RectangleChecker', parent=root_module['ns3::AttributeChecker']) ## rectangle.h: ns3::RectangleValue [class] module.add_class('RectangleValue', parent=root_module['ns3::AttributeValue']) - ## vector.h: ns3::VectorChecker [class] - module.add_class('VectorChecker', parent=root_module['ns3::AttributeChecker']) - ## vector.h: ns3::VectorValue [class] - module.add_class('VectorValue', parent=root_module['ns3::AttributeValue']) ## position-allocator.h: ns3::GridPositionAllocator [class] module.add_class('GridPositionAllocator', parent=root_module['ns3::PositionAllocator']) ## position-allocator.h: ns3::GridPositionAllocator::LayoutType [enumeration] @@ -103,14 +97,11 @@ def register_types_ns3_olsr(module): def register_methods(root_module): register_Ns3ConstantVelocityHelper_methods(root_module, root_module['ns3::ConstantVelocityHelper']) register_Ns3Rectangle_methods(root_module, root_module['ns3::Rectangle']) - register_Ns3Vector_methods(root_module, root_module['ns3::Vector']) register_Ns3PositionAllocator_methods(root_module, root_module['ns3::PositionAllocator']) register_Ns3RandomDiscPositionAllocator_methods(root_module, root_module['ns3::RandomDiscPositionAllocator']) register_Ns3RandomRectanglePositionAllocator_methods(root_module, root_module['ns3::RandomRectanglePositionAllocator']) register_Ns3RectangleChecker_methods(root_module, root_module['ns3::RectangleChecker']) register_Ns3RectangleValue_methods(root_module, root_module['ns3::RectangleValue']) - register_Ns3VectorChecker_methods(root_module, root_module['ns3::VectorChecker']) - register_Ns3VectorValue_methods(root_module, root_module['ns3::VectorValue']) register_Ns3GridPositionAllocator_methods(root_module, root_module['ns3::GridPositionAllocator']) register_Ns3ListPositionAllocator_methods(root_module, root_module['ns3::ListPositionAllocator']) register_Ns3MobilityModel_methods(root_module, root_module['ns3::MobilityModel']) @@ -203,22 +194,6 @@ def register_Ns3Rectangle_methods(root_module, cls): cls.add_instance_attribute('yMin', 'double', is_const=False) return -def register_Ns3Vector_methods(root_module, cls): - cls.add_output_stream_operator() - ## vector.h: ns3::Vector::Vector(ns3::Vector const & arg0) [copy constructor] - cls.add_constructor([param('ns3::Vector const &', 'arg0')]) - ## vector.h: ns3::Vector::Vector(double _x, double _y, double _z) [constructor] - cls.add_constructor([param('double', '_x'), param('double', '_y'), param('double', '_z')]) - ## vector.h: ns3::Vector::Vector() [constructor] - cls.add_constructor([]) - ## vector.h: ns3::Vector::x [variable] - cls.add_instance_attribute('x', 'double', is_const=False) - ## vector.h: ns3::Vector::y [variable] - cls.add_instance_attribute('y', 'double', is_const=False) - ## vector.h: ns3::Vector::z [variable] - cls.add_instance_attribute('z', 'double', is_const=False) - return - def register_Ns3PositionAllocator_methods(root_module, cls): ## position-allocator.h: ns3::PositionAllocator::PositionAllocator(ns3::PositionAllocator const & arg0) [copy constructor] cls.add_constructor([param('ns3::PositionAllocator const &', 'arg0')]) @@ -334,46 +309,6 @@ def register_Ns3RectangleValue_methods(root_module, cls): is_virtual=True) return -def register_Ns3VectorChecker_methods(root_module, cls): - ## vector.h: ns3::VectorChecker::VectorChecker(ns3::VectorChecker const & arg0) [copy constructor] - cls.add_constructor([param('ns3::VectorChecker const &', 'arg0')]) - ## vector.h: ns3::VectorChecker::VectorChecker() [constructor] - cls.add_constructor([]) - return - -def register_Ns3VectorValue_methods(root_module, cls): - ## vector.h: ns3::VectorValue::VectorValue(ns3::VectorValue const & arg0) [copy constructor] - cls.add_constructor([param('ns3::VectorValue const &', 'arg0')]) - ## vector.h: ns3::VectorValue::VectorValue() [constructor] - cls.add_constructor([]) - ## vector.h: ns3::VectorValue::VectorValue(ns3::Vector const & value) [constructor] - cls.add_constructor([param('ns3::Vector const &', 'value')]) - ## vector.h: void ns3::VectorValue::Set(ns3::Vector const & value) [member function] - cls.add_method('Set', - 'void', - [param('ns3::Vector const &', 'value')]) - ## vector.h: ns3::Vector ns3::VectorValue::Get() const [member function] - cls.add_method('Get', - 'ns3::Vector', - [], - is_const=True) - ## vector.h: ns3::Ptr ns3::VectorValue::Copy() const [member function] - cls.add_method('Copy', - 'ns3::Ptr< ns3::AttributeValue >', - [], - is_const=True, is_virtual=True) - ## vector.h: std::string ns3::VectorValue::SerializeToString(ns3::Ptr checker) const [member function] - cls.add_method('SerializeToString', - 'std::string', - [param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_const=True, is_virtual=True) - ## vector.h: bool ns3::VectorValue::DeserializeFromString(std::string value, ns3::Ptr checker) [member function] - cls.add_method('DeserializeFromString', - 'bool', - [param('std::string', 'value'), param('ns3::Ptr< ns3::AttributeChecker const >', 'checker')], - is_virtual=True) - return - def register_Ns3GridPositionAllocator_methods(root_module, cls): ## position-allocator.h: ns3::GridPositionAllocator::GridPositionAllocator(ns3::GridPositionAllocator const & arg0) [copy constructor] cls.add_constructor([param('ns3::GridPositionAllocator const &', 'arg0')]) @@ -744,18 +679,10 @@ def register_Ns3HierarchicalMobilityModel_methods(root_module, cls): def register_functions(root_module): module = root_module - ## vector.h: extern double ns3::CalculateDistance(ns3::Vector const & a, ns3::Vector const & b) [free function] - module.add_function('CalculateDistance', - 'double', - [param('ns3::Vector const &', 'a'), param('ns3::Vector const &', 'b')]) ## rectangle.h: extern ns3::Ptr ns3::MakeRectangleChecker() [free function] module.add_function('MakeRectangleChecker', 'ns3::Ptr< ns3::AttributeChecker const >', []) - ## vector.h: extern ns3::Ptr ns3::MakeVectorChecker() [free function] - module.add_function('MakeVectorChecker', - 'ns3::Ptr< ns3::AttributeChecker const >', - []) register_functions_ns3_Config(module.get_submodule('Config'), root_module) register_functions_ns3_TimeStepPrecision(module.get_submodule('TimeStepPrecision'), root_module) register_functions_ns3_addressUtils(module.get_submodule('addressUtils'), root_module)