BufferType Chat::GetBufHistory () { BufferType bufftosend; std::cout << history_.Count () << std::endl; bufftosend.Add("History :\r\n"); for (size_t i = 0; i < history_.Count () - 1; i++) bufftosend.Add(history_[i] + "\r\n"); bufftosend.Add(history_[history_.Count () - 1]); return bufftosend; }
void Chat::SetBuf (String b) { BufferType* tmp = new BufferType; entry_ = b; String w; std::stringstream ss (entry_); while (ss >> w) tmp->Add (w); buffer_ = *tmp; }