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
* This program is free software; you can redistribute it and/or modify
3
* it under the terms of the GNU General Public License version 2 as
4
* published by the Free Software Foundation;
5
*
6
* This program is distributed in the hope that it will be useful,
7
* but WITHOUT ANY WARRANTY; without even the implied warranty of
8
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9
* GNU General Public License for more details.
10
*
11
* You should have received a copy of the GNU General Public License
12
* along with this program; if not, write to the Free Software
13
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
14
*
15
* Authors: Faker Moatamri <faker.moatamri@sophia.inria.fr>
16
* Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
17
*/
18
19
#ifndef ATTRIBUTE_DEFAULT_ITERATOR_H
20
#define ATTRIBUTE_DEFAULT_ITERATOR_H
21
22
#include "ns3/type-id.h"
23
24
#include <string>
25
26
namespace
ns3
27
{
28
29
/**
30
* \ingroup configstore
31
*
32
* \brief Iterator to iterate on the default values of attributes of an ns3::Object
33
*/
34
class
AttributeDefaultIterator
35
{
36
public
:
37
virtual
~AttributeDefaultIterator
() = 0;
38
/**
39
* \brief This function will go through all the TypeIds and get only the attributes which are
40
* explicit values (not vectors or pointer or arrays) and apply StartVisitTypeId
41
* and VisitAttribute on the attributes in one TypeId. At the end of each TypeId
42
* EndVisitTypeId is called.
43
*/
44
void
Iterate
();
45
46
private
:
47
/**
48
* \brief Begin the analysis of a TypeId
49
* \param name TypeId name
50
*/
51
virtual
void
StartVisitTypeId
(std::string name);
52
/**
53
* \brief End the analysis of a TypeId
54
*/
55
virtual
void
EndVisitTypeId
();
56
/**
57
* \brief Visit an Attribute
58
* \param tid the TypeId the attribute belongs to
59
* \param name the Attribute name
60
* \param defaultValue the attribute default value
61
* \param index the index of the Attribute
62
*/
63
virtual
void
VisitAttribute
(
TypeId
tid,
64
std::string name,
65
std::string defaultValue,
66
uint32_t
index);
67
/**
68
* \brief Visit an Attribute
69
* \param name the Attribute name
70
* \param defaultValue the attribute default value
71
*/
72
virtual
void
DoVisitAttribute
(std::string name, std::string defaultValue);
73
};
74
75
}
// namespace ns3
76
77
#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:35
ns3::AttributeDefaultIterator::~AttributeDefaultIterator
virtual ~AttributeDefaultIterator()=0
Definition:
attribute-default-iterator.cc:31
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:125
ns3::AttributeDefaultIterator::EndVisitTypeId
virtual void EndVisitTypeId()
End the analysis of a TypeId.
Definition:
attribute-default-iterator.cc:115
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:36
ns3::AttributeDefaultIterator::DoVisitAttribute
virtual void DoVisitAttribute(std::string name, std::string defaultValue)
Visit an Attribute.
Definition:
attribute-default-iterator.cc:120
ns3::AttributeDefaultIterator::StartVisitTypeId
virtual void StartVisitTypeId(std::string name)
Begin the analysis of a TypeId.
Definition:
attribute-default-iterator.cc:110
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
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 Tue May 28 2024 23:34:20 for ns-3 by
1.9.6