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

AttributeValue implementation for Enum More...

+ Collaboration diagram for Enum Attribute:

Files

file  enum.h
 ns3::EnumValue attribute value declarations.
 

Classes

class  ns3::EnumChecker< T >
 AttributeChecker implementation for EnumValue. More...
 
class  ns3::EnumValue< T >
 Hold variables of type enum. More...
 

Functions

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

Detailed Description

AttributeValue implementation for Enum

Function Documentation

◆ MakeEnumAccessor() [1/2]

template<typename T , typename T1 >
Ptr< const AttributeAccessor > ns3::MakeEnumAccessor ( 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 221 of file enum.h.

References ns3::MakeAccessorHelper().

Referenced by AttributeObjectTest::GetTypeId(), ns3::Building::GetTypeId(), ns3::ConfigStore::GetTypeId(), ns3::CsmaNetDevice::GetTypeId(), ns3::EhtConfiguration::GetTypeId(), ns3::EmlsrManager::GetTypeId(), ns3::energy::GenericBatteryModel::GetTypeId(), ns3::FcfsWifiQueueScheduler::GetTypeId(), ns3::FdNetDevice::GetTypeId(), ns3::FfMacScheduler::GetTypeId(), ns3::GridBuildingAllocator::GetTypeId(), ns3::GridPositionAllocator::GetTypeId(), ns3::HybridBuildingsPropagationLossModel::GetTypeId(), ns3::ItuR1411NlosOverRooftopPropagationLossModel::GetTypeId(), ns3::lrwpan::LrWpanNetDevice::GetTypeId(), ns3::LteAmc::GetTypeId(), ns3::LteEnbRrc::GetTypeId(), ns3::LteSimpleHelper::GetTypeId(), ns3::MultiUserScheduler::GetTypeId(), ns3::OkumuraHataPropagationLossModel::GetTypeId(), ns3::olsr::RoutingProtocol::GetTypeId(), ns3::Ping::GetTypeId(), ns3::ProbabilisticV2vHighwayChannelConditionModel::GetTypeId(), ns3::ProbabilisticV2vUrbanChannelConditionModel::GetTypeId(), ns3::RandomWalk2dMobilityModel::GetTypeId(), ns3::RandomWalk2dOutdoorMobilityModel::GetTypeId(), ns3::RateErrorModel::GetTypeId(), ns3::RealtimeSimulatorImpl::GetTypeId(), ns3::Rip::GetTypeId(), ns3::RipNg::GetTypeId(), ns3::TapBridge::GetTypeId(), ns3::TcpCubic::GetTypeId(), ns3::TcpLedbat::GetTypeId(), ns3::TcpSocketBase::GetTypeId(), ns3::TcpWestwoodPlus::GetTypeId(), ns3::TvSpectrumTransmitter::GetTypeId(), ns3::Txop::GetTypeId(), ns3::WifiDefaultAckManager::GetTypeId(), ns3::WifiRemoteStationManager::GetTypeId(), ns3::WimaxConnection::GetTypeId(), and TestMultiUserScheduler::GetTypeId().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ MakeEnumAccessor() [2/2]

template<typename T , typename T1 , typename T2 >
Ptr< const AttributeAccessor > ns3::MakeEnumAccessor ( 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 228 of file enum.h.

References ns3::MakeAccessorHelper().

+ Here is the call graph for this function: