58 Checker(uint64_t minValue, uint64_t maxValue, std::string name)
59 : m_minValue(minValue),
73 return v->
Get() >= m_minValue && v->Get() <= m_maxValue;
76 std::string GetValueTypeName()
const override
79 return "ns3::UintegerValue";
82 bool HasUnderlyingTypeInformation()
const override
88 std::string GetUnderlyingTypeInformation()
const override
91 std::ostringstream oss;
92 oss << m_name <<
" " << m_minValue <<
":" << m_maxValue;
99 return ns3::Create<UintegerValue>();
105 const auto src =
dynamic_cast<const UintegerValue*
>(&source);
107 if (src ==
nullptr || dst ==
nullptr)
118 }* 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.
#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.
Ptr< const AttributeChecker > MakeUintegerChecker(uint64_t min, uint64_t max, std::string name)
Make an Uinteger attribute checker with embedded numeric type name.
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::UintegerValue attribute value declarations and template implementations.