diff options
author | Nathan Binkert <nate@binkert.org> | 2010-03-10 18:33:11 -0800 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-03-10 18:33:11 -0800 |
commit | 140785d24c27f3afddbe95c9e504e27bf8274290 (patch) | |
tree | cc4d27a7d4e417a6cd0f0364cff3db67ca1825b7 /src/mem/ruby/recorder | |
parent | 1badec39a94397397a3c918bfcc75c71efc507ea (diff) | |
download | gem5-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/recorder')
-rw-r--r-- | src/mem/ruby/recorder/CacheRecorder.hh | 16 | ||||
-rw-r--r-- | src/mem/ruby/recorder/Tracer.cc | 6 | ||||
-rw-r--r-- | src/mem/ruby/recorder/Tracer.hh | 15 |
3 files changed, 21 insertions, 16 deletions
diff --git a/src/mem/ruby/recorder/CacheRecorder.hh b/src/mem/ruby/recorder/CacheRecorder.hh index 88cc5eaca..2616f73ae 100644 --- a/src/mem/ruby/recorder/CacheRecorder.hh +++ b/src/mem/ruby/recorder/CacheRecorder.hh @@ -38,11 +38,13 @@ #ifndef CACHERECORDER_H #define CACHERECORDER_H -#include "mem/ruby/libruby_internal.hh" +#include <iostream> +#include <string> +#include "mem/protocol/CacheRequestType.hh" #include "mem/ruby/common/Global.hh" +#include "mem/ruby/libruby_internal.hh" #include "mem/ruby/system/NodeID.hh" -#include "mem/protocol/CacheRequestType.hh" template <class TYPE> class PrioHeap; class Address; @@ -63,9 +65,9 @@ public: const Address& pc_addr, RubyRequestType type, Time time); - int dumpRecords(string filename); + int dumpRecords(std::string filename); - void print(ostream& out) const; + void print(std::ostream& out) const; private: // Private Methods @@ -78,16 +80,16 @@ private: }; // Output operator declaration -ostream& operator<<(ostream& out, const CacheRecorder& obj); +std::ostream& operator<<(std::ostream& out, const CacheRecorder& obj); // ******************* Definitions ******************* // Output operator definition extern inline -ostream& operator<<(ostream& out, const CacheRecorder& obj) +std::ostream& operator<<(std::ostream& out, const CacheRecorder& obj) { obj.print(out); - out << flush; + out << std::flush; return out; } diff --git a/src/mem/ruby/recorder/Tracer.cc b/src/mem/ruby/recorder/Tracer.cc index b58fa1eb6..5a20c2b02 100644 --- a/src/mem/ruby/recorder/Tracer.cc +++ b/src/mem/ruby/recorder/Tracer.cc @@ -62,7 +62,7 @@ void Tracer::init() { } -void Tracer::startTrace(string filename) +void Tracer::startTrace(std::string filename) { if (m_enabled) { stopTrace(); @@ -101,7 +101,7 @@ void Tracer::traceRequest(Sequencer* sequencer, } // Class method -int Tracer::playbackTrace(string filename) +int Tracer::playbackTrace(std::string filename) { igzstream in(filename.c_str()); if (in.fail()) { @@ -147,7 +147,7 @@ int Tracer::playbackTrace(string filename) return counter; } -void Tracer::print(ostream& out) const +void Tracer::print(std::ostream& out) const { } diff --git a/src/mem/ruby/recorder/Tracer.hh b/src/mem/ruby/recorder/Tracer.hh index 16432f5fc..a068c32eb 100644 --- a/src/mem/ruby/recorder/Tracer.hh +++ b/src/mem/ruby/recorder/Tracer.hh @@ -38,6 +38,9 @@ #ifndef TRACER_H #define TRACER_H +#include <iostream> +#include <string> + #include "mem/ruby/libruby_internal.hh" #include "mem/ruby/common/Global.hh" @@ -65,7 +68,7 @@ public: ~Tracer(); // Public Methods - void startTrace(string filename); + void startTrace(std::string filename); void stopTrace(); bool traceEnabled() { return m_enabled; } void traceRequest(Sequencer* sequencer, @@ -74,10 +77,10 @@ public: RubyRequestType type, Time time); - void print(ostream& out) const; + void print(std::ostream& out) const; // Public Class Methods - int playbackTrace(string filename); + int playbackTrace(std::string filename); void init(); private: // Private Methods @@ -95,16 +98,16 @@ private: }; // Output operator declaration -ostream& operator<<(ostream& out, const Tracer& obj); +std::ostream& operator<<(std::ostream& out, const Tracer& obj); // ******************* Definitions ******************* // Output operator definition extern inline -ostream& operator<<(ostream& out, const Tracer& obj) +std::ostream& operator<<(std::ostream& out, const Tracer& obj) { obj.print(out); - out << flush; + out << std::flush; return out; } |