A Discrete-Event Network Simulator
API
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Pointer Attribute

Attribute implementation for Pointer. More...

+ Collaboration diagram for Pointer Attribute:

Files

file  pointer.cc
 Pointer attribute value implementations.
 
file  pointer.h
 Pointer attribute value declarations and template implementations.
 

Classes

class  ns3::PointerChecker
 AttributeChecker implementation for PointerValue. More...
 
class  ns3::PointerValue
 Hold objects of type Ptr<T>. More...
 

Functions

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. More...
 
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. More...
 
template<typename T >
Ptr< AttributeChecker > ns3::MakePointerChecker (void)
 Create a PointerChecker for a type. More...
 

Detailed Description

Attribute implementation for Pointer.

Function Documentation

template<typename T1 >
ns3::Ptr< const ns3::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)(void) 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 220 of file pointer.h.

Referenced by Sender::GetTypeId(), ns3::WimaxConnection::GetTypeId(), ConfigTestObject::GetTypeId(), ns3::ApWifiMac::GetTypeId(), ns3::BasicEnergyHarvester::GetTypeId(), ns3::RandomDirection2dMobilityModel::GetTypeId(), ns3::RegularWifiMac::GetTypeId(), ns3::Icmpv6L4Protocol::GetTypeId(), ns3::RandomWalk2dMobilityModel::GetTypeId(), ns3::MeshPointDevice::GetTypeId(), ns3::Radvd::GetTypeId(), ns3::WifiNetDevice::GetTypeId(), ns3::LteEnbNetDevice::GetTypeId(), ns3::LteUeNetDevice::GetTypeId(), ns3::aodv::RoutingProtocol::GetTypeId(), ns3::ArpL3Protocol::GetTypeId(), ns3::LrWpanNetDevice::GetTypeId(), ns3::BleNetDevice::GetTypeId(), ns3::Ipv4Interface::GetTypeId(), ns3::RandomWaypointMobilityModel::GetTypeId(), ns3::UanNetDevice::GetTypeId(), ns3::LteSignalingRadioBearerInfo::GetTypeId(), ns3::NonCommunicatingNetDevice::GetTypeId(), ns3::UanChannel::GetTypeId(), ns3::SimpleNetDevice::GetTypeId(), ns3::BaseStationNetDevice::GetTypeId(), ns3::HierarchicalMobilityModel::GetTypeId(), ns3::YansWifiChannel::GetTypeId(), ns3::WimaxPhy::GetTypeId(), ns3::SubscriberStationNetDevice::GetTypeId(), ns3::CsmaNetDevice::GetTypeId(), ns3::TvSpectrumTransmitter::GetTypeId(), ns3::LteEnbPhy::GetTypeId(), ns3::YansWifiPhy::GetTypeId(), ns3::PointToPointNetDevice::GetTypeId(), ns3::DcaTxop::GetTypeId(), ns3::LteDataRadioBearerInfo::GetTypeId(), ns3::AlohaNoackNetDevice::GetTypeId(), ns3::WimaxNetDevice::GetTypeId(), ns3::LteUePhy::GetTypeId(), ns3::RandomPropagationDelayModel::GetTypeId(), ns3::GaussMarkovMobilityModel::GetTypeId(), ns3::OnOffApplication::GetTypeId(), ns3::UanPhyDual::GetTypeId(), ns3::dsr::DsrRouting::GetTypeId(), AttributeObjectTest::GetTypeId(), ns3::EdcaTxopN::GetTypeId(), ns3::UeManager::GetTypeId(), ns3::LteUeRrc::GetTypeId(), ns3::WaveNetDevice::GetTypeId(), ns3::QueueDiscClass::GetTypeId(), ns3::RandomPropagationLossModel::GetTypeId(), ns3::RateErrorModel::GetTypeId(), ns3::RandomRectanglePositionAllocator::GetTypeId(), ns3::WifiRadioEnergyModel::GetTypeId(), ns3::RandomBoxPositionAllocator::GetTypeId(), ns3::UanPhyGen::GetTypeId(), ns3::TcpSocketBase::GetTypeId(), ns3::RandomDiscPositionAllocator::GetTypeId(), ns3::BurstErrorModel::GetTypeId(), ns3::SequentialRandomVariable::GetTypeId(), and ns3::NakagamiPropagationLossModel::GetTypeId().

template<typename T1 , typename T2 >
ns3::Ptr< const ns3::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)(void) 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 220 of file pointer.h.

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

Create a PointerChecker for a type.

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

Definition at line 224 of file pointer.h.

Referenced by ns3::MeshPointDevice::GetTypeId().

+ Here is the caller graph for this function: