1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
|
template<class ChildT>
boost::filter_iterator<
std::not_equal_to<ChildT const*>,
boost::transform_iterator<
BOOST_TYPEOF(boost::bind(&boost::polymorphic_downcast<ChildT*,wxWindow>,_1))
,
BOOST_TYPEOF(wxWindow().GetChildren().end())
>
>
fwx_make_child_wnd_iterator_begin(wxWindow&parent)
{
return boost::make_filter_iterator(
boost::bind(std::not_equal_to<ChildT const*>(),static_cast<ChildT const*>(NULL),_1),
boost::make_transform_iterator(parent.GetChildren().begin(),boost::bind(&boost::polymorphic_downcast<ChildT*,wxWindow>,_1)),
boost::make_transform_iterator(parent.GetChildren().end(),boost::bind(&boost::polymorphic_downcast<ChildT*,wxWindow>,_1))
);
} |
Partager