summaryrefslogtreecommitdiff
path: root/src/mem/ruby/system/MachineID.hh
diff options
context:
space:
mode:
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;
}