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

AttributeValue implementation for Pointer. More...

+ Collaboration diagram for Pointer Attribute:

Files

file  pointer.cc
 ns3::PointerValue attribute value implementations.
 
file  pointer.h
 ns3::PointerValue attribute value declarations and template implementations.
 

Classes

class  ns3::PointerChecker
 AttributeChecker implementation for PointerValue. More...
 
class  ns3::internal::PointerChecker< T >
 PointerChecker implementation. More...
 
class  ns3::PointerValue
 AttributeValue implementation for Pointer. More...
 

Functions

template<typename T1 >
Ptr< const AttributeAccessorns3::MakePointerAccessor (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::MakePointerAccessor (T1 a1, T2 a2)
 Create an AttributeAccessor using a pair of get functor and set methods from a class.
 
template<typename T >
Ptr< AttributeCheckerns3::MakePointerChecker ()
 Create a PointerChecker for a type.
 

Detailed Description

AttributeValue implementation for Pointer.

Hold objects of type Ptr<T>.

Function Documentation

◆ MakePointerAccessor() [1/2]

template<typename T1 >
Ptr< const AttributeAccessor > ns3::MakePointerAccessor ( 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 248 of file pointer.h.

Referenced by anonymous_namespace{test-string-value-formatting.cc}::FormattingTestObject::GetTypeId(), AttributeObjectTest::GetTypeId(), ns3::AlohaNoackNetDevice::GetTypeId(), ns3::aodv::RoutingProtocol::GetTypeId(), ns3::ApWifiMac::GetTypeId(), ns3::ArpL3Protocol::GetTypeId(), ns3::BaseStationNetDevice::GetTypeId(), ns3::BurstErrorModel::GetTypeId(), ns3::ComponentCarrierEnb::GetTypeId(), ns3::ComponentCarrierUe::GetTypeId(), ns3::CsmaNetDevice::GetTypeId(), ns3::DhcpClient::GetTypeId(), ns3::dsr::DsrRouting::GetTypeId(), ns3::energy::BasicEnergyHarvester::GetTypeId(), ns3::GaussMarkovMobilityModel::GetTypeId(), ns3::HierarchicalMobilityModel::GetTypeId(), ns3::Icmpv6L4Protocol::GetTypeId(), ns3::Ipv4Interface::GetTypeId(), ns3::lrwpan::LrWpanNetDevice::GetTypeId(), ns3::lrwpan::LrWpanPhy::GetTypeId(), ns3::LteDataRadioBearerInfo::GetTypeId(), ns3::LteEnbNetDevice::GetTypeId(), ns3::LteEnbPhy::GetTypeId(), ns3::LteSignalingRadioBearerInfo::GetTypeId(), ns3::LteUeNetDevice::GetTypeId(), ns3::LteUePhy::GetTypeId(), ns3::LteUeRrc::GetTypeId(), ns3::MeshPointDevice::GetTypeId(), ns3::NakagamiPropagationLossModel::GetTypeId(), ns3::NonCommunicatingNetDevice::GetTypeId(), ns3::OnOffApplication::GetTypeId(), ns3::OutdoorPositionAllocator::GetTypeId(), ns3::PhasedArrayModel::GetTypeId(), ns3::PointToPointNetDevice::GetTypeId(), ns3::QosTxop::GetTypeId(), ns3::QueueDiscClass::GetTypeId(), ns3::RadioEnvironmentMapHelper::GetTypeId(), ns3::Radvd::GetTypeId(), ns3::RandomBoxPositionAllocator::GetTypeId(), ns3::RandomDirection2dMobilityModel::GetTypeId(), ns3::RandomDiscPositionAllocator::GetTypeId(), ns3::RandomPropagationDelayModel::GetTypeId(), ns3::RandomPropagationLossModel::GetTypeId(), ns3::RandomRectanglePositionAllocator::GetTypeId(), ns3::RandomWalk2dMobilityModel::GetTypeId(), ns3::RandomWalk2dOutdoorMobilityModel::GetTypeId(), ns3::RandomWaypointMobilityModel::GetTypeId(), ns3::RateErrorModel::GetTypeId(), ns3::SequentialRandomVariable::GetTypeId(), ns3::SimpleNetDevice::GetTypeId(), ns3::SixLowPanNetDevice::GetTypeId(), ns3::SpectrumChannel::GetTypeId(), ns3::StaWifiMac::GetTypeId(), ns3::SubscriberStationNetDevice::GetTypeId(), ns3::TableBasedErrorRateModel::GetTypeId(), ns3::TcpSocketBase::GetTypeId(), ns3::tests::ConfigTestObject::GetTypeId(), ns3::ThreeGppChannelModel::GetTypeId(), ns3::ThreeGppHttpClient::GetTypeId(), ns3::ThreeGppHttpServer::GetTypeId(), ns3::ThreeGppPropagationLossModel::GetTypeId(), ns3::ThreeGppSpectrumPropagationLossModel::GetTypeId(), ns3::TvSpectrumTransmitter::GetTypeId(), ns3::TwoRaySpectrumPropagationLossModel::GetTypeId(), ns3::Txop::GetTypeId(), ns3::UanChannel::GetTypeId(), ns3::UanNetDevice::GetTypeId(), ns3::UanPhyDual::GetTypeId(), ns3::UanPhyGen::GetTypeId(), ns3::UeManager::GetTypeId(), ns3::WifiMac::GetTypeId(), ns3::WifiNetDevice::GetTypeId(), ns3::WifiPhy::GetTypeId(), ns3::WifiRadioEnergyModel::GetTypeId(), ns3::WimaxConnection::GetTypeId(), ns3::WimaxNetDevice::GetTypeId(), ns3::WimaxPhy::GetTypeId(), ns3::YansWifiChannel::GetTypeId(), and Sender::GetTypeId().

◆ MakePointerAccessor() [2/2]

template<typename T1 , typename T2 >
Ptr< const AttributeAccessor > ns3::MakePointerAccessor ( 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 248 of file pointer.h.

◆ MakePointerChecker()

template<typename T >
Ptr< AttributeChecker > ns3::MakePointerChecker ( )

Create a PointerChecker for a type.

Template Parameters
T[explicit] The underlying type.
Returns
The PointerChecker.

Definition at line 269 of file pointer.h.

References ns3::Create().

Referenced by anonymous_namespace{test-string-value-formatting.cc}::FormattingTestObject::GetTypeId(), AttributeObjectTest::GetTypeId(), ns3::AlohaNoackNetDevice::GetTypeId(), ns3::aodv::RoutingProtocol::GetTypeId(), ns3::ApWifiMac::GetTypeId(), ns3::ArpL3Protocol::GetTypeId(), ns3::BaseStationNetDevice::GetTypeId(), ns3::BurstErrorModel::GetTypeId(), ns3::ComponentCarrierEnb::GetTypeId(), ns3::ComponentCarrierUe::GetTypeId(), ns3::CsmaNetDevice::GetTypeId(), ns3::DhcpClient::GetTypeId(), ns3::dsr::DsrRouting::GetTypeId(), ns3::energy::BasicEnergyHarvester::GetTypeId(), ns3::GaussMarkovMobilityModel::GetTypeId(), ns3::HierarchicalMobilityModel::GetTypeId(), ns3::Icmpv6L4Protocol::GetTypeId(), ns3::Ipv4Interface::GetTypeId(), ns3::lrwpan::LrWpanNetDevice::GetTypeId(), ns3::lrwpan::LrWpanPhy::GetTypeId(), ns3::LteDataRadioBearerInfo::GetTypeId(), ns3::LteEnbNetDevice::GetTypeId(), ns3::LteEnbPhy::GetTypeId(), ns3::LteSignalingRadioBearerInfo::GetTypeId(), ns3::LteUeNetDevice::GetTypeId(), ns3::LteUePhy::GetTypeId(), ns3::LteUeRrc::GetTypeId(), ns3::MeshPointDevice::GetTypeId(), ns3::NakagamiPropagationLossModel::GetTypeId(), ns3::NonCommunicatingNetDevice::GetTypeId(), ns3::OnOffApplication::GetTypeId(), ns3::OutdoorPositionAllocator::GetTypeId(), ns3::PhasedArrayModel::GetTypeId(), ns3::PointToPointNetDevice::GetTypeId(), ns3::QosTxop::GetTypeId(), ns3::QueueDiscClass::GetTypeId(), ns3::RadioEnvironmentMapHelper::GetTypeId(), ns3::Radvd::GetTypeId(), ns3::RandomBoxPositionAllocator::GetTypeId(), ns3::RandomDirection2dMobilityModel::GetTypeId(), ns3::RandomDiscPositionAllocator::GetTypeId(), ns3::RandomPropagationDelayModel::GetTypeId(), ns3::RandomPropagationLossModel::GetTypeId(), ns3::RandomRectanglePositionAllocator::GetTypeId(), ns3::RandomWalk2dMobilityModel::GetTypeId(), ns3::RandomWalk2dOutdoorMobilityModel::GetTypeId(), ns3::RandomWaypointMobilityModel::GetTypeId(), ns3::RateErrorModel::GetTypeId(), ns3::SequentialRandomVariable::GetTypeId(), ns3::SimpleNetDevice::GetTypeId(), ns3::SixLowPanNetDevice::GetTypeId(), ns3::SpectrumChannel::GetTypeId(), ns3::StaWifiMac::GetTypeId(), ns3::SubscriberStationNetDevice::GetTypeId(), ns3::TableBasedErrorRateModel::GetTypeId(), ns3::TcpSocketBase::GetTypeId(), ns3::tests::ConfigTestObject::GetTypeId(), ns3::ThreeGppChannelModel::GetTypeId(), ns3::ThreeGppHttpClient::GetTypeId(), ns3::ThreeGppHttpServer::GetTypeId(), ns3::ThreeGppPropagationLossModel::GetTypeId(), ns3::ThreeGppSpectrumPropagationLossModel::GetTypeId(), ns3::TvSpectrumTransmitter::GetTypeId(), ns3::TwoRaySpectrumPropagationLossModel::GetTypeId(), ns3::Txop::GetTypeId(), ns3::UanChannel::GetTypeId(), ns3::UanNetDevice::GetTypeId(), ns3::UanPhyDual::GetTypeId(), ns3::UanPhyGen::GetTypeId(), ns3::UeManager::GetTypeId(), ns3::WifiMac::GetTypeId(), ns3::WifiNetDevice::GetTypeId(), ns3::WifiPhy::GetTypeId(), ns3::WifiRadioEnergyModel::GetTypeId(), ns3::WimaxConnection::GetTypeId(), ns3::WimaxNetDevice::GetTypeId(), ns3::WimaxPhy::GetTypeId(), ns3::YansWifiChannel::GetTypeId(), and Sender::GetTypeId().

+ Here is the call graph for this function: