A Discrete-Event Network Simulator
Home
Tutorials ▼
English
Portuguese
Docs ▼
Wiki
Manual
Models
Develop ▼
API
Bugs
API
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
double.h
Go to the documentation of this file.
1
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
2
/*
3
* Copyright (c) 2008 INRIA
4
*
5
* This program is free software; you can redistribute it and/or modify
6
* it under the terms of the GNU General Public License version 2 as
7
* published by the Free Software Foundation;
8
*
9
* This program is distributed in the hope that it will be useful,
10
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
* GNU General Public License for more details.
13
*
14
* You should have received a copy of the GNU General Public License
15
* along with this program; if not, write to the Free Software
16
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17
*
18
* Authors: Mathieu Lacage <mathieu.lacage@sophia.inria.fr>
19
*/
20
#ifndef NS_DOUBLE_H
21
#define NS_DOUBLE_H
22
23
#include "
attribute.h
"
24
#include "
attribute-helper.h
"
25
#include <stdint.h>
26
#include <limits>
27
28
namespace
ns3 {
29
41
ATTRIBUTE_VALUE_DEFINE_WITH_NAME
(
double
, Double);
42
ATTRIBUTE_ACCESSOR_DEFINE
(Double);
43
44
template
<
typename
T>
45
Ptr<const AttributeChecker>
MakeDoubleChecker
(
void
);
46
47
template
<
typename
T>
48
Ptr<const AttributeChecker>
MakeDoubleChecker
(
double
min);
49
50
template
<
typename
T>
51
Ptr<const AttributeChecker>
MakeDoubleChecker
(
double
min,
double
max);
52
53
54
}
// namespace ns3
55
56
#include "
type-name.h
"
57
58
namespace
ns3 {
59
60
namespace
internal {
61
62
Ptr<const AttributeChecker>
MakeDoubleChecker
(
double
min,
double
max, std::string name);
63
64
}
// namespace internal
65
66
template
<
typename
T>
67
Ptr<const AttributeChecker>
MakeDoubleChecker
(
void
)
68
{
69
return
internal::MakeDoubleChecker
(-std::numeric_limits<T>::max (),
70
std::numeric_limits<T>::max (),
71
TypeNameGet<T> ());
72
}
73
74
template
<
typename
T>
75
Ptr<const AttributeChecker>
MakeDoubleChecker
(
double
min)
76
{
77
return
internal::MakeDoubleChecker
(min,
78
std::numeric_limits<T>::max (),
79
TypeNameGet<T> ());
80
}
81
82
template
<
typename
T>
83
Ptr<const AttributeChecker>
MakeDoubleChecker
(
double
min,
double
max)
84
{
85
return
internal::MakeDoubleChecker
(min,
86
max,
87
TypeNameGet<T> ());
88
}
89
90
}
// namespace ns3
91
92
#endif
/* NS_DOUBLE_H */
ns3::Ptr
smart pointer class similar to boost::intrusive_ptr
Definition:
ptr.h:59
type-name.h
attribute.h
ns3::ATTRIBUTE_ACCESSOR_DEFINE
ATTRIBUTE_ACCESSOR_DEFINE(Boolean)
ns3::MakeDoubleChecker
Ptr< const AttributeChecker > MakeDoubleChecker(void)
Definition:
double.h:67
attribute-helper.h
ATTRIBUTE_VALUE_DEFINE_WITH_NAME
#define ATTRIBUTE_VALUE_DEFINE_WITH_NAME(type, name)
Definition:
attribute-helper.h:125
ns3::internal::MakeDoubleChecker
Ptr< const AttributeChecker > MakeDoubleChecker(double min, double max, std::string name)
Definition:
double.cc:33
src
core
model
double.h
Generated on Sat Apr 19 2014 14:06:51 for ns-3 by
1.8.6