eventq.hh (9044:904ddeecc653) | eventq.hh (9099:7dee77da691b) |
---|---|
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; --- 417 unchanged lines hidden (view full) --- 426#ifndef SWIG 427class EventManager 428{ 429 protected: 430 /** A pointer to this object's event queue */ 431 EventQueue *eventq; 432 433 public: | 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; --- 417 unchanged lines hidden (view full) --- 426#ifndef SWIG 427class EventManager 428{ 429 protected: 430 /** A pointer to this object's event queue */ 431 EventQueue *eventq; 432 433 public: |
434 EventManager(EventManager &em) : eventq(em.queue()) {} 435 EventManager(EventManager *em) : eventq(em ? em->queue() : NULL) {} | 434 EventManager(EventManager &em) : eventq(em.eventq) {} 435 EventManager(EventManager *em) : eventq(em ? em->eventq : NULL) {} |
436 EventManager(EventQueue *eq) : eventq(eq) {} 437 438 EventQueue * | 436 EventManager(EventQueue *eq) : eventq(eq) {} 437 438 EventQueue * |
439 queue() const | 439 eventQueue() const |
440 { 441 return eventq; 442 } 443 | 440 { 441 return eventq; 442 } 443 |
444 operator EventQueue *() const 445 { 446 return eventq; 447 } 448 | |
449 void 450 schedule(Event &event, Tick when) 451 { 452 eventq->schedule(&event, when); 453 } 454 455 void 456 deschedule(Event &event) --- 147 unchanged lines hidden --- | 444 void 445 schedule(Event &event, Tick when) 446 { 447 eventq->schedule(&event, when); 448 } 449 450 void 451 deschedule(Event &event) --- 147 unchanged lines hidden --- |