A Discrete-Event Network Simulator
QKDNetSim v2.0 (NS-3 v3.41) @ (+)
Home
Tutorials ▼
English
Documentation ▼
Installation
Manual
Models
Contributing
Wiki
Development ▼
API Docs
Issue Tracker
Merge Requests
API
Main Page
Related Pages
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
y
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
Enumerator
a
b
c
d
e
f
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
:
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
Enumerator
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Properties
Related Functions
:
a
b
c
d
e
g
h
i
j
l
m
n
o
p
q
r
s
t
u
w
Files
File List
File Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
u
v
w
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
c
e
i
l
o
r
s
t
v
Macros
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
r
s
t
u
v
w
Examples
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Modules
Pages
model-typeid-creator.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
* Author: Moatamri Faker <faker.moatamri@sophia.inria.fr>
16
*/
17
18
#include "
attribute-default-iterator.h
"
19
20
#include "ns3/type-id.h"
21
22
#include <gtk/gtk.h>
23
#include <vector>
24
25
namespace
ns3
26
{
27
28
enum
29
{
30
COL_TYPEID
= 0,
31
COL_LASTID
32
};
33
38
struct
ModelTypeid
39
{
43
enum
44
{
45
// store TypeId + attribute name +defaultValue and index
46
NODE_ATTRIBUTE
,
47
// store TypeId
48
NODE_TYPEID
49
}
type
;
50
52
std::string
name
;
54
std::string
defaultValue
;
56
TypeId
tid
;
58
uint32_t
index
;
59
};
60
65
class
ModelTypeidCreator
:
public
AttributeDefaultIterator
66
{
67
public
:
68
ModelTypeidCreator
();
75
void
Build
(GtkTreeStore* treestore);
76
77
private
:
85
void
VisitAttribute
(
TypeId
tid,
86
std::string name,
87
std::string defaultValue,
88
uint32_t index)
override
;
93
void
StartVisitTypeId
(std::string name)
override
;
97
void
EndVisitTypeId
()
override
;
102
void
Add
(
ModelTypeid
* node);
106
void
Remove
();
108
GtkTreeStore*
m_treestore
;
110
std::vector<GtkTreeIter*>
m_iters
;
111
};
112
}
// namespace ns3
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::ModelTypeidCreator
ModelTypeIdCreator class.
Definition:
model-typeid-creator.h:66
ns3::ModelTypeidCreator::EndVisitTypeId
void EndVisitTypeId() override
Remove the last gtk tree iterator.
Definition:
model-typeid-creator.cc:81
ns3::ModelTypeidCreator::StartVisitTypeId
void StartVisitTypeId(std::string name) override
Add a node for the new TypeId object.
Definition:
model-typeid-creator.cc:72
ns3::ModelTypeidCreator::m_iters
std::vector< GtkTreeIter * > m_iters
This contains a vector of iterators used to build the TreeStore.
Definition:
model-typeid-creator.h:110
ns3::ModelTypeidCreator::VisitAttribute
void VisitAttribute(TypeId tid, std::string name, std::string defaultValue, uint32_t index) override
This method will add a ModelTypeid to the GtkTreeIterator.
Definition:
model-typeid-creator.cc:56
ns3::ModelTypeidCreator::Build
void Build(GtkTreeStore *treestore)
This method will iterate on typeIds having default attributes and create a model for them,...
Definition:
model-typeid-creator.cc:29
ns3::ModelTypeidCreator::ModelTypeidCreator
ModelTypeidCreator()
Definition:
model-typeid-creator.cc:23
ns3::ModelTypeidCreator::Add
void Add(ModelTypeid *node)
Adds a treestore iterator to m_treestore model.
Definition:
model-typeid-creator.cc:38
ns3::ModelTypeidCreator::m_treestore
GtkTreeStore * m_treestore
this is the TreeStore model corresponding to the view
Definition:
model-typeid-creator.h:108
ns3::ModelTypeidCreator::Remove
void Remove()
Removes the last GtkTreeIterator from m_iters.
Definition:
model-typeid-creator.cc:48
ns3::TypeId
a unique identifier for an interface.
Definition:
type-id.h:59
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::COL_TYPEID
@ COL_TYPEID
Definition:
model-typeid-creator.h:30
ns3::COL_LASTID
@ COL_LASTID
Definition:
model-typeid-creator.h:31
ns3::ModelTypeid
A class used in the implementation of the GtkConfigStore.
Definition:
model-typeid-creator.h:39
ns3::ModelTypeid::index
uint32_t index
stores the index of the attribute in list of attributes for a given TypeId
Definition:
model-typeid-creator.h:58
ns3::ModelTypeid::tid
TypeId tid
The TypeId object and if it is an attribute, it's the TypeId object of the attribute.
Definition:
model-typeid-creator.h:56
ns3::ModelTypeid::NODE_TYPEID
@ NODE_TYPEID
Definition:
model-typeid-creator.h:48
ns3::ModelTypeid::NODE_ATTRIBUTE
@ NODE_ATTRIBUTE
Definition:
model-typeid-creator.h:46
ns3::ModelTypeid::defaultValue
std::string defaultValue
TypeId default value.
Definition:
model-typeid-creator.h:54
ns3::ModelTypeid::type
enum ns3::ModelTypeid::@5 type
Whether the node represents an attribute or TypeId.
ns3::ModelTypeid::name
std::string name
TypeId name.
Definition:
model-typeid-creator.h:52
src
config-store
model
model-typeid-creator.h
Generated on Sun Mar 3 2024 17:10:55 for ns-3 by
1.9.1