summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/MachineID.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/system/MachineID.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/system/MachineID.hh')
-rw-r--r--src/mem/ruby/system/MachineID.hh11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/mem/ruby/system/MachineID.hh b/src/mem/ruby/system/MachineID.hh
index 5bfa1584c..9da71f349 100644
--- a/src/mem/ruby/system/MachineID.hh
+++ b/src/mem/ruby/system/MachineID.hh
@@ -39,6 +39,9 @@
#ifndef MACHINEID_H
#define MACHINEID_H
+#include <iostream>
+#include <string>
+
#include "mem/ruby/common/Global.hh"
#include "mem/gems_common/util.hh"
#include "mem/protocol/MachineType.hh"
@@ -49,7 +52,7 @@ struct MachineID {
};
extern inline
-string MachineIDToString (MachineID machine) {
+std::string MachineIDToString (MachineID machine) {
return MachineType_to_string(machine.type)+"_"+int_to_string(machine.num);
}
@@ -66,13 +69,13 @@ bool operator!=(const MachineID & obj1, const MachineID & obj2)
}
// Output operator declaration
-ostream& operator<<(ostream& out, const MachineID& obj);
+std::ostream& operator<<(std::ostream& out, const MachineID& obj);
// ******************* Definitions *******************
// Output operator definition
extern inline
-ostream& operator<<(ostream& out, const MachineID& obj)
+std::ostream& operator<<(std::ostream& out, const MachineID& obj)
{
if ((obj.type < MachineType_NUM) && (obj.type >= MachineType_FIRST)) {
out << MachineType_to_string(obj.type);
@@ -81,7 +84,7 @@ ostream& operator<<(ostream& out, const MachineID& obj)
}
out << "-";
out << obj.num;
- out << flush;
+ out << std::flush;
return out;
}