void CWiFiSensor::GetReceivedMessages(TMessageList& t_messages) { /*Resizing the vector, I'm sure to have enough space to store all the messages*/ t_messages.resize(m_tMessages.size()); /*Delivering the messages to the caller*/ std::copy(m_tMessages.begin(),m_tMessages.end(),t_messages.begin()); /*Remove the delivered up messages*/ m_tMessages.clear(); }