Consumer.hh (6154:6bb54dcb940e) Consumer.hh (6285:ce086eca1ede)
1
2/*
3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 39 unchanged lines hidden (view full) ---

48public:
49 // Constructors
50 Consumer() { m_last_scheduled_wakeup = 0; m_last_wakeup = 0; m_out_link_vec.setSize(0); }
51
52 // Destructor
53 virtual ~Consumer() { }
54
55 // Public Methods - pure virtual methods
1
2/*
3 * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood
4 * All rights reserved.
5 *
6 * Redistribution and use in source and binary forms, with or without
7 * modification, are permitted provided that the following conditions are
8 * met: redistributions of source code must retain the above copyright

--- 39 unchanged lines hidden (view full) ---

48public:
49 // Constructors
50 Consumer() { m_last_scheduled_wakeup = 0; m_last_wakeup = 0; m_out_link_vec.setSize(0); }
51
52 // Destructor
53 virtual ~Consumer() { }
54
55 // Public Methods - pure virtual methods
56 void triggerWakeup() { Time time = g_eventQueue_ptr->getTime(); if (m_last_wakeup != time) { wakeup(); m_last_wakeup = time; }}
56 // void triggerWakeup() { Time time = g_eventQueue_ptr->getTime(); if (m_last_wakeup != time) { wakeup(); m_last_wakeup = time; }}
57 void triggerWakeup(RubyEventQueue * eventQueue) { Time time = eventQueue->getTime(); if (m_last_wakeup != time) { wakeup(); m_last_wakeup = time; }}
57 virtual void wakeup() = 0;
58 virtual void print(ostream& out) const = 0;
59 const Time& getLastScheduledWakeup() const { return m_last_scheduled_wakeup; }
60 void setLastScheduledWakeup(const Time& time) { m_last_scheduled_wakeup = time; }
61 Vector< Vector<MessageBuffer*> > getOutBuffers() { return m_out_link_vec; }
62
63protected:
64 Vector< Vector<MessageBuffer*> > m_out_link_vec;

--- 25 unchanged lines hidden ---
58 virtual void wakeup() = 0;
59 virtual void print(ostream& out) const = 0;
60 const Time& getLastScheduledWakeup() const { return m_last_scheduled_wakeup; }
61 void setLastScheduledWakeup(const Time& time) { m_last_scheduled_wakeup = time; }
62 Vector< Vector<MessageBuffer*> > getOutBuffers() { return m_out_link_vec; }
63
64protected:
65 Vector< Vector<MessageBuffer*> > m_out_link_vec;

--- 25 unchanged lines hidden ---