From f1c3f3044b73d890ffdfdd113b3b37ae2809d21b Mon Sep 17 00:00:00 2001 From: Nathan Binkert Date: Fri, 2 Apr 2010 11:20:32 -0700 Subject: 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. --- src/mem/ruby/network/Network.hh | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) (limited to 'src/mem/ruby/network/Network.hh') 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 +#include + #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; } -- cgit v1.2.3