A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
Ipv4Address Attribute

AttributeValue implementation for Ipv4Address More...

+ Collaboration diagram for Ipv4Address Attribute:

Classes

class  ns3::Ipv4AddressChecker
 AttributeChecker implementation for Ipv4AddressValue. More...
 
class  ns3::Ipv4AddressValue
 AttributeValue implementation for Ipv4Address. More...
 

Functions

template<typename T1 >
Ptr< const AttributeAccessorns3::MakeIpv4AddressAccessor (T1 a1)
 Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
 
template<typename T1 , typename T2 >
Ptr< const AttributeAccessorns3::MakeIpv4AddressAccessor (T1 a1, T2 a2)
 Create an AttributeAccessor using a pair of get functor and set methods from a class.
 
Ptr< const AttributeCheckerns3::MakeIpv4AddressChecker ()
 

Detailed Description

AttributeValue implementation for Ipv4Address

See also
ns3::Ipv4Address

Function Documentation

◆ MakeIpv4AddressAccessor() [1/2]

template<typename T1 >
Ptr< const AttributeAccessor > ns3::MakeIpv4AddressAccessor ( T1 a1)

Create an AttributeAccessor for a class data member, or a lone class get functor or set method.

The get functor method should have a signature like

typedef U (T::*getter)() const

where T is the class and U is the type of the return value.

The set method should have one of these signatures:

typedef void (T::*setter)(U)
typedef bool (T::*setter)(U)

where T is the class and U is the type of the value to set the attribute to, which should be compatible with the specific AttributeValue type V which holds the value (or the type implied by the name Make<V>Accessor of this function.) In the case of a setter returning bool, the return value should be true if the value could be set successfully.

Template Parameters
V[explicit] (If present) The specific AttributeValue type to use to represent the Attribute. (If not present, the type V is implicit in the name of this function, as "Make<V>Accessor"
T1[deduced] The type of the class data member, or the type of the class get functor or set method.
Parameters
[in]a1The address of the data member, or the get or set method.
Returns
The AttributeAccessor
See also
AttributeAccessor

Definition at line 330 of file ipv4-address.h.

Referenced by EpsBearerTagUdpClient::GetTypeId(), ns3::DhcpServer::GetTypeId(), ns3::TapBridge::GetTypeId(), ns3::V4TraceRoute::GetTypeId(), and Sender::GetTypeId().

+ Here is the caller graph for this function:

◆ MakeIpv4AddressAccessor() [2/2]

template<typename T1 , typename T2 >
Ptr< const AttributeAccessor > ns3::MakeIpv4AddressAccessor ( T1 a1,
T2 a2 )

Create an AttributeAccessor using a pair of get functor and set methods from a class.

The get functor method should have a signature like

typedef U (T::*getter)() const

where T is the class and U is the type of the return value.

The set method should have one of these signatures:

typedef void (T::*setter)(U)
typedef bool (T::*setter)(U)

where T is the class and U is the type of the value to set the attribute to, which should be compatible with the specific AttributeValue type V which holds the value (or the type implied by the name Make<V>Accessor of this function.) In the case of a setter returning bool, the return value should be true if the value could be set successfully.

In practice the setter and getter arguments can appear in either order, but setter first is preferred.

Template Parameters
V[explicit] (If present) The specific AttributeValue type to use to represent the Attribute. (If not present, the type V is implicit in the name of this function as "Make<V>Accessor"
T1[deduced] The type of the class data member, or the type of the class get functor or set method.
T2[deduced] The type of the getter class functor method.
Parameters
[in]a2The address of the class method to set the attribute.
[in]a1The address of the data member, or the get or set method.
Returns
The AttributeAccessor
See also
AttributeAccessor

Definition at line 330 of file ipv4-address.h.

◆ MakeIpv4AddressChecker()

Ptr< const AttributeChecker > ns3::MakeIpv4AddressChecker ( )
Returns
The AttributeChecker.
See also
AttributeChecker

Definition at line 429 of file ipv4-address.cc.

Referenced by EpsBearerTagUdpClient::GetTypeId(), ns3::DhcpServer::GetTypeId(), ns3::TapBridge::GetTypeId(), ns3::V4TraceRoute::GetTypeId(), and Sender::GetTypeId().

+ Here is the caller graph for this function: