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

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.

Returns:
the currently-selected TypeId to use to create an object instance.

Referenced by 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::TypeId::GetName(), ns3::TypeId::LookupAttributeByName(), and NS_FATAL_ERROR.

Referenced by ns3::YansWifiChannelHelper::AddPropagationLoss(), ns3::SpectrumChannelHelper::AddPropagationLoss(), ns3::SpectrumChannelHelper::AddSpectrumPropagationLoss(), ns3::BulkSendHelper::BulkSendHelper(), ns3::CreateObjectWithAttributes(), ns3::TapBridgeHelper::Install(), ns3::OnOffHelper::OnOffHelper(), ns3::PacketSinkHelper::PacketSinkHelper(), ns3::BasicEnergySourceHelper::Set(), ns3::RvBatteryModelHelper::Set(), ns3::AcousticModemEnergyModelHelper::Set(), ns3::WifiRadioEnergyModelHelper::Set(), ns3::DsdvHelper::Set(), ns3::OlsrHelper::Set(), ns3::YansWifiPhyHelper::Set(), ns3::UdpEchoServerHelper::SetAttribute(), ns3::PacketSinkHelper::SetAttribute(), ns3::OnOffHelper::SetAttribute(), ns3::UdpServerHelper::SetAttribute(), ns3::BulkSendHelper::SetAttribute(), ns3::Ping6Helper::SetAttribute(), ns3::V4PingHelper::SetAttribute(), ns3::EmuHelper::SetAttribute(), ns3::UdpClientHelper::SetAttribute(), ns3::UdpEchoClientHelper::SetAttribute(), ns3::UdpTraceClientHelper::SetAttribute(), 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::YansWifiPhyHelper::SetErrorRateModel(), ns3::UanHelper::SetMac(), ns3::MeshHelper::SetMacType(), ns3::MobilityHelper::SetMobilityModel(), ns3::FlowMonitorHelper::SetMonitorAttribute(), ns3::QosWifiMacHelper::SetMsduAggregatorForAc(), 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::EmuHelper::SetQueue(), ns3::CsmaHelper::SetQueue(), ns3::PointToPointHelper::SetQueue(), ns3::MeshHelper::SetRemoteStationManager(), ns3::WifiHelper::SetRemoteStationManager(), ns3::MeshHelper::SetStackInstaller(), ns3::InternetStackHelper::SetTcp(), ns3::UanHelper::SetTransducer(), ns3::NqosWifiMacHelper::SetType(), ns3::QosWifiMacHelper::SetType(), and ns3::V4PingHelper::V4PingHelper().

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::FlowMonitorHelper::FlowMonitorHelper(), ns3::EnergySourceHelper::Install(), ns3::MobilityHelper::MobilityHelper(), ns3::OlsrHelper::OlsrHelper(), ns3::OnOffHelper::OnOffHelper(), ns3::PacketSinkHelper::PacketSinkHelper(), ns3::Ping6Helper::Ping6Helper(), ns3::PointToPointHelper::PointToPointHelper(), ns3::SpectrumChannelHelper::SetChannel(), ns3::YansWifiPhyHelper::SetErrorRateModel(), ns3::Simulator::SetImplementation(), ns3::UanHelper::SetMac(), ns3::MeshHelper::SetMacType(), ns3::MobilityHelper::SetMobilityModel(), ns3::QosWifiMacHelper::SetMsduAggregatorForAc(), ns3::UanHelper::SetPhy(), ns3::SpectrumPhyHelper::SetPhy(), 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::MeshHelper::SetStackInstaller(), ns3::InternetStackHelper::SetTcp(), ns3::UanHelper::SetTransducer(), ns3::NqosWifiMacHelper::SetType(), ns3::QosWifiMacHelper::SetType(), 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: