diff options
author | Nathan Binkert <nate@binkert.org> | 2010-03-29 20:39:02 -0400 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2010-03-29 20:39:02 -0400 |
commit | 60ae1d2b10002bb73b420fce91c4b74397c55457 (patch) | |
tree | f986a920f3d8702f93f8aefa8a64007495144ae6 /src/cpu/rubytest/CheckTable.hh | |
parent | 1c98bc5a567599f9fdc7d9940dbfe907091cb3b4 (diff) | |
download | gem5-60ae1d2b10002bb73b420fce91c4b74397c55457.tar.xz |
style: cleanup the Ruby Tester
Diffstat (limited to 'src/cpu/rubytest/CheckTable.hh')
-rw-r--r-- | src/cpu/rubytest/CheckTable.hh | 74 |
1 files changed, 31 insertions, 43 deletions
diff --git a/src/cpu/rubytest/CheckTable.hh b/src/cpu/rubytest/CheckTable.hh index 8b05e6541..a22fa7f73 100644 --- a/src/cpu/rubytest/CheckTable.hh +++ b/src/cpu/rubytest/CheckTable.hh @@ -1,4 +1,3 @@ - /* * Copyright (c) 1999-2008 Mark D. Hill and David A. Wood * Copyright (c) 2009 Advanced Micro Devices, Inc. @@ -28,66 +27,55 @@ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -#ifndef CHECKTABLE_H -#define CHECKTABLE_H +#ifndef __CPU_RUBYTEST_CHECKTABLE_HH__ +#define __CPU_RUBYTEST_CHECKTABLE_HH__ #include <iostream> -#include "mem/ruby/common/Global.hh" #include "mem/gems_common/Vector.hh" +#include "mem/ruby/common/Global.hh" class Address; class Check; class RubyTester; template <class KEY_TYPE, class VALUE_TYPE> class Map; -class CheckTable { -public: - // Constructors - CheckTable(int _num_cpu_sequencers, RubyTester* _tester); - - // Destructor - ~CheckTable(); - - // Public Methods +class CheckTable +{ + public: + CheckTable(int _num_cpu_sequencers, RubyTester* _tester); + ~CheckTable(); - Check* getRandomCheck(); - Check* getCheck(const Address& address); + Check* getRandomCheck(); + Check* getCheck(const Address& address); - // bool isPresent(const Address& address) const; - // void removeCheckFromTable(const Address& address); - // bool isTableFull() const; - // Need a method to select a check or retrieve a check + // bool isPresent(const Address& address) const; + // void removeCheckFromTable(const Address& address); + // bool isTableFull() const; + // Need a method to select a check or retrieve a check - void print(std::ostream& out) const; -private: - // Private Methods - void addCheck(const Address& address); + void print(std::ostream& out) const; - // Private copy constructor and assignment operator - CheckTable(const CheckTable& obj); - CheckTable& operator=(const CheckTable& obj); - - // Data Members (m_ prefix) - Vector<Check*> m_check_vector; - Map<Address, Check*>* m_lookup_map_ptr; + private: + void addCheck(const Address& address); - int m_num_cpu_sequencers; - RubyTester* m_tester_ptr; -}; + // Private copy constructor and assignment operator + CheckTable(const CheckTable& obj); + CheckTable& operator=(const CheckTable& obj); -// Output operator declaration -std::ostream& operator<<(std::ostream& out, const CheckTable& obj); + Vector<Check*> m_check_vector; + Map<Address, Check*>* m_lookup_map_ptr; -// ******************* Definitions ******************* + int m_num_cpu_sequencers; + RubyTester* m_tester_ptr; +}; -// Output operator definition -extern inline -std::ostream& operator<<(std::ostream& out, const CheckTable& obj) +inline std::ostream& +operator<<(std::ostream& out, const CheckTable& obj) { - obj.print(out); - out << std::flush; - return out; + obj.print(out); + out << std::flush; + return out; } -#endif //CHECKTABLE_H +#endif // __CPU_RUBYTEST_CHECKTABLE_HH__ |