コード例 #1
0
 void draw()
 {
     for (ActionList::iterator i = actions.begin(), e = actions.end(); i != e; i++)
     {
         (*i)->execute();
     }
 }
コード例 #2
0
 void removeOwnedActions(void *owner)
 {
     for (ActionList::iterator i = actions.begin(), e = actions.end(); i != e; i++)
     {
         if ((*i)->ownerIs(owner))
         {
             delete *i;
             actions.erase(i);
         }
     }
 }