A Discrete-Event Network Simulator
API
ns3::ObjectFactory Class Reference

Instantiate subclasses of ns3::Object. More...

#include "object-factory.h"

+ Collaboration diagram for ns3::ObjectFactory:

Public Member Functions

 ObjectFactory ()
 Default constructor. More...
 
template<typename... Args>
 ObjectFactory (const std::string &typeId, Args &&... args)
 Construct a factory for a specific TypeId by name. More...
 
Ptr< ObjectCreate (void) const
 Create an Object instance of the configured TypeId. More...
 
template<typename T >
Ptr< T > Create (void) const
 Create an Object instance of the requested type. More...
 
TypeId GetTypeId (void) const
 Get the TypeId which will be created by this ObjectFactory. More...
 
bool IsTypeIdSet (void) const
 Check if the ObjectFactory has been configured with a TypeId. More...
 
template<typename... Args>
void Set (const std::string &name, const AttributeValue &value, Args &&... args)
 Set an attribute to be set during construction. More...
 
void Set (void)
 Base case to stop the recursion performed by the templated version of this method. More...
 
void SetTypeId (TypeId tid)
 Set the TypeId of the Objects to be created by this factory. More...
 
void SetTypeId (const char *tid)
 Set the TypeId of the Objects to be created by this factory. More...
 
void SetTypeId (std::string tid)
 Set the TypeId of the Objects to be created by this factory. More...
 

Private Member Functions

void DoSet (const std::string &name, const AttributeValue &value)
 Set an attribute to be set during construction. More...
 

Private Attributes

AttributeConstructionList m_parameters
 The list of attributes and values to be used in constructing objects by this factory. More...
 
TypeId m_tid
 The TypeId this factory will create. More...
 

Friends

std::ostream & operator<< (std::ostream &os, const ObjectFactory &factory)
 Print the factory configuration on an output stream. More...
 
std::istream & operator>> (std::istream &is, ObjectFactory &factory)
 Read a factory configuration from an input stream. More...
 

Detailed Description

Instantiate subclasses of ns3::Object.

This class can also hold a set of attributes to set automatically during the object construction.

See also
ObjectFactory Attribute

Definition at line 47 of file object-factory.h.

Constructor & Destructor Documentation

◆ ObjectFactory() [1/2]

ns3::ObjectFactory::ObjectFactory ( )

Default constructor.

This factory is not capable of constructing a real Object until it has at least a TypeId.

Definition at line 34 of file object-factory.cc.

References NS_LOG_FUNCTION.

◆ ObjectFactory() [2/2]

template<typename... Args>
ns3::ObjectFactory::ObjectFactory ( const std::string &  typeId,
Args &&...  args 
)

Construct a factory for a specific TypeId by name.

Template Parameters
Args[deduced] Template type parameter pack for the sequence of name-value pairs
Parameters
[in]typeIdThe name of the TypeId this factory should create.
[in]argsA sequence of name-value pairs of additional attributes to set.

The args sequence can be made of any number of pairs, each consisting of a name (of std::string type) followed by a value (of const AttributeValue & type).

Definition at line 215 of file object-factory.h.

References Set(), and SetTypeId().

+ Here is the call graph for this function:

Member Function Documentation

◆ Create() [1/2]

Ptr< Object > ns3::ObjectFactory::Create ( void  ) const

Create an Object instance of the configured TypeId.

Returns
A new object instance.

Definition at line 98 of file object-factory.cc.

References ns3::Object::Construct(), ns3::TypeId::GetConstructor(), m_parameters, m_tid, NS_ASSERT, NS_LOG_FUNCTION, and ns3::Object::SetTypeId().

Referenced by ns3::GnuplotHelper::AddProbe(), ns3::FileHelper::AddProbe(), ns3::SpectrumChannelHelper::AddPropagationLoss(), ns3::SpectrumChannelHelper::AddSpectrumPropagationLoss(), ns3::LteUeRrc::ApplyRadioResourceConfigDedicated(), BuildSimpleTopology(), ns3::LteHelper::ChannelModelInitialization(), ns3::PfifoFastQueueDisc::CheckConfig(), ns3::PrioQueueDisc::CheckConfig(), ns3::TbfQueueDisc::CheckConfig(), PowerRateAdaptationTest::ConfigureNode(), ns3::AodvHelper::Create(), ns3::DsdvHelper::Create(), ns3::SpectrumWifiPhyHelper::Create(), ns3::Ipv4NixVectorHelper::Create(), ns3::GridBuildingAllocator::Create(), ns3::RipHelper::Create(), ns3::RipNgHelper::Create(), ns3::OlsrHelper::Create(), ns3::DsrHelper::Create(), ns3::WifiMacHelper::Create(), ns3::YansWifiChannelHelper::Create(), Create(), ns3::YansWifiPhyHelper::Create(), ns3::SpectrumChannelHelper::Create(), ns3::SpectrumPhyHelper::Create(), ns3::InternetStackHelper::CreateAndAggregateObjectFromTypeId(), ns3::MeshHelper::CreateInterface(), UanTest::CreateNode(), ns3::CreateObjectWithAttributes(), WifiTest::CreateOne(), InterferenceHelperSequenceTest::CreateOne(), ns3::TcpOption::CreateOption(), ns3::QueueDiscFactory::CreateQueueDisc(), ns3::TcpL4Protocol::CreateSocket(), ns3::TcpGeneralTest::CreateSocket(), ns3::FqCoDelQueueDisc::DoEnqueue(), ns3::RvBatteryModelHelper::DoInstall(), ns3::BasicEnergySourceHelper::DoInstall(), ns3::BasicEnergyHarvesterHelper::DoInstall(), ns3::LiIonEnergySourceHelper::DoInstall(), ns3::AcousticModemEnergyModelHelper::DoInstall(), ns3::WifiRadioEnergyModelHelper::DoInstall(), BasicEnergyHarvesterTestCase::DoRun(), SteadyStateRandomWaypointTest::DoRun(), ThreeGppChannelConditionModelTestCase::DoRun(), AmpduAggregationTest::DoRun(), WaypointMobilityModelNotifyTest::DoRun(), WaypointMobilityModelAddWaypointTest::DoRun(), InterferenceHelperSequenceTest::DoRun(), TwoLevelAggregationTest::DoRun(), ns3::tests::ObjectFactoryTestCase::DoRun(), DcfImmediateAccessBroadcastTestCase::DoRun(), PointerAttributeTestCase::DoRun(), Bug2831TestCase::DoRun(), HeAggregationTest::DoRunSubTest(), ns3::GetImpl(), ns3::FlowMonitorHelper::GetMonitor(), ns3::BridgeHelper::Install(), ns3::Ping6Helper::Install(), ns3::UdpServerHelper::Install(), ns3::EnergyHarvesterHelper::Install(), ns3::EnergySourceHelper::Install(), ns3::TapBridgeHelper::Install(), ns3::SixLowPanHelper::Install(), ns3::RadvdHelper::Install(), ns3::CsmaHelper::Install(), ns3::PointToPointHelper::Install(), ns3::WaveformGeneratorHelper::Install(), ns3::TvSpectrumTransmitterHelper::Install(), ns3::AdhocAlohaNoackIdealPhyHelper::Install(), ns3::SpectrumAnalyzerHelper::Install(), ns3::SimpleNetDeviceHelper::Install(), ns3::UdpClientHelper::Install(), ns3::InternetStackHelper::Install(), ns3::MobilityHelper::Install(), ns3::UdpTraceClientHelper::Install(), ns3::UanHelper::Install(), ns3::WaveHelper::Install(), ns3::TrafficControlHelper::Install(), ns3::WifiHelper::Install(), ns3::TvSpectrumTransmitterHelper::InstallAdjacent(), ns3::DhcpHelper::InstallDhcpClientPriv(), ns3::DhcpHelper::InstallDhcpServer(), ns3::V4PingHelper::InstallPriv(), ns3::PacketSinkHelper::InstallPriv(), ns3::ThreeGppHttpClientHelper::InstallPriv(), ns3::UdpEchoServerHelper::InstallPriv(), ns3::BulkSendHelper::InstallPriv(), ns3::V4TraceRouteHelper::InstallPriv(), ns3::FdNetDeviceHelper::InstallPriv(), ns3::OnOffHelper::InstallPriv(), ns3::WaveBsmHelper::InstallPriv(), ns3::ThreeGppHttpServerHelper::InstallPriv(), ns3::SimpleNetDeviceHelper::InstallPriv(), ns3::CsmaHelper::InstallPriv(), ns3::UdpEchoClientHelper::InstallPriv(), ns3::LteSimpleHelper::InstallSingleEnbDevice(), ns3::LteHelper::InstallSingleEnbDevice(), ns3::LteSimpleHelper::InstallSingleUeDevice(), ns3::LteHelper::InstallSingleUeDevice(), ns3::VisualSimulatorImpl::NotifyConstructionCompleted(), RoutingExperiment::Run(), WifiTest::RunOne(), ThreeGppShadowingTestCase::RunTest(), ns3::NetDeviceQueueInterface::SetNTxQueues(), ns3::MobilityHelper::SetPositionAllocator(), ns3::NullMessageSimulatorImpl::SetScheduler(), ns3::DefaultSimulatorImpl::SetScheduler(), ns3::RealtimeSimulatorImpl::SetScheduler(), ns3::DistributedSimulatorImpl::SetScheduler(), ns3::MeshHelper::SetStackInstaller(), VanetRoutingExperiment::SetupAdhocMobilityNodes(), ns3::UeManager::SetupDataRadioBearer(), and DsdvManetExample::SetupMobility().

+ Here is the call graph for this function:

◆ Create() [2/2]

template<typename T >
Ptr< T > ns3::ObjectFactory::Create ( void  ) const

Create an Object instance of the requested type.

This method performs an extra call to ns3::Object::GetObject before returning a pointer of the requested type to the user. This method is really syntactical sugar.

Template Parameters
T[explicit] The requested Object type.
Returns
A new object instance.

Definition at line 208 of file object-factory.h.

References Create().

+ Here is the call graph for this function:

◆ DoSet()

void ns3::ObjectFactory::DoSet ( const std::string &  name,
const AttributeValue value 
)
private

Set an attribute to be set during construction.

Parameters
[in]nameThe name of the attribute to set.
[in]valueThe value of the attribute to set.

Definition at line 67 of file object-factory.cc.

References ns3::AttributeConstructionList::Add(), ns3::TypeId::AttributeInformation::checker, ns3::AttributeValue::Copy(), ns3::TypeId::GetName(), ns3::TypeId::LookupAttributeByName(), m_parameters, m_tid, NS_FATAL_ERROR, and NS_LOG_FUNCTION.

Referenced by Set().

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

◆ GetTypeId()

◆ IsTypeIdSet()

bool ns3::ObjectFactory::IsTypeIdSet ( void  ) const

Check if the ObjectFactory has been configured with a TypeId.

Returns
true if a TypeId has been configured to the ObjectFactory

Definition at line 58 of file object-factory.cc.

References ns3::TypeId::GetUid(), and m_tid.

Referenced by ns3::SpectrumWifiPhyHelper::Create(), ns3::YansWifiPhyHelper::Create(), and ns3::WifiHelper::Install().

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

◆ Set() [1/2]

template<typename... Args>
void ns3::ObjectFactory::Set ( const std::string &  name,
const AttributeValue value,
Args &&...  args 
)

Set an attribute to be set during construction.

Template Parameters
Args[deduced] Template type parameter pack for the sequence of name-value pairs
Parameters
[in]nameThe name of the attribute to set.
[in]valueThe value of the attribute to set.
[in]argsA sequence of name-value pairs of additional attributes to set.

The args sequence can be made of any number of pairs, each consisting of a name (of std::string type) followed by a value (of const AttributeValue & type).

Definition at line 223 of file object-factory.h.

References DoSet(), and Set().

Referenced by ns3::YansWifiChannelHelper::AddPropagationLoss(), ns3::SpectrumChannelHelper::AddPropagationLoss(), ns3::SpectrumChannelHelper::AddSpectrumPropagationLoss(), BuildSimpleTopology(), ns3::BulkSendHelper::BulkSendHelper(), ns3::PfifoFastQueueDisc::CheckConfig(), ns3::GridBuildingAllocator::Create(), ns3::CreateObjectWithAttributes(), UanTest::DoPhyTests(), SteadyStateRandomWaypointTest::DoRun(), AmpduAggregationTest::DoRun(), WaypointMobilityModelNotifyTest::DoRun(), WaypointMobilityModelAddWaypointTest::DoRun(), TwoLevelAggregationTest::DoRun(), PointerAttributeTestCase::DoRun(), HeAggregationTest::DoRunSubTest(), ns3::FqCoDelQueueDisc::InitializeParams(), ns3::TapBridgeHelper::Install(), ns3::DhcpHelper::InstallDhcpServer(), ns3::OnOffHelper::OnOffHelper(), ns3::PacketSinkHelper::PacketSinkHelper(), RoutingExperiment::Run(), ns3::RvBatteryModelHelper::Set(), ns3::BasicEnergySourceHelper::Set(), ns3::BasicEnergyHarvesterHelper::Set(), ns3::LiIonEnergySourceHelper::Set(), ns3::WifiRadioEnergyModelHelper::Set(), ns3::AcousticModemEnergyModelHelper::Set(), ns3::AodvHelper::Set(), ns3::DsdvHelper::Set(), ns3::WifiPhyHelper::Set(), ns3::RipHelper::Set(), ns3::RipNgHelper::Set(), ns3::DsrHelper::Set(), ns3::OlsrHelper::Set(), ns3::MeshHelper::SetAckPolicySelectorForAc(), ns3::WaveHelper::SetAckPolicySelectorForAc(), ns3::WifiHelper::SetAckPolicySelectorForAc(), ns3::SpectrumAnalyzerHelper::SetAntenna(), ns3::WaveformGeneratorHelper::SetAntenna(), ns3::AdhocAlohaNoackIdealPhyHelper::SetAntenna(), ns3::UdpEchoServerHelper::SetAttribute(), ns3::PacketSinkHelper::SetAttribute(), ns3::ThreeGppHttpClientHelper::SetAttribute(), ns3::WaveBsmHelper::SetAttribute(), ns3::UdpServerHelper::SetAttribute(), ns3::Ping6Helper::SetAttribute(), ns3::OnOffHelper::SetAttribute(), ns3::TapBridgeHelper::SetAttribute(), ns3::BulkSendHelper::SetAttribute(), ns3::FdNetDeviceHelper::SetAttribute(), ns3::V4PingHelper::SetAttribute(), ns3::V4TraceRouteHelper::SetAttribute(), ns3::RadvdHelper::SetAttribute(), ns3::TvSpectrumTransmitterHelper::SetAttribute(), ns3::ThreeGppHttpServerHelper::SetAttribute(), ns3::UdpClientHelper::SetAttribute(), ns3::UdpEchoClientHelper::SetAttribute(), ns3::UdpTraceClientHelper::SetAttribute(), ns3::GridBuildingAllocator::SetBuildingAttribute(), ns3::CcHelper::SetCcAttribute(), ns3::SpectrumChannelHelper::SetChannel(), ns3::SimpleNetDeviceHelper::SetChannel(), ns3::CsmaHelper::SetChannelAttribute(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::SimpleNetDeviceHelper::SetChannelAttribute(), ns3::WaveHelper::SetChannelScheduler(), ns3::DhcpHelper::SetClientAttribute(), ns3::OnOffHelper::SetConstantRate(), ns3::SixLowPanHelper::SetDeviceAttribute(), ns3::BridgeHelper::SetDeviceAttribute(), ns3::SpectrumAnalyzerHelper::SetDeviceAttribute(), ns3::CsmaHelper::SetDeviceAttribute(), ns3::WaveformGeneratorHelper::SetDeviceAttribute(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::AdhocAlohaNoackIdealPhyHelper::SetDeviceAttribute(), ns3::SimpleNetDeviceHelper::SetDeviceAttribute(), ns3::LteHelper::SetEnbAntennaModelAttribute(), ns3::LteHelper::SetEnbComponentCarrierManagerAttribute(), ns3::LteHelper::SetEnbDeviceAttribute(), ns3::WifiPhyHelper::SetErrorRateModel(), ns3::LteHelper::SetFadingModelAttribute(), ns3::LteHelper::SetFfrAlgorithmAttribute(), ns3::WifiPhyHelper::SetFrameCaptureModel(), ns3::LteHelper::SetHandoverAlgorithmAttribute(), ns3::UanHelper::SetMac(), ns3::MeshHelper::SetMacType(), ns3::MobilityHelper::SetMobilityModel(), ns3::FlowMonitorHelper::SetMonitorAttribute(), ns3::WifiHelper::SetObssPdAlgorithm(), ns3::LteHelper::SetPathlossModelAttribute(), ns3::UanHelper::SetPhy(), ns3::SpectrumPhyHelper::SetPhy(), ns3::SpectrumAnalyzerHelper::SetPhyAttribute(), ns3::WaveformGeneratorHelper::SetPhyAttribute(), ns3::AdhocAlohaNoackIdealPhyHelper::SetPhyAttribute(), ns3::SpectrumPhyHelper::SetPhyAttribute(), ns3::MobilityHelper::SetPositionAllocator(), ns3::WifiPhyHelper::SetPreambleDetectionModel(), ns3::YansWifiChannelHelper::SetPropagationDelay(), ns3::SpectrumChannelHelper::SetPropagationDelay(), ns3::SimpleNetDeviceHelper::SetQueue(), ns3::CsmaHelper::SetQueue(), ns3::PointToPointHelper::SetQueue(), ns3::TrafficControlHelper::SetQueueLimits(), ns3::MeshHelper::SetRemoteStationManager(), ns3::WaveHelper::SetRemoteStationManager(), ns3::WifiHelper::SetRemoteStationManager(), ns3::LteHelper::SetSchedulerAttribute(), ns3::DhcpHelper::SetServerAttribute(), ns3::LteHelper::SetSpectrumChannelAttribute(), ns3::MeshHelper::SetStackInstaller(), ns3::InternetStackHelper::SetTcp(), ns3::UanHelper::SetTransducer(), ns3::WifiRadioEnergyModelHelper::SetTxCurrentModel(), ns3::WifiMacHelper::SetType(), ns3::LteHelper::SetUeAntennaModelAttribute(), ns3::LteHelper::SetUeComponentCarrierManagerAttribute(), ns3::LteHelper::SetUeDeviceAttribute(), VanetRoutingExperiment::SetupAdhocMobilityNodes(), DsdvManetExample::SetupMobility(), ns3::ThreeGppHttpClientHelper::ThreeGppHttpClientHelper(), ns3::ThreeGppHttpServerHelper::ThreeGppHttpServerHelper(), ns3::V4PingHelper::V4PingHelper(), and ns3::V4TraceRouteHelper::V4TraceRouteHelper().

+ Here is the call graph for this function:

◆ Set() [2/2]

void ns3::ObjectFactory::Set ( void  )
inline

Base case to stop the recursion performed by the templated version of this method.

Definition at line 106 of file object-factory.h.

Referenced by ObjectFactory(), and Set().

+ Here is the caller graph for this function:

◆ SetTypeId() [1/3]

void ns3::ObjectFactory::SetTypeId ( TypeId  tid)

Set the TypeId of the Objects to be created by this factory.

Parameters
[in]tidThe TypeId of the object to instantiate.

Definition at line 40 of file object-factory.cc.

References ns3::TypeId::GetName(), m_tid, and NS_LOG_FUNCTION.

Referenced by ns3::AcousticModemEnergyModelHelper::AcousticModemEnergyModelHelper(), ns3::GnuplotHelper::AddProbe(), ns3::FileHelper::AddProbe(), ns3::YansWifiChannelHelper::AddPropagationLoss(), ns3::SpectrumChannelHelper::AddPropagationLoss(), ns3::SpectrumChannelHelper::AddSpectrumPropagationLoss(), ns3::AdhocAlohaNoackIdealPhyHelper::AdhocAlohaNoackIdealPhyHelper(), ns3::AodvHelper::AodvHelper(), ns3::LteUeRrc::ApplyRadioResourceConfigDedicated(), ns3::BasicEnergyHarvesterHelper::BasicEnergyHarvesterHelper(), ns3::BasicEnergySourceHelper::BasicEnergySourceHelper(), ns3::BridgeHelper::BridgeHelper(), BuildSimpleTopology(), ns3::BulkSendHelper::BulkSendHelper(), ns3::CcHelper::CcHelper(), ns3::PfifoFastQueueDisc::CheckConfig(), ns3::PrioQueueDisc::CheckConfig(), ns3::TbfQueueDisc::CheckConfig(), ns3::InternetStackHelper::CreateAndAggregateObjectFromTypeId(), ns3::CreateObjectWithAttributes(), ns3::TcpOption::CreateOption(), ns3::TcpL4Protocol::CreateSocket(), ns3::TcpGeneralTest::CreateSocket(), ns3::CsmaHelper::CsmaHelper(), ns3::DhcpHelper::DhcpHelper(), ns3::WifiPhyHelper::DisablePreambleDetectionModel(), UanTest::DoPhyTests(), BasicEnergyHarvesterTestCase::DoRun(), SteadyStateRandomWaypointTest::DoRun(), ThreeGppChannelConditionModelTestCase::DoRun(), AmpduAggregationTest::DoRun(), WaypointMobilityModelNotifyTest::DoRun(), WifiTest::DoRun(), WaypointMobilityModelAddWaypointTest::DoRun(), InterferenceHelperSequenceTest::DoRun(), TwoLevelAggregationTest::DoRun(), ns3::tests::ObjectFactoryTestCase::DoRun(), DcfImmediateAccessBroadcastTestCase::DoRun(), PointerAttributeTestCase::DoRun(), Bug2831TestCase::DoRun(), HeAggregationTest::DoRunSubTest(), ns3::DsdvHelper::DsdvHelper(), ns3::DsrHelper::DsrHelper(), ns3::FdNetDeviceHelper::FdNetDeviceHelper(), ns3::FlowMonitorHelper::FlowMonitorHelper(), anonymous_namespace{test-string-value-formatting.cc}::FormattingTestObjectHelper::FormattingTestObjectHelper(), ns3::anonymous_namespace{visual-simulator-impl.cc}::GetDefaultSimulatorImplFactory(), ns3::GetImpl(), ns3::GridBuildingAllocator::GridBuildingAllocator(), ns3::FqCoDelQueueDisc::InitializeParams(), ns3::EnergySourceHelper::Install(), ns3::EnergyHarvesterHelper::Install(), ns3::PointToPointHelper::Install(), ns3::Ipv4NixVectorHelper::Ipv4NixVectorHelper(), ns3::LiIonEnergySourceHelper::LiIonEnergySourceHelper(), ns3::LteSimpleHelper::LteSimpleHelper(), ns3::MobilityHelper::MobilityHelper(), ObjectFactory(), ns3::OlsrHelper::OlsrHelper(), ns3::OnOffHelper::OnOffHelper(), ns3::operator>>(), ns3::PacketSinkHelper::PacketSinkHelper(), ns3::Ping6Helper::Ping6Helper(), ns3::PointToPointHelper::PointToPointHelper(), ns3::RadvdHelper::RadvdHelper(), ns3::RipHelper::RipHelper(), ns3::RipNgHelper::RipNgHelper(), RoutingExperiment::Run(), FifoQueueDiscTestCase::RunFifoTest(), ns3::RvBatteryModelHelper::RvBatteryModelHelper(), ns3::MeshHelper::SetAckPolicySelectorForAc(), ns3::WaveHelper::SetAckPolicySelectorForAc(), ns3::WifiHelper::SetAckPolicySelectorForAc(), ns3::SpectrumAnalyzerHelper::SetAntenna(), ns3::WaveformGeneratorHelper::SetAntenna(), ns3::AdhocAlohaNoackIdealPhyHelper::SetAntenna(), ns3::SpectrumChannelHelper::SetChannel(), ns3::SimpleNetDeviceHelper::SetChannel(), ns3::WaveHelper::SetChannelScheduler(), ns3::LteHelper::SetEnbAntennaModelType(), ns3::LteHelper::SetEnbComponentCarrierManagerType(), ns3::WifiPhyHelper::SetErrorRateModel(), ns3::LteHelper::SetFadingModel(), ns3::LteHelper::SetFfrAlgorithmType(), ns3::WifiPhyHelper::SetFrameCaptureModel(), ns3::LteHelper::SetHandoverAlgorithmType(), ns3::Simulator::SetImplementation(), ns3::UanHelper::SetMac(), ns3::MeshHelper::SetMacType(), ns3::MobilityHelper::SetMobilityModel(), ns3::WifiHelper::SetObssPdAlgorithm(), ns3::LteHelper::SetPathlossModelType(), ns3::UanHelper::SetPhy(), ns3::SpectrumPhyHelper::SetPhy(), ns3::MobilityHelper::SetPositionAllocator(), ns3::WifiPhyHelper::SetPreambleDetectionModel(), ns3::YansWifiChannelHelper::SetPropagationDelay(), ns3::SpectrumChannelHelper::SetPropagationDelay(), ns3::SimpleNetDeviceHelper::SetQueue(), ns3::CsmaHelper::SetQueue(), ns3::PointToPointHelper::SetQueue(), ns3::TrafficControlHelper::SetQueueLimits(), ns3::MeshHelper::SetRemoteStationManager(), ns3::WaveHelper::SetRemoteStationManager(), ns3::WifiHelper::SetRemoteStationManager(), ns3::LteHelper::SetSchedulerType(), ns3::LteHelper::SetSpectrumChannelType(), ns3::MeshHelper::SetStackInstaller(), ns3::InternetStackHelper::SetTcp(), ns3::UanHelper::SetTransducer(), ns3::WifiRadioEnergyModelHelper::SetTxCurrentModel(), ns3::NetDeviceQueueInterface::SetTxQueuesType(), ns3::WifiMacHelper::SetType(), ns3::FdNetDeviceHelper::SetTypeId(), ns3::LteHelper::SetUeAntennaModelType(), ns3::LteHelper::SetUeComponentCarrierManagerType(), VanetRoutingExperiment::SetupAdhocMobilityNodes(), ns3::UeManager::SetupDataRadioBearer(), DsdvManetExample::SetupMobility(), ns3::SimpleNetDeviceHelper::SimpleNetDeviceHelper(), SimulatorTestSuite::SimulatorTestSuite(), ns3::SixLowPanHelper::SixLowPanHelper(), ns3::SpectrumAnalyzerHelper::SpectrumAnalyzerHelper(), ns3::SpectrumWifiPhyHelper::SpectrumWifiPhyHelper(), ns3::TapBridgeHelper::TapBridgeHelper(), PowerRateAdaptationTest::TestAparf(), PowerRateAdaptationTest::TestParf(), PowerRateAdaptationTest::TestRrpaa(), ThreadedSimulatorTestSuite::ThreadedSimulatorTestSuite(), ns3::ThreeGppHttpClientHelper::ThreeGppHttpClientHelper(), ns3::ThreeGppHttpServerHelper::ThreeGppHttpServerHelper(), ns3::TvSpectrumTransmitterHelper::TvSpectrumTransmitterHelper(), ns3::UanHelper::UanHelper(), ns3::UdpClientHelper::UdpClientHelper(), ns3::UdpEchoClientHelper::UdpEchoClientHelper(), ns3::UdpEchoServerHelper::UdpEchoServerHelper(), ns3::UdpServerHelper::UdpServerHelper(), ns3::UdpTraceClientHelper::UdpTraceClientHelper(), ns3::V4PingHelper::V4PingHelper(), ns3::V4TraceRouteHelper::V4TraceRouteHelper(), ns3::WaveBsmHelper::WaveBsmHelper(), ns3::WaveformGeneratorHelper::WaveformGeneratorHelper(), ns3::WifiRadioEnergyModelHelper::WifiRadioEnergyModelHelper(), and ns3::YansWifiPhyHelper::YansWifiPhyHelper().

+ Here is the call graph for this function:

◆ SetTypeId() [2/3]

void ns3::ObjectFactory::SetTypeId ( const char *  tid)

Set the TypeId of the Objects to be created by this factory.

Parameters
[in]tidThe TypeId of the object to instantiate.

Definition at line 52 of file object-factory.cc.

References ns3::TypeId::LookupByName(), m_tid, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

◆ SetTypeId() [3/3]

void ns3::ObjectFactory::SetTypeId ( std::string  tid)

Set the TypeId of the Objects to be created by this factory.

Parameters
[in]tidThe TypeId of the object to instantiate.

Definition at line 46 of file object-factory.cc.

References ns3::TypeId::LookupByName(), m_tid, and NS_LOG_FUNCTION.

+ Here is the call graph for this function:

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
const ObjectFactory factory 
)
friend

Print the factory configuration on an output stream.

The configuration will be printed as a string with the form "<TypeId-name>[<attribute-name>=<attribute-value>|...]"

Parameters
[in,out]osThe stream.
[in]factoryThe ObjectFactory.
Returns
The stream.

Definition at line 111 of file object-factory.cc.

◆ operator>>

std::istream& operator>> ( std::istream &  is,
ObjectFactory factory 
)
friend

Read a factory configuration from an input stream.

The configuration should be in the form "<TypeId-name>[<attribute-name>=<attribute-value>|...]"

Parameters
[in,out]isThe input stream.
[out]factoryThe factory to configure as described by the stream.
Returns
The stream.

Definition at line 126 of file object-factory.cc.

Member Data Documentation

◆ m_parameters

AttributeConstructionList ns3::ObjectFactory::m_parameters
private

The list of attributes and values to be used in constructing objects by this factory.

Definition at line 171 of file object-factory.h.

Referenced by Create(), DoSet(), ns3::operator<<(), and ns3::operator>>().

◆ m_tid

TypeId ns3::ObjectFactory::m_tid
private

The TypeId this factory will create.

Definition at line 166 of file object-factory.h.

Referenced by Create(), DoSet(), GetTypeId(), IsTypeIdSet(), ns3::operator<<(), ns3::operator>>(), and SetTypeId().


The documentation for this class was generated from the following files: