void connection::notify_listeners(const sample& sample) { switch(sample.getType()) { case sample_type::new_frame: notify_listeners_about_new_frame(); break; case sample_type::allocation: notify_listeners_about_allocation(sample); break; } }