55 Checker (
double minValue,
double maxValue, std::string name)
56 : m_minValue (minValue),
57 m_maxValue (maxValue),
66 return v->
Get () >= m_minValue && v->
Get () <= m_maxValue;
68 virtual std::string GetValueTypeName (
void)
const {
70 return "ns3::DoubleValue";
72 virtual bool HasUnderlyingTypeInformation (
void)
const {
76 virtual std::string GetUnderlyingTypeInformation (
void)
const {
78 std::ostringstream oss;
79 oss << m_name <<
" " << m_minValue <<
":" << m_maxValue;
84 return ns3::Create<DoubleValue> ();
90 if (src == 0 || dst == 0)
100 } *checker =
new Checker (
min,
max, name);
ns3::DoubleValue attribute value declarations and template implementations.
Represent the type of an attribute.
Smart pointer class similar to boost::intrusive_ptr.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by "...
Hold a value for an Attribute.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION_NOARGS()
Output the name of the function.
Ptr< const AttributeChecker > MakeDoubleChecker(double min, double max, std::string name)
Make a Double attribute checker with embedded numeric type name.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< T > Create(void)
Create class instances by constructors with varying numbers of arguments and return them by Ptr...
void(* Double)(double oldValue, double newValue)
TracedValue Callback signature for POD.
ns3::Object class declaration, which is the root of the Object hierarchy and Aggregation.
#define ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME(type, name)
Define the class methods belonging to the attribute value class nameValue of the underlying class typ...
This class can be used to hold variables of floating point type such as 'double' or 'float'...
Ptr< T > Copy(Ptr< T > object)
Return a deep copy of a Ptr.