54 IntegerChecker (int64_t minValue, int64_t maxValue, std::string name)
55 : m_minValue (minValue),
56 m_maxValue (maxValue),
67 return v->
Get () >= m_minValue && v->
Get () <= m_maxValue;
69 virtual std::string GetValueTypeName (
void)
const
72 return "ns3::IntegerValue";
74 virtual bool HasUnderlyingTypeInformation (
void)
const
79 virtual std::string GetUnderlyingTypeInformation (
void)
const
82 std::ostringstream oss;
83 oss << m_name <<
" " << m_minValue <<
":" << m_maxValue;
89 return ns3::Create<IntegerValue> ();
96 if (source == 0 || destination == 0)
100 *destination = *source;
Represent the type of an attribute.
Hold a value for an Attribute.
AttributeChecker implementation for IntegerValue.
Hold a signed integer type.
Smart pointer class similar to boost::intrusive_ptr.
NS_FATAL_x macro definitions.
Ptr< const AttributeChecker > MakeIntegerChecker(int64_t min, int64_t max, std::string name)
Make an Integer 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.
ns3::IntegerValue attribute value declarations and template implementations.
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.