summaryrefslogtreecommitdiff
path: root/src/mem/ruby/common/Consumer.hh
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2010-03-10 18:33:11 -0800
committerNathan Binkert <nate@binkert.org>2010-03-10 18:33:11 -0800
commit140785d24c27f3afddbe95c9e504e27bf8274290 (patch)
treecc4d27a7d4e417a6cd0f0364cff3db67ca1825b7 /src/mem/ruby/common/Consumer.hh
parent1badec39a94397397a3c918bfcc75c71efc507ea (diff)
downloadgem5-140785d24c27f3afddbe95c9e504e27bf8274290.tar.xz
ruby: get rid of std-includes.hh
Do not use "using namespace std;" in headers Include header files as needed
Diffstat (limited to 'src/mem/ruby/common/Consumer.hh')
-rw-r--r--src/mem/ruby/common/Consumer.hh10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mem/ruby/common/Consumer.hh b/src/mem/ruby/common/Consumer.hh
index beb50a891..955c1ffa9 100644
--- a/src/mem/ruby/common/Consumer.hh
+++ b/src/mem/ruby/common/Consumer.hh
@@ -39,6 +39,8 @@
#ifndef CONSUMER_H
#define CONSUMER_H
+#include <iostream>
+
#include "mem/ruby/common/Global.hh"
#include "mem/ruby/eventqueue/RubyEventQueue.hh"
@@ -56,7 +58,7 @@ public:
// void triggerWakeup() { Time time = g_eventQueue_ptr->getTime(); if (m_last_wakeup != time) { wakeup(); m_last_wakeup = time; }}
void triggerWakeup(RubyEventQueue * eventQueue) { Time time = eventQueue->getTime(); if (m_last_wakeup != time) { wakeup(); m_last_wakeup = time; }}
virtual void wakeup() = 0;
- virtual void print(ostream& out) const = 0;
+ virtual void print(std::ostream& out) const = 0;
const Time& getLastScheduledWakeup() const { return m_last_scheduled_wakeup; }
void setLastScheduledWakeup(const Time& time) { m_last_scheduled_wakeup = time; }
@@ -70,16 +72,16 @@ private:
// Output operator declaration
inline extern
-ostream& operator<<(ostream& out, const Consumer& obj);
+std::ostream& operator<<(std::ostream& out, const Consumer& obj);
// ******************* Definitions *******************
// Output operator definition
inline extern
-ostream& operator<<(ostream& out, const Consumer& obj)
+std::ostream& operator<<(std::ostream& out, const Consumer& obj)
{
obj.print(out);
- out << flush;
+ out << std::flush;
return out;
}