diff options
author | Nathan Binkert <nate@binkert.org> | 2010-04-02 11:20:32 -0700 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-04-02 11:20:32 -0700 |
commit | f1c3f3044b73d890ffdfdd113b3b37ae2809d21b (patch) | |
tree | 959d71e897a8d01868c8dea8a8b225cbd1b5ce2c /src/mem/ruby/network/Network.hh | |
parent | be10204729c107b41d5d7487323c732e9fa09df5 (diff) | |
download | gem5-f1c3f3044b73d890ffdfdd113b3b37ae2809d21b.tar.xz |
ruby: get "using namespace" out of headers
In addition to obvious changes, this required a slight change to the slicc
grammar to allow types with :: in them. Otherwise slicc barfs on std::string
which we need for the headers that slicc generates.
Diffstat (limited to 'src/mem/ruby/network/Network.hh')
-rw-r--r-- | src/mem/ruby/network/Network.hh | 17 |
1 files changed, 10 insertions, 7 deletions
diff --git a/src/mem/ruby/network/Network.hh b/src/mem/ruby/network/Network.hh index b79c6407e..fb56904db 100644 --- a/src/mem/ruby/network/Network.hh +++ b/src/mem/ruby/network/Network.hh @@ -40,6 +40,9 @@ #ifndef __MEM_RUBY_NETWORK_NETWORK_HH__ #define __MEM_RUBY_NETWORK_NETWORK_HH__ +#include <iostream> +#include <string> + #include "mem/protocol/MessageSizeType.hh" #include "mem/ruby/common/Global.hh" #include "mem/ruby/system/NodeID.hh" @@ -88,10 +91,10 @@ class Network : public SimObject virtual void reset() = 0; - virtual void printStats(ostream& out) const = 0; + virtual void printStats(std::ostream& out) const = 0; virtual void clearStats() = 0; - virtual void printConfig(ostream& out) const = 0; - virtual void print(ostream& out) const = 0; + virtual void printConfig(std::ostream& out) const = 0; + virtual void print(std::ostream& out) const = 0; protected: // Private copy constructor and assignment operator @@ -99,7 +102,7 @@ class Network : public SimObject Network& operator=(const Network& obj); protected: - const string m_name; + const std::string m_name; int m_nodes; int m_virtual_networks; int m_buffer_size; @@ -111,11 +114,11 @@ class Network : public SimObject int m_data_msg_size; }; -inline ostream& -operator<<(ostream& out, const Network& obj) +inline std::ostream& +operator<<(std::ostream& out, const Network& obj) { obj.print(out); - out << flush; + out << std::flush; return out; } |