src/node/node.h
changeset 359 91b7ad7fa784
parent 355 d18da75542c7
child 361 9b159ff6dbcb
--- a/src/node/node.h	Tue Mar 20 06:28:24 2007 -0700
+++ b/src/node/node.h	Wed Mar 21 23:17:11 2007 -0700
@@ -103,8 +103,10 @@
 class Arp;
 class TraceContext;
 class TraceResolver;
+class NodeList;
 
 class Node {
+friend class NodeList;
 public:
   typedef SmartVector<Node*> SmartNodeVec_t;
   Node();
@@ -139,14 +141,16 @@
   static const SmartNodeVec_t& Nodes(); // Get a vector of all nodes
   static void  ClearAll();          // Delete all nodes for memory leak checking
   static void  ClearAllPrototypes();// Delete the prototype stack
-private: 
-  static void  CreateDefaultPrototype(); // Create a "typical" prototype node
+
   // Global static variables
 private: 
   static uint32_t       g_nextId;     // Next available ID
   static SmartNodeVec_t g_nodes;      // Vector of all nodes created
   static SmartNodeVec_t g_prototypes; // Node prototype stack
 
+protected:
+  void SetId(uint32_t);            // NodeList::Add() calls this
+
 public:
   // Virtual "Getters" for each capability.
   // These exist to allow owners of a generic Node pointer to get
@@ -163,7 +167,6 @@
   virtual Arp *            GetArp (void) const;
   
 private:
-  static uint32_t m_nodeId;
   uint32_t    m_id;         // Node id for this node
   uint32_t    m_sid;        // System id for this node
 };