53 Checker (uint64_t minValue, uint64_t maxValue, std::string name)
54 : m_minValue (minValue),
55 m_maxValue (maxValue),
66 return v->
Get () >= m_minValue && v->
Get () <= m_maxValue;
68 virtual std::string GetValueTypeName (
void)
const
71 return "ns3::UintegerValue";
73 virtual bool HasUnderlyingTypeInformation (
void)
const
78 virtual std::string GetUnderlyingTypeInformation (
void)
const
81 std::ostringstream oss;
82 oss << m_name <<
" " << m_minValue <<
":" << m_maxValue;
88 return ns3::Create<UintegerValue> ();
95 if (src == 0 || dst == 0)
105 } *checker =
new Checker (
min,
max, name);
Represent the type of an attribute.
Hold a value for an Attribute.
Smart pointer class similar to boost::intrusive_ptr.
Hold an unsigned integer type.
NS_FATAL_x macro definitions.
Ptr< const AttributeChecker > MakeUintegerChecker(uint64_t min, uint64_t max, std::string name)
Make an Uinteger 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.
Every class exported by the ns3 library is enclosed in the ns3 namespace.
double max(double x, double y)
double min(double x, double y)
Ptr< T > Copy(Ptr< T > object)
Return a deep copy of a Ptr.
ns3::UintegerValue attribute value declarations and template implementations.