ruby: drop NetworkMessage class
[gem5.git] / src / mem / ruby / common / NetDest.hh
index 7592ad9b592b2c9efc9064ae0da52e8dfef4913d..e09be0c2cb26a74c1a9bb02577665592d0f9dc07 100644 (file)
@@ -26,7 +26,7 @@
  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-// NetDest specifies the network destination of a NetworkMessage
+// NetDest specifies the network destination of a Message
 // This is backward compatible with the Set class that was previously
 // used to specify network destinations.
 // NetDest supports both node networks and component networks
 #ifndef __MEM_RUBY_COMMON_NETDEST_HH__
 #define __MEM_RUBY_COMMON_NETDEST_HH__
 
-#include "mem/ruby/common/Global.hh"
-#include "mem/gems_common/Vector.hh"
-#include "mem/ruby/system/NodeID.hh"
-#include "mem/ruby/system/MachineID.hh"
+#include <iostream>
+#include <vector>
+
 #include "mem/ruby/common/Set.hh"
-#include "mem/protocol/MachineType.hh"
+#include "mem/ruby/common/MachineID.hh"
 
 class NetDest
 {
@@ -52,13 +51,10 @@ class NetDest
     NetDest& operator=(const Set& obj);
 
     ~NetDest()
-    {
-        DEBUG_MSG(MEMORY_COMP, LowPrio, "NetDest Destructor");
-    }
+    { }
 
     void add(MachineID newElement);
     void addNetDest(const NetDest& netDest);
-    void addRandom();
     void setNetDest(MachineType machine, const Set& set);
     void remove(MachineID oldElement);
     void removeNetDest(const NetDest& netDest);
@@ -66,7 +62,7 @@ class NetDest
     void broadcast();
     void broadcast(MachineType machine);
     int count() const;
-    bool isEqual(const NetDest& netDest);
+    bool isEqual(const NetDest& netDest) const;
 
     // return the logical OR of this netDest and orNetDest
     NetDest OR(const NetDest& orNetDest) const;
@@ -87,18 +83,18 @@ class NetDest
     bool isEmpty() const;
 
     // For Princeton Network
-    Vector<NodeID> getAllDest();
+    std::vector<NodeID> getAllDest();
 
     MachineID smallestElement() const;
     MachineID smallestElement(MachineType machine) const;
 
-    void setSize();
+    void resize();
     int getSize() const { return m_bits.size(); }
 
     // get element for a index
     NodeID elementAt(MachineID index);
 
-    void print(ostream& out) const;
+    void print(std::ostream& out) const;
 
   private:
     // returns a value >= MachineType_base_level("this machine")
@@ -111,22 +107,17 @@ class NetDest
         return vec_index;
     }
 
-    NodeID
-    bitIndex(NodeID index) const
-    {
-        return index;
-    }
+    NodeID bitIndex(NodeID index) const { return index; }
 
-    Vector <Set> m_bits;  // a Vector of bit vectors - i.e. Sets
+    std::vector<Set> m_bits;  // a vector of bit vectors - i.e. Sets
 };
 
-inline ostream&
-operator<<(ostream& out, const NetDest& obj)
+inline std::ostream&
+operator<<(std::ostream& out, const NetDest& obj)
 {
     obj.print(out);
-    out << flush;
+    out << std::flush;
     return out;
 }
 
 #endif // __MEM_RUBY_COMMON_NETDEST_HH__
-