A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Loading...
Searching...
No Matches
node-list.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2007 INRIA
3
*
4
* SPDX-License-Identifier: GPL-2.0-only
5
*
6
* Authors:
7
* Mathieu Lacage <mathieu.lacage@sophia.inria.fr>,
8
*/
9
#ifndef NODE_LIST_H
10
#define NODE_LIST_H
11
12
#include "ns3/ptr.h"
13
14
#include <vector>
15
16
namespace
ns3
17
{
18
19
class
Node;
20
class
CallbackBase;
21
22
/**
23
* @ingroup network
24
*
25
* @brief the list of simulation nodes.
26
*
27
* Every Node created is automatically added to this list.
28
*/
29
class
NodeList
30
{
31
public
:
32
/// Node container iterator
33
typedef
std::vector<Ptr<Node>>::const_iterator
Iterator
;
34
35
/**
36
* @param node node to add
37
* @returns index of node in list.
38
*
39
* This method is called automatically from Node::Node so
40
* the user has little reason to call it himself.
41
*/
42
static
uint32_t
Add
(
Ptr<Node>
node);
43
/**
44
* @returns a C++ iterator located at the beginning of this
45
* list.
46
*/
47
static
Iterator
Begin
();
48
/**
49
* @returns a C++ iterator located at the end of this
50
* list.
51
*/
52
static
Iterator
End
();
53
/**
54
* @param n index of requested node.
55
* @returns the Node associated to index n.
56
*/
57
static
Ptr<Node>
GetNode
(
uint32_t
n);
58
/**
59
* @returns the number of nodes currently in the list.
60
*/
61
static
uint32_t
GetNNodes
();
62
};
63
64
}
// namespace ns3
65
66
#endif
/* NODE_LIST_H */
ns3::NodeList
the list of simulation nodes.
Definition
node-list.h:30
ns3::NodeList::Begin
static Iterator Begin()
Definition
node-list.cc:226
ns3::NodeList::GetNNodes
static uint32_t GetNNodes()
Definition
node-list.cc:247
ns3::NodeList::GetNode
static Ptr< Node > GetNode(uint32_t n)
Definition
node-list.cc:240
ns3::NodeList::Add
static uint32_t Add(Ptr< Node > node)
Definition
node-list.cc:219
ns3::NodeList::Iterator
std::vector< Ptr< Node > >::const_iterator Iterator
Node container iterator.
Definition
node-list.h:33
ns3::NodeList::End
static Iterator End()
Definition
node-list.cc:233
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition
mpi-test-fixtures.h:37
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
network
model
node-list.h
Generated on Thu Dec 12 2024 18:40:45 for ns-3 by
1.11.0