コード例 #1
0
ファイル: Chat.cpp プロジェクト: Noxalus/YAPOG
  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;
  }
コード例 #2
0
ファイル: Chat.cpp プロジェクト: Noxalus/YAPOG
  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;
  }