ns-3
ns3::ObjectFactory Class Reference

instantiate subclasses of ns3::Object. More...

#include <object-factory.h>

List of all members.

Public Member Functions

 ObjectFactory (std::string typeId)
void SetTypeId (TypeId tid)
void SetTypeId (const char *tid)
void SetTypeId (std::string tid)
void Set (std::string name, const AttributeValue &value)
TypeId GetTypeId (void) const
Ptr< ObjectCreate (void) const
template<typename T >
Ptr< T > Create (void) const

Friends

std::ostream & operator<< (std::ostream &os, const ObjectFactory &factory)
std::istream & operator>> (std::istream &is, ObjectFactory &factory)

Detailed Description

instantiate subclasses of ns3::Object.

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


Member Function Documentation

Ptr< T > ns3::ObjectFactory::Create ( void  ) const
Returns:
a new object instance.

References ns3::TypeId::GetConstructor().

Referenced by ns3::SpectrumChannelHelper::AddPropagationLoss(), ns3::SpectrumChannelHelper::AddSpectrumPropagationLoss(), ns3::AodvHelper::Create(), ns3::Ipv4NixVectorHelper::Create(), ns3::DsdvHelper::Create(), ns3::GridBuildingAllocator::Create(), ns3::DsrHelper::Create(), ns3::OlsrHelper::Create(), ns3::YansWifiChannelHelper::Create(), ns3::SpectrumChannelHelper::Create(), ns3::SpectrumPhyHelper::Create(), ns3::CreateObjectWithAttributes(), ns3::PointerValue::DeserializeFromString(), ns3::LteHelper::DoStart(), ns3::FlowMonitorHelper::GetMonitor(), ns3::BridgeHelper::Install(), ns3::Ping6Helper::Install(), ns3::UdpServerHelper::Install(), ns3::EnergySourceHelper::Install(), ns3::TapBridgeHelper::Install(), ns3::CsmaHelper::Install(), ns3::UdpClientHelper::Install(), ns3::PointToPointHelper::Install(), ns3::WaveformGeneratorHelper::Install(), ns3::InternetStackHelper::Install(), ns3::AdhocAlohaNoackIdealPhyHelper::Install(), ns3::SpectrumAnalyzerHelper::Install(), ns3::WifiHelper::Install(), ns3::UdpTraceClientHelper::Install(), ns3::MobilityHelper::Install(), ns3::UanHelper::Install(), ns3::VisualSimulatorImpl::NotifyConstructionCompleted(), ns3::MobilityHelper::SetPositionAllocator(), ns3::DefaultSimulatorImpl::SetScheduler(), ns3::RealtimeSimulatorImpl::SetScheduler(), ns3::DistributedSimulatorImpl::SetScheduler(), ns3::MeshHelper::SetStackInstaller(), ns3::LteUeRrc::SetupRadioBearer(), and ns3::LteEnbRrc::SetupRadioBearer().

template<typename T >
Ptr<T> ns3::ObjectFactory::Create ( void  ) const
Returns:
a new object instance.

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.

TypeId ns3::ObjectFactory::GetTypeId ( void  ) const
Returns:
the currently-selected TypeId to use to create an object instance.

Referenced by ns3::LteHelper::EnableLogComponents(), ns3::MobilityHelper::GetMobilityModelType(), and ns3::MobilityHelper::Install().

void ns3::ObjectFactory::Set ( std::string  name,
const AttributeValue value 
)
Parameters:
namethe name of the attribute to set during object construction
valuethe value of the attribute to set during object construction

References ns3::AttributeValue::Copy(), ns3::TypeId::GetName(), ns3::TypeId::LookupAttributeByName(), and NS_FATAL_ERROR.

Referenced by ns3::YansWifiChannelHelper::AddPropagationLoss(), ns3::SpectrumChannelHelper::AddPropagationLoss(), ns3::SpectrumChannelHelper::AddSpectrumPropagationLoss(), ns3::BulkSendHelper::BulkSendHelper(), ns3::GridBuildingAllocator::Create(), ns3::CreateObjectWithAttributes(), ns3::TapBridgeHelper::Install(), ns3::OnOffHelper::OnOffHelper(), ns3::PacketSinkHelper::PacketSinkHelper(), ns3::BasicEnergySourceHelper::Set(), ns3::RvBatteryModelHelper::Set(), ns3::AcousticModemEnergyModelHelper::Set(), ns3::WifiRadioEnergyModelHelper::Set(), ns3::AodvHelper::Set(), ns3::DsdvHelper::Set(), ns3::OlsrHelper::Set(), ns3::YansWifiPhyHelper::Set(), ns3::SpectrumAnalyzerHelper::SetAntenna(), ns3::WaveformGeneratorHelper::SetAntenna(), ns3::AdhocAlohaNoackIdealPhyHelper::SetAntenna(), ns3::UdpEchoServerHelper::SetAttribute(), ns3::PacketSinkHelper::SetAttribute(), ns3::OnOffHelper::SetAttribute(), ns3::UdpServerHelper::SetAttribute(), ns3::Ping6Helper::SetAttribute(), ns3::BulkSendHelper::SetAttribute(), ns3::V4PingHelper::SetAttribute(), ns3::EmuHelper::SetAttribute(), ns3::UdpClientHelper::SetAttribute(), ns3::UdpEchoClientHelper::SetAttribute(), ns3::UdpTraceClientHelper::SetAttribute(), ns3::GridBuildingAllocator::SetBuildingAttribute(), ns3::SpectrumChannelHelper::SetChannel(), ns3::CsmaHelper::SetChannelAttribute(), ns3::PointToPointHelper::SetChannelAttribute(), ns3::BridgeHelper::SetDeviceAttribute(), ns3::SpectrumAnalyzerHelper::SetDeviceAttribute(), ns3::CsmaHelper::SetDeviceAttribute(), ns3::WaveformGeneratorHelper::SetDeviceAttribute(), ns3::PointToPointHelper::SetDeviceAttribute(), ns3::AdhocAlohaNoackIdealPhyHelper::SetDeviceAttribute(), ns3::LteHelper::SetEnbAntennaModelAttribute(), ns3::LteHelper::SetEnbDeviceAttribute(), ns3::YansWifiPhyHelper::SetErrorRateModel(), ns3::LteHelper::SetFadingModelAttribute(), ns3::UanHelper::SetMac(), ns3::MeshHelper::SetMacType(), ns3::MobilityHelper::SetMobilityModel(), ns3::FlowMonitorHelper::SetMonitorAttribute(), ns3::QosWifiMacHelper::SetMsduAggregatorForAc(), 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::YansWifiChannelHelper::SetPropagationDelay(), ns3::SpectrumChannelHelper::SetPropagationDelay(), ns3::CsmaHelper::SetQueue(), ns3::EmuHelper::SetQueue(), ns3::PointToPointHelper::SetQueue(), ns3::MeshHelper::SetRemoteStationManager(), ns3::WifiHelper::SetRemoteStationManager(), ns3::LteHelper::SetSchedulerAttribute(), ns3::LteHelper::SetSpectrumChannelAttribute(), ns3::MeshHelper::SetStackInstaller(), ns3::InternetStackHelper::SetTcp(), ns3::UanHelper::SetTransducer(), ns3::NqosWifiMacHelper::SetType(), ns3::QosWifiMacHelper::SetType(), ns3::LteHelper::SetUeAntennaModelAttribute(), and ns3::V4PingHelper::V4PingHelper().

void ns3::ObjectFactory::SetTypeId ( TypeId  tid)
Parameters:
tidthe TypeId of the object to instantiate.

Referenced by ns3::AcousticModemEnergyModelHelper::AcousticModemEnergyModelHelper(), ns3::YansWifiChannelHelper::AddPropagationLoss(), ns3::SpectrumChannelHelper::AddPropagationLoss(), ns3::SpectrumChannelHelper::AddSpectrumPropagationLoss(), ns3::BulkSendHelper::BulkSendHelper(), ns3::CreateObjectWithAttributes(), ns3::CsmaHelper::CsmaHelper(), ns3::DsrHelper::DsrHelper(), ns3::FlowMonitorHelper::FlowMonitorHelper(), ns3::EnergySourceHelper::Install(), ns3::MobilityHelper::MobilityHelper(), ns3::OlsrHelper::OlsrHelper(), ns3::OnOffHelper::OnOffHelper(), ns3::PacketSinkHelper::PacketSinkHelper(), ns3::Ping6Helper::Ping6Helper(), ns3::PointToPointHelper::PointToPointHelper(), ns3::SpectrumAnalyzerHelper::SetAntenna(), ns3::WaveformGeneratorHelper::SetAntenna(), ns3::AdhocAlohaNoackIdealPhyHelper::SetAntenna(), ns3::SpectrumChannelHelper::SetChannel(), ns3::LteHelper::SetEnbAntennaModelType(), ns3::YansWifiPhyHelper::SetErrorRateModel(), ns3::LteHelper::SetFadingModel(), ns3::Simulator::SetImplementation(), ns3::UanHelper::SetMac(), ns3::MeshHelper::SetMacType(), ns3::MobilityHelper::SetMobilityModel(), ns3::QosWifiMacHelper::SetMsduAggregatorForAc(), ns3::LteHelper::SetPathlossModelType(), ns3::UanHelper::SetPhy(), ns3::SpectrumPhyHelper::SetPhy(), ns3::MobilityHelper::SetPositionAllocator(), ns3::YansWifiChannelHelper::SetPropagationDelay(), ns3::SpectrumChannelHelper::SetPropagationDelay(), ns3::EmuHelper::SetQueue(), ns3::CsmaHelper::SetQueue(), ns3::PointToPointHelper::SetQueue(), ns3::MeshHelper::SetRemoteStationManager(), ns3::WifiHelper::SetRemoteStationManager(), ns3::LteHelper::SetSchedulerType(), ns3::LteHelper::SetSpectrumChannelType(), ns3::MeshHelper::SetStackInstaller(), ns3::InternetStackHelper::SetTcp(), ns3::UanHelper::SetTransducer(), ns3::NqosWifiMacHelper::SetType(), ns3::QosWifiMacHelper::SetType(), ns3::LteHelper::SetUeAntennaModelType(), ns3::LteUeRrc::SetupRadioBearer(), ns3::LteEnbRrc::SetupRadioBearer(), ns3::TapBridgeHelper::TapBridgeHelper(), ns3::UdpClientHelper::UdpClientHelper(), ns3::UdpEchoClientHelper::UdpEchoClientHelper(), ns3::UdpEchoServerHelper::UdpEchoServerHelper(), ns3::UdpServerHelper::UdpServerHelper(), ns3::UdpTraceClientHelper::UdpTraceClientHelper(), ns3::V4PingHelper::V4PingHelper(), ns3::WifiRadioEnergyModelHelper::WifiRadioEnergyModelHelper(), and ns3::YansWifiPhyHelper::YansWifiPhyHelper().

void ns3::ObjectFactory::SetTypeId ( const char *  tid)
Parameters:
tidthe TypeId of the object to instantiate.

References ns3::TypeId::LookupByName().

void ns3::ObjectFactory::SetTypeId ( std::string  tid)
Parameters:
tidthe TypeId of the object to instantiate.

References ns3::TypeId::LookupByName().


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