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
double.h
Go to the documentation of this file.
1
/*
2
* Copyright (c) 2008 INRIA
3
*
4
* This program is free software; you can redistribute it and/or modify
5
* it under the terms of the GNU General Public License version 2 as
6
* published by the Free Software Foundation;
7
*
8
* This program is distributed in the hope that it will be useful,
9
* but WITHOUT ANY WARRANTY; without even the implied warranty of
10
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11
* GNU General Public License for more details.
12
*
13
* You should have received a copy of the GNU General Public License
14
* along with this program; if not, write to the Free Software
15
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16
*
17
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
18
*/
19
#ifndef NS_DOUBLE_H
20
#define NS_DOUBLE_H
21
22
#include "
attribute-helper.h
"
23
#include "
attribute.h
"
24
25
#include <limits>
26
#include <stdint.h>
27
34
namespace
ns3
35
{
36
37
// Additional docs for class DoubleValue:
42
ATTRIBUTE_VALUE_DEFINE_WITH_NAME
(
double
,
Double
);
43
ATTRIBUTE_ACCESSOR_DEFINE
(
Double
);
44
45
template
<
typename
T>
46
Ptr<const AttributeChecker>
MakeDoubleChecker
();
47
57
template
<
typename
T>
58
Ptr<const AttributeChecker>
MakeDoubleChecker
(
double
min
);
59
70
template
<
typename
T>
71
Ptr<const AttributeChecker>
MakeDoubleChecker
(
double
min
,
double
max
);
72
73
}
// namespace ns3
74
75
/***************************************************************
76
* Implementation of the templates declared above.
77
***************************************************************/
78
79
#include "
type-name.h
"
80
81
namespace
ns3
82
{
83
84
namespace
internal
85
{
86
87
Ptr<const AttributeChecker>
MakeDoubleChecker
(
double
min
,
double
max
, std::string name);
88
89
}
// namespace internal
90
91
template
<
typename
T>
92
Ptr<const AttributeChecker>
93
MakeDoubleChecker
()
94
{
95
return
internal::MakeDoubleChecker
(-
std::numeric_limits<T>::max
(),
96
std::numeric_limits<T>::max
(),
97
TypeNameGet<T>());
98
}
99
100
template
<
typename
T>
101
Ptr<const AttributeChecker>
102
MakeDoubleChecker
(
double
min
)
103
{
104
return
internal::MakeDoubleChecker
(
min
,
std::numeric_limits<T>::max
(), TypeNameGet<T>());
105
}
106
107
template
<
typename
T>
108
Ptr<const AttributeChecker>
109
MakeDoubleChecker
(
double
min
,
double
max
)
110
{
111
return
internal::MakeDoubleChecker
(
min
,
max
, TypeNameGet<T>());
112
}
113
114
}
// namespace ns3
115
116
#endif
/* NS_DOUBLE_H */
min
#define min(a, b)
Definition:
80211b.c:41
max
#define max(a, b)
Definition:
80211b.c:42
attribute-helper.h
Attribute helper (ATTRIBUTE_ )macros definition.
attribute.h
ns3::AttributeValue, ns3::AttributeAccessor and ns3::AttributeChecker declarations.
ns3::Ptr
Smart pointer class similar to boost::intrusive_ptr.
Definition:
ptr.h:77
ATTRIBUTE_VALUE_DEFINE_WITH_NAME
#define ATTRIBUTE_VALUE_DEFINE_WITH_NAME(type, name)
Declare the attribute value class nameValue for underlying class type.
Definition:
attribute-helper.h:203
ATTRIBUTE_ACCESSOR_DEFINE
#define ATTRIBUTE_ACCESSOR_DEFINE(type)
Define the attribute accessor functions MakeTypeAccessor for class type.
Definition:
attribute-helper.h:174
ns3::TracedValueCallback::Double
void(* Double)(double oldValue, double newValue)
TracedValue Callback signature for POD.
Definition:
traced-value.h:91
ns3::internal::MakeDoubleChecker
Ptr< const AttributeChecker > MakeDoubleChecker(double min, double max, std::string name)
Make a Double attribute checker with embedded numeric type name.
Definition:
double.cc:53
ns3
Every class exported by the ns3 library is enclosed in the ns3 namespace.
ns3::MakeDoubleChecker
Ptr< const AttributeChecker > MakeDoubleChecker()
Definition:
double.h:93
type-name.h
ns3::TypeNameGet() function declarations.
src
core
model
double.h
Generated on Sun Mar 3 2024 17:10:55 for ns-3 by
1.9.1