LeechCraft Azoth  0.6.70-15082-g543737046d
Modular multiprotocol IM plugin for LeechCraft
LC::Azoth::AzothUtil Namespace Reference

Namespaces

 detail
 

Functions

template<typename T >
void StandardPurgeMessages (QList< T * > &messages, const QDateTime &before)
 Standard function to purge messages before the given date. More...
 

Function Documentation

◆ StandardPurgeMessages()

template<typename T >
void LC::Azoth::AzothUtil::StandardPurgeMessages ( QList< T * > &  messages,
const QDateTime &  before 
)

Standard function to purge messages before the given date.

This function is a standard implementation to be used in LC::Azoth::ICLEntry::PurgeMessages() implementations. It deletes all the messages in the messages list before the given date before.

The list of messages is assumed to be sorted according to the message timestamp in ascending order.

If before is invalid all the messages will be erased and the list will be cleared.

Parameters
[in,out]messagesThe list of messages to check.
[in]beforeMessages with timestamp earlier than this parameter will be erased.
Template Parameters
TThe type of the message object, which should be implementing the IMessage interface.
See also
IMessage

Definition at line 77 of file azothutil.h.