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
attribute-default-iterator.h
Go to the documentation of this file.
1
/*
2
* SPDX-License-Identifier: GPL-2.0-only
3
*
4
* Authors: Faker Moatamri <faker.moatamri@sophia.inria.fr>
5
* Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
6
*/
7
8
#ifndef ATTRIBUTE_DEFAULT_ITERATOR_H
9
#define ATTRIBUTE_DEFAULT_ITERATOR_H
10
11
#include "ns3/type-id.h"
12
13
#include <string>
14
15
namespace
ns3
16
{
17
18
/**
19
* \ingroup configstore
20
*
21
* \brief Iterator to iterate on the default values of attributes of an ns3::Object
22
*/
23
class
AttributeDefaultIterator
24
{
25
public
:
26
virtual
~AttributeDefaultIterator
() = 0;
27
/**
28
* \brief This function will go through all the TypeIds and get only the attributes which are
29
* explicit values (not vectors or pointer or arrays) and apply StartVisitTypeId
30
* and VisitAttribute on the attributes in one TypeId. At the end of each TypeId
31
* EndVisitTypeId is called.
32
*/
33
void
Iterate
();
34
35
private
:
36
/**
37
* \brief Begin the analysis of a TypeId
38
* \param name TypeId name
39
*/
40
virtual
void
StartVisitTypeId
(std::string name);
41
/**
42
* \brief End the analysis of a TypeId
43
*/
44
virtual
void
EndVisitTypeId
();
45
/**
46
* \brief Visit an Attribute
47
* \param tid the TypeId the attribute belongs to
48
* \param name the Attribute name
49
* \param defaultValue the attribute default value
50
* \param index the index of the Attribute
51
*/
52
virtual
void
VisitAttribute
(
TypeId
tid,
53
std::string name,
54
std::string defaultValue,
55
uint32_t
index);
56
/**
57
* \brief Visit an Attribute
58
* \param name the Attribute name
59
* \param defaultValue the attribute default value
60
*/
61
virtual
void
DoVisitAttribute
(std::string name, std::string defaultValue);
62
};
63
64
}
// namespace ns3
65
66
#endif
/* ATTRIBUTE_DEFAULT_ITERATOR_H */
ns3::AttributeDefaultIterator
Iterator to iterate on the default values of attributes of an ns3::Object.
Definition
attribute-default-iterator.h:24
ns3::AttributeDefaultIterator::~AttributeDefaultIterator
virtual ~AttributeDefaultIterator()=0
Definition
attribute-default-iterator.cc:20
ns3::AttributeDefaultIterator::VisitAttribute
virtual void VisitAttribute(TypeId tid, std::string name, std::string defaultValue, uint32_t index)
Visit an Attribute.
Definition
attribute-default-iterator.cc:114
ns3::AttributeDefaultIterator::EndVisitTypeId
virtual void EndVisitTypeId()
End the analysis of a TypeId.
Definition
attribute-default-iterator.cc:104
ns3::AttributeDefaultIterator::Iterate
void Iterate()
This function will go through all the TypeIds and get only the attributes which are explicit values (...
Definition
attribute-default-iterator.cc:25
ns3::AttributeDefaultIterator::DoVisitAttribute
virtual void DoVisitAttribute(std::string name, std::string defaultValue)
Visit an Attribute.
Definition
attribute-default-iterator.cc:109
ns3::AttributeDefaultIterator::StartVisitTypeId
virtual void StartVisitTypeId(std::string name)
Begin the analysis of a TypeId.
Definition
attribute-default-iterator.cc:99
ns3::TypeId
a unique identifier for an interface.
Definition
type-id.h:48
uint32_t
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
src
config-store
model
attribute-default-iterator.h
Generated on Fri Nov 8 2024 13:58:59 for ns-3 by
1.11.0