本文整理汇总了C++中EventHandler::execute方法的典型用法代码示例。如果您正苦于以下问题:C++ EventHandler::execute方法的具体用法?C++ EventHandler::execute怎么用?C++ EventHandler::execute使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类EventHandler
的用法示例。
在下文中一共展示了EventHandler::execute方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: execute
void MailboxReader::execute() {
while ( q->hasResults() ) {
Row * r = q->nextRow();
UString n = r->getUString( "name" );
uint id = r->getInt( "id" );
Mailbox * m = ::mailboxes->find( id );
if ( !m || m->name() != n ) {
m = Mailbox::obtain( n );
if ( n != m->d->name )
m->d->name = n;
m->setId( id );
::mailboxes->insert( id, m );
}
if ( r->getBoolean( "deleted" ) )
m->setType( Mailbox::Deleted );
else
m->setType( Mailbox::Ordinary );
uint uidvalidity = r->getInt( "uidvalidity" );
if ( m->d->uidvalidity != uidvalidity ) {
m->d->uidvalidity = uidvalidity;
m->abortSessions();
}
if ( !r->isNull( "owner" ) )
m->setOwner( r->getInt( "owner" ) );
m->setUidnextAndNextModSeq( r->getInt( "uidnext" ),
r->getBigint( "nextmodseq" ),
q->transaction() );
m->setFlag( r->getEString( "flag" ) );
}
if ( !q->done() || done )
return;
done = true;
if ( q->transaction() )
q->transaction()->commit();
::readers->remove( this );
::wiped = false;
if ( q->failed() && !EventLoop::global()->inShutdown() ) {
List<Mailbox> * c = Mailbox::root()->children();
if ( c && !c->isEmpty() )
log( "Couldn't update mailbox tree: " + q->error() );
else
log( "Couldn't create mailbox tree: " + q->error(),
Log::Disaster );
}
if ( owner )
owner->execute();
};