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

AttributeValue implementation for Boolean. More...

+ Collaboration diagram for Boolean Attribute:

Files

file  boolean.cc
 ns3::BooleanValue attribute value implementaation.
 
file  boolean.h
 ns3::BooleanValue attribute value declarations.
 

Classes

class  ns3::BooleanChecker
 AttributeChecker implementation for BooleanValue. More...
 
class  ns3::BooleanValue
 AttributeValue implementation for Boolean. More...
 

Functions

template<typename T1 >
Ptr< const AttributeAccessorns3::MakeBooleanAccessor (T1 a1)
 
template<typename T1 , typename T2 >
Ptr< const AttributeAccessorns3::MakeBooleanAccessor (T1 a1, T2 a2)
 
Ptr< const AttributeCheckerns3::MakeBooleanChecker ()
 
std::ostream & ns3::operator<< (std::ostream &os, const BooleanValue &value)
 Output streamer.
 

Detailed Description

AttributeValue implementation for Boolean.

Function Documentation

◆ MakeBooleanAccessor() [1/2]

template<typename T1 >
ns3::Ptr< const ns3::AttributeAccessor > ns3::MakeBooleanAccessor ( 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 86 of file boolean.h.

Referenced by ns3::aodv::RoutingProtocol::GetTypeId(), ns3::BulkSendApplication::GetTypeId(), ns3::OnOffApplication::GetTypeId(), ns3::PacketSink::GetTypeId(), ns3::UdpTraceClient::GetTypeId(), ns3::BridgeNetDevice::GetTypeId(), ns3::RandomBuildingPositionAllocator::GetTypeId(), ns3::ConfigStore::GetTypeId(), ns3::CalendarScheduler::GetTypeId(), ns3::RandomVariableStream::GetTypeId(), ns3::EmpiricalRandomVariable::GetTypeId(), AttributeObjectTest::GetTypeId(), ns3::CsmaNetDevice::GetTypeId(), ns3::dsdv::RoutingProtocol::GetTypeId(), ns3::dsr::DsrRouting::GetTypeId(), ns3::V4TraceRoute::GetTypeId(), ns3::Icmpv6L4Protocol::GetTypeId(), ns3::Ipv4GlobalRouting::GetTypeId(), ns3::Ipv4L3Protocol::GetTypeId(), ns3::Ipv4RawSocketImpl::GetTypeId(), ns3::Ipv4::GetTypeId(), ns3::Ipv6L3Protocol::GetTypeId(), ns3::Ipv6::GetTypeId(), ns3::TcpBic::GetTypeId(), ns3::TcpCubic::GetTypeId(), ns3::TcpDctcp::GetTypeId(), ns3::TcpSocketBase::GetTypeId(), ns3::TcpSocketState::GetTypeId(), ns3::TcpSocket::GetTypeId(), ns3::UdpSocket::GetTypeId(), ns3::LrWpanNetDevice::GetTypeId(), ns3::LteHelper::GetTypeId(), ns3::NoBackhaulEpcHelper::GetTypeId(), ns3::PointToPointEpcHelper::GetTypeId(), ns3::RadioEnvironmentMapHelper::GetTypeId(), ns3::ComponentCarrier::GetTypeId(), ns3::CqaFfMacScheduler::GetTypeId(), ns3::FdBetFfMacScheduler::GetTypeId(), ns3::FdMtFfMacScheduler::GetTypeId(), ns3::FdTbfqFfMacScheduler::GetTypeId(), ns3::LteEnbNetDevice::GetTypeId(), ns3::LteEnbRrc::GetTypeId(), ns3::LteFfrAlgorithm::GetTypeId(), ns3::LteFrSoftAlgorithm::GetTypeId(), ns3::LteRlcAm::GetTypeId(), ns3::LteRlcUm::GetTypeId(), ns3::LteSpectrumPhy::GetTypeId(), ns3::LteUePhy::GetTypeId(), ns3::LteUePowerControl::GetTypeId(), ns3::PfFfMacScheduler::GetTypeId(), ns3::PssFfMacScheduler::GetTypeId(), ns3::RrFfMacScheduler::GetTypeId(), ns3::TdBetFfMacScheduler::GetTypeId(), ns3::TdMtFfMacScheduler::GetTypeId(), ns3::TdTbfqFfMacScheduler::GetTypeId(), ns3::TtaFfMacScheduler::GetTypeId(), ns3::dot11s::HwmpProtocol::GetTypeId(), ns3::dot11s::PeerManagementProtocol::GetTypeId(), ns3::MeshWifiInterfaceMac::GetTypeId(), ns3::WaypointMobilityModel::GetTypeId(), ns3::ErrorModel::GetTypeId(), ns3::PcapFileWrapper::GetTypeId(), ns3::SimpleNetDevice::GetTypeId(), ns3::ThreeGppChannelConditionModel::GetTypeId(), ns3::ThreeGppPropagationLossModel::GetTypeId(), ns3::SixLowPanNetDevice::GetTypeId(), ns3::MockNetDevice::GetTypeId(), ns3::ThreeGppChannelModel::GetTypeId(), ns3::DataCollectionObject::GetTypeId(), ns3::TapBridge::GetTypeId(), ns3::CobaltQueueDisc::GetTypeId(), ns3::CoDelQueueDisc::GetTypeId(), ns3::FqCobaltQueueDisc::GetTypeId(), ns3::FqCoDelQueueDisc::GetTypeId(), ns3::FqPieQueueDisc::GetTypeId(), ns3::PieQueueDisc::GetTypeId(), ns3::RedQueueDisc::GetTypeId(), ns3::ApWifiMac::GetTypeId(), ns3::EhtConfiguration::GetTypeId(), ns3::MultiUserScheduler::GetTypeId(), ns3::RrMultiUserScheduler::GetTypeId(), ns3::HtConfiguration::GetTypeId(), ns3::QosFrameExchangeManager::GetTypeId(), ns3::QosTxop::GetTypeId(), ns3::AarfcdWifiManager::GetTypeId(), ns3::MinstrelHtWifiManager::GetTypeId(), ns3::MinstrelWifiManager::GetTypeId(), ns3::RraaWifiManager::GetTypeId(), ns3::RrpaaWifiManager::GetTypeId(), ns3::SpectrumWifiPhy::GetTypeId(), ns3::StaWifiMac::GetTypeId(), ns3::VhtConfiguration::GetTypeId(), ns3::WifiDefaultAckManager::GetTypeId(), ns3::WifiDefaultProtectionManager::GetTypeId(), ns3::WifiMac::GetTypeId(), and ns3::WifiPhy::GetTypeId().

◆ MakeBooleanAccessor() [2/2]

template<typename T1 , typename T2 >
ns3::Ptr< const ns3::AttributeAccessor > ns3::MakeBooleanAccessor ( 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 86 of file boolean.h.

◆ MakeBooleanChecker()

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

Definition at line 124 of file boolean.cc.

Referenced by ns3::aodv::RoutingProtocol::GetTypeId(), ns3::BulkSendApplication::GetTypeId(), ns3::OnOffApplication::GetTypeId(), ns3::PacketSink::GetTypeId(), ns3::UdpTraceClient::GetTypeId(), ns3::BridgeNetDevice::GetTypeId(), ns3::RandomBuildingPositionAllocator::GetTypeId(), ns3::ConfigStore::GetTypeId(), ns3::CalendarScheduler::GetTypeId(), ns3::RandomVariableStream::GetTypeId(), ns3::EmpiricalRandomVariable::GetTypeId(), AttributeObjectTest::GetTypeId(), ns3::CsmaNetDevice::GetTypeId(), ns3::dsdv::RoutingProtocol::GetTypeId(), ns3::dsr::DsrRouting::GetTypeId(), ns3::V4TraceRoute::GetTypeId(), ns3::Icmpv6L4Protocol::GetTypeId(), ns3::Ipv4GlobalRouting::GetTypeId(), ns3::Ipv4L3Protocol::GetTypeId(), ns3::Ipv4RawSocketImpl::GetTypeId(), ns3::Ipv4::GetTypeId(), ns3::Ipv6L3Protocol::GetTypeId(), ns3::Ipv6::GetTypeId(), ns3::TcpBic::GetTypeId(), ns3::TcpCubic::GetTypeId(), ns3::TcpDctcp::GetTypeId(), ns3::TcpSocketBase::GetTypeId(), ns3::TcpSocketState::GetTypeId(), ns3::TcpSocket::GetTypeId(), ns3::UdpSocket::GetTypeId(), ns3::LrWpanNetDevice::GetTypeId(), ns3::LteHelper::GetTypeId(), ns3::NoBackhaulEpcHelper::GetTypeId(), ns3::PointToPointEpcHelper::GetTypeId(), ns3::RadioEnvironmentMapHelper::GetTypeId(), ns3::ComponentCarrier::GetTypeId(), ns3::CqaFfMacScheduler::GetTypeId(), ns3::FdBetFfMacScheduler::GetTypeId(), ns3::FdMtFfMacScheduler::GetTypeId(), ns3::FdTbfqFfMacScheduler::GetTypeId(), ns3::LteEnbNetDevice::GetTypeId(), ns3::LteEnbRrc::GetTypeId(), ns3::LteFfrAlgorithm::GetTypeId(), ns3::LteFrSoftAlgorithm::GetTypeId(), ns3::LteRlcAm::GetTypeId(), ns3::LteRlcUm::GetTypeId(), ns3::LteSpectrumPhy::GetTypeId(), ns3::LteUePhy::GetTypeId(), ns3::LteUePowerControl::GetTypeId(), ns3::PfFfMacScheduler::GetTypeId(), ns3::PssFfMacScheduler::GetTypeId(), ns3::RrFfMacScheduler::GetTypeId(), ns3::TdBetFfMacScheduler::GetTypeId(), ns3::TdMtFfMacScheduler::GetTypeId(), ns3::TdTbfqFfMacScheduler::GetTypeId(), ns3::TtaFfMacScheduler::GetTypeId(), ns3::dot11s::HwmpProtocol::GetTypeId(), ns3::dot11s::PeerManagementProtocol::GetTypeId(), ns3::MeshWifiInterfaceMac::GetTypeId(), ns3::WaypointMobilityModel::GetTypeId(), ns3::ErrorModel::GetTypeId(), ns3::PcapFileWrapper::GetTypeId(), ns3::SimpleNetDevice::GetTypeId(), ns3::ThreeGppChannelConditionModel::GetTypeId(), ns3::ThreeGppPropagationLossModel::GetTypeId(), ns3::SixLowPanNetDevice::GetTypeId(), ns3::MockNetDevice::GetTypeId(), ns3::ThreeGppChannelModel::GetTypeId(), ns3::DataCollectionObject::GetTypeId(), ns3::TapBridge::GetTypeId(), ns3::CobaltQueueDisc::GetTypeId(), ns3::CoDelQueueDisc::GetTypeId(), ns3::FqCobaltQueueDisc::GetTypeId(), ns3::FqCoDelQueueDisc::GetTypeId(), ns3::FqPieQueueDisc::GetTypeId(), ns3::PieQueueDisc::GetTypeId(), ns3::RedQueueDisc::GetTypeId(), ns3::ApWifiMac::GetTypeId(), ns3::EhtConfiguration::GetTypeId(), ns3::MultiUserScheduler::GetTypeId(), ns3::RrMultiUserScheduler::GetTypeId(), ns3::HtConfiguration::GetTypeId(), ns3::QosFrameExchangeManager::GetTypeId(), ns3::QosTxop::GetTypeId(), ns3::AarfcdWifiManager::GetTypeId(), ns3::MinstrelHtWifiManager::GetTypeId(), ns3::MinstrelWifiManager::GetTypeId(), ns3::RraaWifiManager::GetTypeId(), ns3::RrpaaWifiManager::GetTypeId(), ns3::SpectrumWifiPhy::GetTypeId(), ns3::StaWifiMac::GetTypeId(), ns3::VhtConfiguration::GetTypeId(), ns3::WifiDefaultAckManager::GetTypeId(), ns3::WifiDefaultProtectionManager::GetTypeId(), ns3::WifiMac::GetTypeId(), and ns3::WifiPhy::GetTypeId().

◆ operator<<()

std::ostream & ns3::operator<< ( std::ostream &  os,
const BooleanValue value 
)

Output streamer.

The value is printed as "true" or "false".

Parameters
[in,out]osThe stream.
[in]valueThe BooleanValue to print.
Returns
The stream.

Definition at line 66 of file boolean.cc.