diff --git a/src/plugins/tools/net_tracer/db_plugin/gsiDeclDbNetTracer.cc b/src/plugins/tools/net_tracer/db_plugin/gsiDeclDbNetTracer.cc index 90fdab1ad..f9bc8c693 100644 --- a/src/plugins/tools/net_tracer/db_plugin/gsiDeclDbNetTracer.cc +++ b/src/plugins/tools/net_tracer/db_plugin/gsiDeclDbNetTracer.cc @@ -147,6 +147,14 @@ DB_PUBLIC gsi::Class &decl_dbTechnologyComponent (); gsi::Class decl_NetTracerTechnologyComponent (decl_dbTechnologyComponent (), "db", "NetTracerTechnologyComponent", gsi::iterator ("each", static_cast (&db::NetTracerTechnologyComponent::begin), static_cast (&db::NetTracerTechnologyComponent::end), "@brief Gets the connectivity definitions from the net tracer technology component.\n" + ) + + gsi::method ("clear", &db::NetTracerTechnologyComponent::clear, + "@brief Removes all connectivity definitions.\n" + "This method has been introduced in version 0.28.7" + ) + + gsi::method ("add", &db::NetTracerTechnologyComponent::push_back, gsi::arg ("connection"), + "@brief Adds a connectivity definition.\n" + "This method has been introduced in version 0.28.7" ), "@brief Represents the technology information for the net tracer.\n" "This class has been redefined in version 0.28 and re-introduced in version 0.28.3. Since version 0.28, " diff --git a/testdata/ruby/extNetTracer.rb b/testdata/ruby/extNetTracer.rb index f95a106b9..82ed2c4f9 100644 --- a/testdata/ruby/extNetTracer.rb +++ b/testdata/ruby/extNetTracer.rb @@ -158,6 +158,39 @@ class EXT_TestClass < TestBase end + # Technology component + def test_4 + + c1 = RBA::NetTracerConnectivity::new + c1.connection("1/0", "3/0") + c1.name = "1to3" + + c2 = RBA::NetTracerConnectivity::new + c2.connection("2/0", "3/0") + c2.name = "2to3" + + tc = RBA::NetTracerTechnologyComponent::new + names = tc.each.collect { |c| c.name }.join(";") + assert_equal(names, "") + + tc.add(c1) + names = tc.each.collect { |c| c.name }.join(";") + assert_equal(names, "1to3") + + tc.add(c2) + names = tc.each.collect { |c| c.name }.join(";") + assert_equal(names, "1to3;2to3") + + tc.clear + names = tc.each.collect { |c| c.name }.join(";") + assert_equal(names, "") + + tc.add(c2) + names = tc.each.collect { |c| c.name }.join(";") + assert_equal(names, "2to3") + + end + end load("test_epilogue.rb")