1/* 2 * Copyright (c) 2000-2005 The Regents of The University of Michigan 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions are 7 * met: redistributions of source code must retain the above copyright 8 * notice, this list of conditions and the following disclaimer; --- 88 unchanged lines hidden (view full) --- 97 prev = curr; 98 curr = curr->next; 99 } 100 101 if (curr == event) 102 prev->next = curr->next; 103} 104 |
105Event * |
106EventQueue::serviceOne() 107{ 108 Event *event = head; 109 event->clearFlags(Event::Scheduled); 110 head = event->next; 111 112 // handle action |
113 if (!event->squashed()) { |
114 event->process(); |
115 if (event->isExitEvent()) { 116 assert(!event->getFlags(Event::AutoDelete)); // would be silly 117 return event; 118 } 119 } else { |
120 event->clearFlags(Event::Squashed); |
121 } |
122 123 if (event->getFlags(Event::AutoDelete) && !event->scheduled()) 124 delete event; |
125 126 return NULL; |
127} 128 129 130void 131Event::serialize(std::ostream &os) 132{ 133 SERIALIZE_SCALAR(_when); 134 SERIALIZE_SCALAR(_priority); --- 135 unchanged lines hidden --- |