Exemplo n.º 1
0
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();
}
Exemplo n.º 2
0
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);
}
Exemplo n.º 3
0
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();
}
Exemplo n.º 4
0
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();
}