CBuffer::size_type CBuffer::AddLine(const CString& sFormat, const CString& sText, const timeval* ts) { if (!m_uLineCount) { return 0; } while (size() >= m_uLineCount) { erase(begin()); } push_back(CBufLine(sFormat, sText, ts)); return size(); }
CBuffer::size_type CBuffer::UpdateLine(const CString& sCommand, const CMessage& Format, const CString& sText) { for (CBufLine& Line : *this) { if (Line.GetCommand().Equals(sCommand)) { Line = CBufLine(Format, sText); return size(); } } return AddLine(Format, sText); }
size_t CBuffer::AddLine(const CString& sPre, const CString& sPost, bool bIncNick) { if (!m_uLineCount) { return 0; } while (size() >= m_uLineCount) { erase(begin()); } push_back(CBufLine(sPre, sPost, bIncNick)); return size(); }
CBuffer::size_type CBuffer::AddLine(const CMessage& Format, const CString& sText) { if (!m_uLineCount) { return 0; } while (size() >= m_uLineCount) { erase(begin()); } push_back(CBufLine(Format, sText)); return size(); }