~Rule() { delete filter_; typedef Commands::const_iterator It; for (It i = cmds_->begin(); i != cmds_->end(); ++i) { delete *i; } delete cmds_; }
void CommandMgr::ClearCommands() { while (!commandTable.empty()) { Commands::iterator itr = commandTable.begin(); delete itr->second; commandTable.erase(itr); } }
void VDDialogEditAccelerators::RefilterCommands(const char *pattern) { mFilteredCommands.clear(); LBClear(IDC_AVAILCOMMANDS); Commands::const_iterator it(mAllCommands.begin()), itEnd(mAllCommands.end()); for(; it != itEnd; ++it) { const VDAccelToCommandEntry& ent = **it; if (VDFileWildMatch(pattern, ent.mpName)) { const VDStringW s(VDTextAToW(ent.mpName)); mFilteredCommands.push_back(&ent); LBAddString(IDC_AVAILCOMMANDS, s.c_str()); } } LBSetSelectedIndex(IDC_AVAILCOMMANDS, 0); }
/** The command handler functions. */ bool cmdGetItem( Command& command ) { const QueueGetItemPacket* packet = command.get< QueueGetItemPacket >(); Commands commands; queue.tryPop( packet->itemsRequested, commands ); for( CommandsCIter i = commands.begin(); i != commands.end(); ++i ) { Command* item = *i; ObjectPacket* reply = item->getModifiable< ObjectPacket >(); reply->instanceID = packet->slaveInstanceID; command.getNode()->send( *reply ); item->release(); } if( packet->itemsRequested > commands.size( )) { QueueEmptyPacket reply( packet ); command.getNode()->send( reply ); } return true; }
void redo() { for(Commands::const_iterator i = cmds.begin(); i != cmds.end(); ++i) (*i)->redo(); }