A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
zigbee-stack-container.cc
Go to the documentation of this file.
1/*
2 * Copyright (c) 2024 Tokushima University, Japan
3 *
4 * SPDX-License-Identifier: GPL-2.0-only
5 *
6 * Author:
7 * Alberto Gallegos Ramonet <alramonet@is.tokushima-u.ac.jp>
8 */
9
11
12#include "ns3/names.h"
13
14namespace ns3
15{
16namespace zigbee
17{
18
22
27
29{
31 m_stacks.emplace_back(stack);
32}
33
36{
37 return m_stacks.begin();
38}
39
42{
43 return m_stacks.end();
44}
45
48{
49 return m_stacks.size();
50}
51
54{
55 return m_stacks[i];
56}
57
58void
60{
61 for (auto i = other.Begin(); i != other.End(); i++)
62 {
63 m_stacks.emplace_back(*i);
64 }
65}
66
67void
69{
70 m_stacks.emplace_back(stack);
71}
72
73void
74ZigbeeStackContainer::Add(std::string stackName)
75{
77 m_stacks.emplace_back(stack);
78}
79
80} // namespace zigbee
81} // namespace ns3
static Ptr< T > Find(std::string path)
Given a name path string, look to see if there's an object in the system with that associated to it.
Definition names.h:443
Smart pointer class similar to boost::intrusive_ptr.
Holds a vector of ns3::ZigbeeStack pointers.
std::vector< Ptr< ZigbeeStack > > m_stacks
ZigbeeStack smart pointers.
uint32_t GetN() const
Get the number of stacks present in the stack container.
Iterator End() const
Get an iterator which indicates past the last ZigbeeStack in the container.
Iterator Begin() const
Get and iterator which refers to the first ZigbeeStack in the container.
Ptr< ZigbeeStack > Get(uint32_t i) const
Get a stack element from the container.
void Add(ZigbeeStackContainer other)
Append the contents of another ZigbeeStackContainer to the end of this container.
std::vector< Ptr< ZigbeeStack > >::const_iterator Iterator
The iterator used in this Container.
ZigbeeStackContainer()
The default constructor, create an empty ZigbeeStackContainer.
Every class exported by the ns3 library is enclosed in the ns3 namespace.