RIB::const_iterator const i_end (old.end());
for (; i != i_end; ++i)
if (i->action_ == ACCEPT)
- updateRoutingCache(i->stream_, i->area_)
+ updateRoutingCache(i->stream_, i->area_);
}
////////////////////////////////////////
return rib_.end();
}
-prefix_ RoutingEntry const & senf::log::Target::operator[](size_type i)
- size_type size() const
+prefix_ senf::log::Target::RoutingEntry const & senf::log::Target::operator[](size_type i)
+ const
{
return rib_[i];
}
-prefix_ RoutingEntry const & senf::log::Target::operator[](size_type i)
- size_type size() const
+prefix_ senf::log::Target::size_type senf::log::Target::size()
+ const
{
return rib_.size();
}
iterator begin() const; ///< Iterator to beginning of routing table
iterator end() const; ///< Iterator past the end of routing table
- RoutingEntry const & operator[](size_type i) ///< Access routing entry
+ RoutingEntry const & operator[](size_type i) const; ///< Access routing entry
size_type size() const; ///< Number of routing table entries
bool empty() const; ///< \c true, if routing table empty, \c false otherwise
};
BOOST_CHECK_EQUAL_COLLECTIONS( i, i_end, data, data + sizeof(data)/sizeof(data[0]) );
+ BOOST_CHECK_EQUAL( *target.begin(), target[0] );
target.unroute<senf::log::Debug>();
target.unroute<senf::log::test::myStream, senf::log::VERBOSE>();
target.unroute<senf::log::test::myStream, senf::log::DefaultArea>(senf::log::Target::REJECT);
- target.unroute<senf::log::test::myStream, senf::log::test::Foo, senf::log::VERBOSE>();
target.unroute("senf::log::test::myStream", "", senf::log::IMPORTANT::value,
senf::log::Target::REJECT);
target.unroute(1);
- target.unroute(0);
+ target.clear();
BOOST_CHECK( target.begin() == target.end() );
+ BOOST_CHECK( target.empty() );
+ BOOST_CHECK( target.size() == 0 );
}
///////////////////////////////cc.e////////////////////////////////////////