55 Checker (
double minValue,
double maxValue, std::string name)
56 : m_minValue (minValue),
57 m_maxValue (maxValue),
68 return v->
Get () >= m_minValue && v->
Get () <= m_maxValue;
70 virtual std::string GetValueTypeName (
void)
const
73 return "ns3::DoubleValue";
75 virtual bool HasUnderlyingTypeInformation (
void)
const
80 virtual std::string GetUnderlyingTypeInformation (
void)
const
83 std::ostringstream oss;
84 oss << m_name <<
" " << m_minValue <<
":" << m_maxValue;
90 return ns3::Create<DoubleValue> ();
97 if (src == 0 || dst == 0)
107 } *checker =
new Checker (
min,
max, name);
Represent the type of an attribute.
Hold a value for an Attribute.
This class can be used to hold variables of floating point type such as 'double' or 'float'.
Smart pointer class similar to boost::intrusive_ptr.
ns3::DoubleValue attribute value declarations and template implementations.
Ptr< const AttributeChecker > MakeDoubleChecker(double min, double max, std::string name)
Make a Double attribute checker with embedded numeric type name.
#define ATTRIBUTE_VALUE_IMPLEMENT_WITH_NAME(type, name)
Define the class methods belonging to the attribute value class nameValue of the underlying class typ...
#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.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
Ptr< T > Create(Ts &&... args)
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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
Ptr< T > Copy(Ptr< T > object)
Return a deep copy of a Ptr.
ns3::Object class declaration, which is the root of the Object hierarchy and Aggregation.