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/system/DirectoryMemory.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/system/DirectoryMemory.hh')
-rw-r--r-- | src/mem/ruby/system/DirectoryMemory.hh | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/src/mem/ruby/system/DirectoryMemory.hh b/src/mem/ruby/system/DirectoryMemory.hh index 4e7bfc4f6..79b04726a 100644 --- a/src/mem/ruby/system/DirectoryMemory.hh +++ b/src/mem/ruby/system/DirectoryMemory.hh @@ -29,6 +29,9 @@ #ifndef __MEM_RUBY_SYSTEM_DIRECTORYMEMORY_HH__ #define __MEM_RUBY_SYSTEM_DIRECTORYMEMORY_HH__ +#include <iostream> +#include <string> + #include "mem/protocol/Directory_Entry.hh" #include "mem/ruby/common/Address.hh" #include "mem/ruby/common/Global.hh" @@ -52,15 +55,15 @@ class DirectoryMemory : public SimObject bool isSparseImplementation() { return m_use_map; } uint64 getSize() { return m_size_bytes; } - void printConfig(ostream& out) const; - static void printGlobalConfig(ostream & out); + void printConfig(std::ostream& out) const; + static void printGlobalConfig(std::ostream & out); bool isPresent(PhysAddress address); Directory_Entry& lookup(PhysAddress address); void invalidateBlock(PhysAddress address); - void print(ostream& out) const; - void printStats(ostream& out) const; + void print(std::ostream& out) const; + void printStats(std::ostream& out) const; private: // Private copy constructor and assignment operator @@ -68,7 +71,7 @@ class DirectoryMemory : public SimObject DirectoryMemory& operator=(const DirectoryMemory& obj); private: - const string m_name; + const std::string m_name; Directory_Entry **m_entries; // int m_size; // # of memory module blocks this directory is // responsible for @@ -88,11 +91,11 @@ class DirectoryMemory : public SimObject int m_map_levels; }; -inline ostream& -operator<<(ostream& out, const DirectoryMemory& obj) +inline std::ostream& +operator<<(std::ostream& out, const DirectoryMemory& obj) { obj.print(out); - out << flush; + out << std::flush; return out; } |