src/node/node-list.cc
changeset 2989 b7eb3929096c
parent 2983 e3a416fe9dd5
parent 2965 4b28e9740e3b
child 3290 3167a20f9cf0
equal deleted inserted replaced
2988:8774a8c9526f 2989:b7eb3929096c
    28 
    28 
    29 namespace ns3 {
    29 namespace ns3 {
    30 
    30 
    31 NS_LOG_COMPONENT_DEFINE ("NodeList");
    31 NS_LOG_COMPONENT_DEFINE ("NodeList");
    32 
    32 
    33 
       
    34 /**
    33 /**
    35  * The private node list used by the static-based API
    34  * \brief private implementation detail of the NodeList API.
    36  */
    35  */
    37 class NodeListPriv : public Object
    36 class NodeListPriv : public Object
    38 {
    37 {
    39 public:
    38 public:
    40   static TypeId GetTypeId (void);
    39   static TypeId GetTypeId (void);
    53   static Ptr<NodeListPriv> *DoGet (void);
    52   static Ptr<NodeListPriv> *DoGet (void);
    54   static void Delete (void);
    53   static void Delete (void);
    55   std::vector<Ptr<Node> > m_nodes;
    54   std::vector<Ptr<Node> > m_nodes;
    56 };
    55 };
    57 
    56 
       
    57 NS_OBJECT_ENSURE_REGISTERED (NodeListPriv);
       
    58 
    58 TypeId 
    59 TypeId 
    59 NodeListPriv::GetTypeId (void)
    60 NodeListPriv::GetTypeId (void)
    60 {
    61 {
    61   static TypeId tid = TypeId ("NodeListPriv")
    62   static TypeId tid = TypeId ("ns3::NodeListPriv")
    62     .SetParent<Object> ()
    63     .SetParent<Object> ()
    63     .AddAttribute ("NodeList", "The list of all nodes created during the simulation.",
    64     .AddAttribute ("NodeList", "The list of all nodes created during the simulation.",
    64                    ObjectVector (),
    65                    ObjectVectorValue (),
    65                    MakeObjectVectorAccessor (&NodeListPriv::m_nodes),
    66                    MakeObjectVectorAccessor (&NodeListPriv::m_nodes),
    66                    MakeObjectVectorChecker ())
    67                    MakeObjectVectorChecker<Node> ())
    67     ;
    68     ;
    68   return tid;
    69   return tid;
    69 }
    70 }
    70 
    71 
    71 Ptr<NodeListPriv> 
    72 Ptr<NodeListPriv>