A base class which provides memory management and object aggregation. More...
#include "object.h"
Inherits ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >.
Inherited by AttributeContainerObject, AttributeObjectTest, ConfigExample, DeprecatedAttribute, Derived, Emitter, Emitter, Emitter, Emitter, LengthValueTestCase::TestObject, MyObject, PairObject, PtrExample, SampleEmitter, TracedCallbackTypedefTestCase::Checker< Ts >, TracedValueCallbackTestCase::CheckTvCb< T >, TupleObject, anonymous_namespace{log-example.cc}::MyEventObject, anonymous_namespace{object-test-suite.cc}::BaseA, anonymous_namespace{object-test-suite.cc}::BaseB, anonymous_namespace{sequence-number-test-suite.cc}::SequenceNumberTestObj, anonymous_namespace{test-string-value-formatting.cc}::FormattingTestObject, ns3::AntennaModel, ns3::ApEmlsrManager, ns3::Application, ns3::ArpCache, ns3::ArpL3Protocol, ns3::AthstatsWifiTraceSink, ns3::BSLinkManager, ns3::BSScheduler, ns3::BandwidthManager, ns3::BlockAckManager, ns3::Building, ns3::BuildingListPriv, ns3::BurstProfileManager, ns3::CcHelper, ns3::Channel, ns3::ChannelAccessManager, ns3::ChannelCondition, ns3::ChannelConditionModel, ns3::ChannelListPriv, ns3::ComponentCarrier, ns3::ConnectionManager, ns3::DataCalculator, ns3::DataCollectionObject, ns3::DataCollector, ns3::DataOutputInterface, ns3::EhtConfiguration, ns3::EmlsrManager, ns3::EpcHelper, ns3::EpcTestRrc, ns3::EpcUeNas, ns3::EpcX2, ns3::ErrorModel, ns3::ErrorRateModel, ns3::FfMacScheduler, ns3::FlowMonitor, ns3::FlowProbe, ns3::FrameCaptureModel, ns3::FrameExchangeManager, ns3::GlobalRouter, ns3::GrantedTimeWindowMpiInterface [private]
, ns3::GridBuildingAllocator, ns3::HeConfiguration, ns3::HtConfiguration, ns3::InterferenceHelper, ns3::IpL4Protocol, ns3::IpcsClassifier, ns3::Ipv4, ns3::Ipv4Interface, ns3::Ipv4RoutingProtocol, ns3::Ipv6, ns3::Ipv6AutoconfiguredPrefix, ns3::Ipv6Extension, ns3::Ipv6ExtensionDemux, ns3::Ipv6ExtensionRoutingDemux, ns3::Ipv6Interface, ns3::Ipv6Option, ns3::Ipv6OptionDemux, ns3::Ipv6PmtuCache, ns3::Ipv6RoutingProtocol, ns3::JakesProcess, ns3::LteAmc, ns3::LteAnr, ns3::LteEnbComponentCarrierManager, ns3::LteEnbMac, ns3::LteEnbRrc, ns3::LteEnbRrcProtocolIdeal, ns3::LteEnbRrcProtocolReal, ns3::LteFfrAlgorithm, ns3::LteHandoverAlgorithm, ns3::LteHelper, ns3::LteHexGridEnbTopologyHelper, ns3::LteInterference, ns3::LtePdcp, ns3::LtePhy, ns3::LteRadioBearerInfo, ns3::LteRlc, ns3::LteSimpleHelper, ns3::LteStatsCalculator, ns3::LteTestMac, ns3::LteTestPdcp, ns3::LteTestRrc, ns3::LteUeComponentCarrierManager, ns3::LteUeMac, ns3::LteUePowerControl, ns3::LteUeRrc, ns3::LteUeRrcProtocolIdeal, ns3::LteUeRrcProtocolReal, ns3::MatrixBasedChannelModel, ns3::MeshL2RoutingProtocol, ns3::MeshStack, ns3::MobilityBuildingInfo, ns3::MobilityModel, ns3::MpduAggregator, ns3::MpiReceiver, ns3::MsduAggregator, ns3::MultiUserScheduler, ns3::NdiscCache, ns3::NetDevice, ns3::NetDeviceQueue, ns3::NetDeviceQueueInterface, ns3::Node, ns3::NodeListPriv, ns3::NullMessageMpiInterface [private]
, ns3::ObssPdAlgorithm, ns3::PacketBurst, ns3::PacketFilter, ns3::PcapFileWrapper, ns3::PhasedArrayModel, ns3::PhasedArraySpectrumPropagationLossModel, ns3::PositionAllocator, ns3::PreambleDetectionModel, ns3::PriorityUlJob, ns3::PropagationDelayModel, ns3::PropagationLossModel, ns3::QueueBase, ns3::QueueDisc, ns3::QueueDiscClass, ns3::QueueLimits, ns3::RadioEnvironmentMapHelper, ns3::RandomVariableStream, ns3::RemoteChannelBundle, ns3::RttEstimator, ns3::SSLinkManager, ns3::SSManager, ns3::SSScheduler, ns3::Scheduler, ns3::ServiceFlowManager, ns3::SimulatorImpl, ns3::Socket, ns3::SocketFactory, ns3::SpectrumErrorModel, ns3::SpectrumInterference, ns3::SpectrumPhy, ns3::SpectrumPropagationLossModel, ns3::SpectrumTransmitFilter, ns3::Synchronizer, ns3::TcpCongestionOps, ns3::TcpOption, ns3::TcpRateOps, ns3::TcpRecoveryOps, ns3::TcpRxBuffer, ns3::TcpSocketState, ns3::TcpTxBuffer, ns3::ThreeGppHttpVariables, ns3::TopologyReader, ns3::TrafficControlLayer, ns3::Txop, ns3::UanMac, ns3::UanNoiseModel, ns3::UanPhy, ns3::UanPhyCalcSinr, ns3::UanPhyPer, ns3::UanPropModel, ns3::UanTransducer, ns3::UeManager, ns3::UlJob, ns3::UplinkScheduler, ns3::VhtConfiguration, ns3::WifiAckManager, ns3::WifiAssocManager, ns3::WifiMac, ns3::WifiMacQueueScheduler, ns3::WifiPhy, ns3::WifiPhyRxTraceSink, ns3::WifiPhyStateHelper, ns3::WifiProtectionManager, ns3::WifiRemoteStationManager, ns3::WifiTxCurrentModel, ns3::WimaxConnection, ns3::WimaxMacQueue, ns3::WimaxPhy, ns3::dot11s::AirtimeLinkMetricCalculator, ns3::dot11s::HwmpRtable, ns3::dot11s::PeerLink, ns3::dot11s::PeerManagementProtocol, ns3::dsr::DsrGraReply, ns3::dsr::DsrNetworkQueue, ns3::dsr::DsrOptions, ns3::dsr::DsrPassiveBuffer, ns3::dsr::DsrRouteCache, ns3::dsr::DsrRreqTable, ns3::energy::DeviceEnergyModel, ns3::energy::EnergyHarvester, ns3::energy::EnergyHarvesterContainer, ns3::energy::EnergySource, ns3::energy::EnergySourceContainer, ns3::flame::FlameRtable, ns3::lorawan::EndDeviceStatus, ns3::lorawan::GatewayStatus, ns3::lorawan::LogicalLoraChannel, ns3::lorawan::LogicalLoraChannelHelper, ns3::lorawan::LoraDeviceAddressGenerator, ns3::lorawan::LoraPhy, ns3::lorawan::LoraTxCurrentModel, ns3::lorawan::LorawanMac, ns3::lorawan::MacCommand, ns3::lorawan::NetworkController, ns3::lorawan::NetworkControllerComponent, ns3::lorawan::NetworkScheduler, ns3::lorawan::NetworkStatus, ns3::lorawan::SubBand, ns3::lrwpan::LrWpanCsmaCa, ns3::lrwpan::LrWpanErrorModel, ns3::lrwpan::LrWpanMacBase, ns3::ofi::Controller, ns3::tests::AlternateTestObject, ns3::tests::BaseConfigObject, ns3::tests::ConfigTestObject, and ns3::tests::TestObject.
Classes | |
class | AggregateIterator |
Iterate over the Objects aggregated to an ns3::Object. More... | |
struct | Aggregates |
The list of Objects aggregated to this one. More... | |
Public Member Functions | |
Object () | |
Constructor. | |
~Object () override | |
Destructor. | |
void | AggregateObject (Ptr< Object > other) |
Aggregate two Objects together. | |
void | Dispose () |
Dispose of this Object. | |
AggregateIterator | GetAggregateIterator () const |
Get an iterator to the Objects aggregated to this one. | |
TypeId | GetInstanceTypeId () const override |
Get the most derived TypeId for this Object. | |
template<typename T > | |
Ptr< T > | GetObject () const |
Get a pointer to the requested aggregated Object. | |
template<> | |
Ptr< Object > | GetObject () const |
Specialization of () for objects of type ns3::Object. | |
template<typename T > | |
Ptr< T > | GetObject (TypeId tid) const |
Get a pointer to the requested aggregated Object by TypeId. | |
template<> | |
Ptr< Object > | GetObject (TypeId tid) const |
Specialization of (TypeId tid) for objects of type ns3::Object. | |
void | Initialize () |
Invoke DoInitialize on all Objects aggregated to this one. | |
bool | IsInitialized () const |
Check if the object has been initialized. | |
void | UnidirectionalAggregateObject (Ptr< Object > other) |
Aggregate an Object to another Object. | |
Public Member Functions inherited from ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter > | |
SimpleRefCount () | |
Default constructor. | |
SimpleRefCount (const SimpleRefCount &o) | |
Copy constructor. | |
uint32_t | GetReferenceCount () const |
Get the reference count of the object. | |
SimpleRefCount & | operator= (const SimpleRefCount &o) |
Assignment operator. | |
void | Ref () const |
Increment the reference count. | |
void | Unref () const |
Decrement the reference count. | |
Public Member Functions inherited from ns3::ObjectBase | |
virtual | ~ObjectBase () |
Virtual destructor. | |
void | GetAttribute (std::string name, AttributeValue &value, bool permissive=false) const |
Get the value of an attribute, raising fatal errors if unsuccessful. | |
bool | GetAttributeFailSafe (std::string name, AttributeValue &value) const |
Get the value of an attribute without raising errors. | |
void | SetAttribute (std::string name, const AttributeValue &value) |
Set a single attribute, raising fatal errors if unsuccessful. | |
bool | SetAttributeFailSafe (std::string name, const AttributeValue &value) |
Set a single attribute without raising errors. | |
bool | TraceConnect (std::string name, std::string context, const CallbackBase &cb) |
Connect a TraceSource to a Callback with a context. | |
bool | TraceConnectWithoutContext (std::string name, const CallbackBase &cb) |
Connect a TraceSource to a Callback without a context. | |
bool | TraceDisconnect (std::string name, std::string context, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected with a context. | |
bool | TraceDisconnectWithoutContext (std::string name, const CallbackBase &cb) |
Disconnect from a TraceSource a Callback previously connected without a context. | |
Static Public Member Functions | |
static TypeId | GetTypeId () |
Register this type. | |
Static Public Member Functions inherited from ns3::ObjectBase | |
static TypeId | GetTypeId () |
Get the type ID. | |
Protected Member Functions | |
Object (const Object &o) | |
Copy an Object. | |
virtual void | DoDispose () |
Destructor implementation. | |
virtual void | DoInitialize () |
Initialize() implementation. | |
virtual void | NotifyNewAggregate () |
Notify all Objects aggregated to this one of a new Object being aggregated. | |
Protected Member Functions inherited from ns3::ObjectBase | |
void | ConstructSelf (const AttributeConstructionList &attributes) |
Complete construction of ObjectBase; invoked by derived classes. | |
virtual void | NotifyConstructionCompleted () |
Notifier called once the ObjectBase is fully constructed. | |
Private Member Functions | |
bool | Check () const |
Verify that this Object is still live, by checking it's reference count. | |
bool | CheckLoose () const |
Check if any aggregated Objects have non-zero reference counts. | |
void | Construct (const AttributeConstructionList &attributes) |
Initialize all member variables registered as Attributes of this TypeId. | |
void | DoDelete () |
Attempt to delete this Object. | |
Ptr< Object > | DoGetObject (TypeId tid) const |
Find an Object of TypeId tid in the aggregates of this Object. | |
void | SetTypeId (TypeId tid) |
Set the TypeId of this Object. | |
void | UpdateSortedArray (Aggregates *aggregates, uint32_t i) const |
Keep the list of aggregates in most-recently-used order. | |
Private Attributes | |
Aggregates * | m_aggregates |
A pointer to an array of 'aggregates'. | |
bool | m_disposed |
Set to true when the DoDispose() method of the Object has run, false otherwise. | |
uint32_t | m_getObjectCount |
The number of times the Object was accessed with a call to GetObject(). | |
bool | m_initialized |
Set to true once the DoInitialize() method has run, false otherwise. | |
TypeId | m_tid |
Identifies the type of this Object instance. | |
std::vector< Ptr< Object > > | m_unidirectionalAggregates |
An array of unidirectional aggregates, i.e., objects that are aggregated to the current object, but not vice-versa. | |
Friends | |
template<typename T > | |
Ptr< T > | CompleteConstruct (T *object) |
Set the TypeId and construct all Attributes of an Object. | |
class | ObjectFactory |
Friends. | |
class | AggregateIterator |
Friends. | |
struct | ObjectDeleter |
Friends. | |
template<typename T > | |
Ptr< T > | CopyObject (Ptr< T > object) |
Copy an Object. | |
template<typename T > | |
Ptr< T > | CopyObject (Ptr< const T > object) |
Additional Inherited Members | |
Related Symbols inherited from ns3::ObjectBase | |
static TypeId | GetObjectIid () |
Ensure the TypeId for ObjectBase gets fully configured to anchor the inheritance tree properly. | |
A base class which provides memory management and object aggregation.
The memory management scheme is based on reference-counting with dispose-like functionality to break the reference cycles. The reference count is incremented and decremented with the methods Ref() and Unref(). If a reference cycle is present, the user is responsible for breaking it by calling Dispose() in a single location. This will eventually trigger the invocation of DoDispose() on itself and all its aggregates. The DoDispose() method is always automatically invoked from the Unref() method before destroying the Object, even if the user did not call Dispose() directly.
ns3::Object::Object | ( | ) |
Constructor.
Definition at line 96 of file object.cc.
References ns3::Object::Aggregates::buffer, m_aggregates, ns3::Object::Aggregates::n, and NS_LOG_FUNCTION.
|
override |
Destructor.
Definition at line 108 of file object.cc.
References ns3::Object::Aggregates::buffer, m_aggregates, m_unidirectionalAggregates, ns3::Object::Aggregates::n, and NS_LOG_FUNCTION.
|
protected |
Copy an Object.
[in] | o | the Object to copy. |
Allow subclasses to implement a copy constructor.
While it is technically possible to implement a copy constructor in a subclass, we strongly discourage you from doing so. If you really want to do it anyway, you have to understand that this copy constructor will not copy aggregated Objects, i.e, if your Object instance is already aggregated to another Object and if you invoke this copy constructor, the new Object instance will be a pristine standalone Object instance not aggregated to any other Object. It is thus your responsibility as a caller of this method to do what needs to be done (if it is needed) to ensure that the Object stays in a valid state.
Definition at line 134 of file object.cc.
References ns3::Object::Aggregates::buffer, m_aggregates, and ns3::Object::Aggregates::n.
Aggregate two Objects together.
[in] | other | The other Object pointer |
This method aggregates the two Objects together: after this method returns, it becomes possible to call GetObject() on one to get the other, and vice-versa.
This method calls the virtual method NotifyNewAggregates() to notify all aggregated Objects that they have been aggregated together.
Definition at line 298 of file object.cc.
References ns3::Object::Aggregates::buffer, CheckLoose(), DoGetObject(), GetInstanceTypeId(), m_aggregates, m_disposed, ns3::Object::Aggregates::n, NotifyNewAggregate(), NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, ns3::PeekPointer(), and UpdateSortedArray().
Referenced by ns3::Ipv6L3Protocol::Ipv6L3Protocol(), AcousticModemEnergyDepletionTestCase::DoRun(), AcousticModemEnergyTestCase::DoRun(), BuildingsChannelConditionModelTestCase::DoRun(), BuildingsPenetrationLossesTestCase::DoRun(), LiIonEnergyTestCase::DoRun(), TcFlowControlTestCase::DoRun(), ThreeGppAntennaSetupChangedTest::DoRun(), ThreeGppCalcLongTermMultiPortTest::DoRun(), ThreeGppChannelConditionModelTestCase::DoRun(), ThreeGppChannelMatrixComputationTest::DoRun(), ThreeGppChannelMatrixUpdateTest::DoRun(), ThreeGppIndoorOfficePropagationLossModelTestCase::DoRun(), ThreeGppMimoPolarizationTest::DoRun(), ThreeGppRmaPropagationLossModelTestCase::DoRun(), ThreeGppSpectrumPropagationLossModelTest::DoRun(), ThreeGppUmaPropagationLossModelTestCase::DoRun(), ThreeGppUmiPropagationLossModelTestCase::DoRun(), ThreeGppV2vBuildingsChCondModelTestCase::DoRun(), ThreeGppV2vHighwayLosNlosvChCondModelTestCase::DoRun(), ThreeGppV2vHighwayPropagationLossModelTestCase::DoRun(), ThreeGppV2vUrbanLosNlosvChCondModelTestCase::DoRun(), ThreeGppV2vUrbanPropagationLossModelTestCase::DoRun(), V2vHighwayProbChCondModelTestCase::DoRun(), V2vUrbanProbChCondModelTestCase::DoRun(), WaypointLazyNotifyFalse::DoRun(), WaypointLazyNotifyTrue::DoRun(), TestWifiPhyRxTraceHelperYans::DoSetup(), experiment(), AnimationRemainingEnergyTestCase::PrepareNetwork(), ns3::Ipv6L3Protocol::RegisterExtensions(), ns3::Ipv6L3Protocol::RegisterOptions(), TbfQueueDiscTestCase::RunTbfTest(), ThreeGppShadowingTestCase::RunTest(), and ThreeGppNTNPropagationLossModelTestCase::TestChannelGain().
|
private |
Verify that this Object is still live, by checking it's reference count.
true
if the reference count is non zero. Definition at line 447 of file object.cc.
References ns3::SimpleRefCount< Object, ObjectBase, ObjectDeleter >::GetReferenceCount(), and NS_LOG_FUNCTION.
Referenced by SetTypeId().
|
private |
Check if any aggregated Objects have non-zero reference counts.
true
if any of our aggregates have non zero reference count.In some cases, when an event is scheduled against a subclass of Object, and if no one owns a reference directly to this Object, the Object is alive, has a refcount of zero and the method run when the event expires runs against the raw pointer, which means that we are manipulating an Object with a refcount of zero. So, instead we check the aggregate reference count.
Definition at line 461 of file object.cc.
References ns3::Object::Aggregates::buffer, ns3::SimpleRefCount< T, PARENT, DELETER >::GetReferenceCount(), m_aggregates, ns3::Object::Aggregates::n, and NS_LOG_FUNCTION.
Referenced by AggregateObject(), DoGetObject(), and UnidirectionalAggregateObject().
|
private |
Initialize all member variables registered as Attributes of this TypeId.
[in] | attributes | The attribute values used to initialize the member variables of this Object's instance. |
Invoked from ns3::ObjectFactory::Create and ns3::CreateObject only. Initialize all the member variables which were registered with the associated TypeId.
Definition at line 146 of file object.cc.
References ns3::ObjectBase::ConstructSelf(), and NS_LOG_FUNCTION.
void ns3::Object::Dispose | ( | ) |
Dispose of this Object.
Run the DoDispose() methods of this Object and all the Objects aggregated to it. After calling this method, this Object is expected to be totally unusable except for the Ref() and Unref() methods.
This method is typically used to break reference cycles.
Note: the code here is a bit tricky because we need to protect ourselves from modifications in the aggregate array while DoDispose is called. The user's DoDispose implementation could call GetObject (which could reorder the array) and it could call AggregateObject which would add an object at the end of the array. So, to be safe, we restart the iteration over the array whenever we call some user code.
Definition at line 247 of file object.cc.
References ns3::Object::Aggregates::buffer, DoDispose(), m_aggregates, m_disposed, m_unidirectionalAggregates, ns3::Object::Aggregates::n, and NS_LOG_FUNCTION.
Referenced by ns3::ApWifiMac::DoDispose(), ns3::NoBackhaulEpcHelper::DoDispose(), ns3::SimpleNetDevice::DoDispose(), ns3::WifiMac::DoDispose(), ns3::WifiNetDevice::DoDispose(), SpectrumWifiPhyFilterTest::DoTeardown(), SpectrumWifiPhyTrackedBandsTest::DoTeardown(), TestDlMuMimoPhyTransmission::DoTeardown(), TestDlOfdmaPhyPuncturing::DoTeardown(), TestDlOfdmaPhyTransmission::DoTeardown(), TestMultipleCtsResponsesFromMuRts::DoTeardown(), TestMultipleHeTbPreambles::DoTeardown(), TestPhyPaddingExclusion::DoTeardown(), TestUlOfdmaPhyTransmission::DoTeardown(), TestUlOfdmaPpduUid::DoTeardown(), and TestWifiPhyRxTraceHelperYans::DoTeardown().
|
private |
Attempt to delete this Object.
This method iterates over all aggregated Objects to check if they all have a zero refcount. If yes, the Object and all its aggregates are deleted. If not, nothing is done.
Definition at line 479 of file object.cc.
References ns3::Object::Aggregates::buffer, DoDispose(), ns3::SimpleRefCount< T, PARENT, DELETER >::GetReferenceCount(), m_aggregates, m_disposed, ns3::Object::Aggregates::n, and NS_LOG_FUNCTION.
|
protectedvirtual |
Destructor implementation.
This method is called by Dispose() or by the Object's destructor, whichever comes first.
Subclasses are expected to implement their real destruction code in an overridden version of this method and chain up to their parent's implementation once they are done. i.e, for simplicity, the destructor of every subclass should be empty and its content should be moved to the associated DoDispose() method.
It is safe to call GetObject() from within this method.
Reimplemented in anonymous_namespace{object-test-suite.cc}::DerivedA, anonymous_namespace{object-test-suite.cc}::DerivedB, EpsBearerTagUdpClient, MuMimoSpectrumWifiPhy, MuRtsCtsSpectrumWifiPhy, ns3::A2A4RsrqHandoverAlgorithm, ns3::A3RsrpHandoverAlgorithm, ns3::AcousticModemEnergyModel, ns3::AdvancedApEmlsrManager, ns3::AdvancedEmlsrManager, ns3::AlohaNoackNetDevice, ns3::aodv::RoutingProtocol, ns3::ApEmlsrManager, ns3::Application, ns3::ApWifiMac, ns3::ArpCache, ns3::ArpL3Protocol, ns3::BandwidthManager, ns3::BaseStationNetDevice, ns3::BlockAckManager, ns3::BridgeNetDevice, ns3::BsServiceFlowManager, ns3::Building, ns3::BuildingListPriv, ns3::BulkSendApplication, ns3::BurstProfileManager, ns3::CcHelper, ns3::ChannelAccessManager, ns3::ChannelListPriv, ns3::CobaltQueueDisc, ns3::ComponentCarrier, ns3::ComponentCarrierEnb, ns3::ComponentCarrierUe, ns3::ConnectionManager, ns3::CounterCalculator< T >, ns3::CounterCalculator< uint32_t >, ns3::CqaFfMacScheduler, ns3::CsmaNetDevice, ns3::DataCalculator, ns3::DataCollector, ns3::DataOutputInterface, ns3::DefaultSimulatorImpl, ns3::DhcpClient, ns3::DhcpServer, ns3::DistributedSimulatorImpl, ns3::dot11s::HwmpProtocol, ns3::dot11s::HwmpRtable, ns3::dot11s::PeerLink, ns3::dot11s::PeerManagementProtocol, ns3::Dot11sStack, ns3::dsdv::RoutingProtocol, ns3::dsr::DsrRouting, ns3::EhtFrameExchangeManager, ns3::EmlsrManager, ns3::EmuEpcHelper, ns3::energy::BasicEnergyHarvester, ns3::energy::BasicEnergySource, ns3::energy::EnergyHarvester, ns3::energy::EnergyHarvesterContainer, ns3::energy::EnergySource, ns3::energy::EnergySourceContainer, ns3::energy::GenericBatteryModel, ns3::energy::LiIonEnergySource, ns3::energy::RvBatteryModel, ns3::energy::SimpleDeviceEnergyModel, ns3::EpcEnbApplication, ns3::EpcHelper, ns3::EpcMmeApplication, ns3::EpcPgwApplication, ns3::EpcSgwApplication, ns3::EpcTestRrc, ns3::EpcUeNas, ns3::EpcX2, ns3::FdBetFfMacScheduler, ns3::FdMtFfMacScheduler, ns3::FdNetDevice, ns3::FdTbfqFfMacScheduler, ns3::FfMacScheduler, ns3::flame::FlameProtocol, ns3::flame::FlameRtable, ns3::FlameStack, ns3::FlowMonitor, ns3::FlowProbe, ns3::FrameExchangeManager, ns3::GaussMarkovMobilityModel, ns3::GlobalRouter, ns3::HalfDuplexIdealPhy, ns3::HeFrameExchangeManager, ns3::HtFrameExchangeManager, ns3::Icmpv4L4Protocol, ns3::Icmpv6L4Protocol, ns3::InterferenceHelper, ns3::Ipv4ClickRouting, ns3::Ipv4FlowProbe, ns3::Ipv4GlobalRouting, ns3::Ipv4Interface, ns3::Ipv4L3ClickProtocol, ns3::Ipv4L3Protocol, ns3::Ipv4ListRouting, ns3::Ipv4RawSocketImpl, ns3::Ipv4StaticRouting, ns3::Ipv6ExtensionDemux, ns3::Ipv6ExtensionFragment, ns3::Ipv6ExtensionRoutingDemux, ns3::Ipv6FlowProbe, ns3::Ipv6Interface, ns3::Ipv6L3Protocol, ns3::Ipv6ListRouting, ns3::Ipv6OptionDemux, ns3::Ipv6PmtuCache, ns3::Ipv6RawSocketImpl, ns3::Ipv6StaticRouting, ns3::JakesProcess, ns3::JakesPropagationLossModel, ns3::LoopbackNetDevice, ns3::lorawan::LoraRadioEnergyModel, ns3::lrwpan::LrWpanCsmaCa, ns3::lrwpan::LrWpanMac, ns3::lrwpan::LrWpanNetDevice, ns3::lrwpan::LrWpanPhy, ns3::LteAnr, ns3::LteEnbComponentCarrierManager, ns3::LteEnbMac, ns3::LteEnbNetDevice, ns3::LteEnbPhy, ns3::LteEnbRrc, ns3::LteEnbRrcProtocolIdeal, ns3::LteEnbRrcProtocolReal, ns3::LteFfrAlgorithm, ns3::LteFfrDistributedAlgorithm, ns3::LteFfrEnhancedAlgorithm, ns3::LteFfrSimple, ns3::LteFfrSoftAlgorithm, ns3::LteFrHardAlgorithm, ns3::LteFrNoOpAlgorithm, ns3::LteFrSoftAlgorithm, ns3::LteFrStrictAlgorithm, ns3::LteHandoverAlgorithm, ns3::LteHelper, ns3::LteHexGridEnbTopologyHelper, ns3::LteInterference, ns3::LteNetDevice, ns3::LtePdcp, ns3::LtePhy, ns3::LteRlc, ns3::LteRlcAm, ns3::LteRlcSm, ns3::LteRlcTm, ns3::LteRlcUm, ns3::LteSimpleHelper, ns3::LteSimpleNetDevice, ns3::LteSimpleSpectrumPhy, ns3::LteSpectrumPhy, ns3::LteTestMac, ns3::LteTestPdcp, ns3::LteTestRrc, ns3::LteTestUePhy, ns3::LteUeComponentCarrierManager, ns3::LteUeMac, ns3::LteUeNetDevice, ns3::LteUePhy, ns3::LteUePowerControl, ns3::LteUeRrc, ns3::LteUeRrcProtocolIdeal, ns3::LteUeRrcProtocolReal, ns3::MeshPointDevice, ns3::MeshWifiInterfaceMac, ns3::MinMaxAvgTotalCalculator< T >, ns3::MinMaxAvgTotalCalculator< double >, ns3::MinMaxAvgTotalCalculator< uint32_t >, ns3::MinMaxAvgTotalCalculator< uint64_t >, ns3::MockNetDevice, ns3::MpduAggregator, ns3::MpiReceiver, ns3::MsduAggregator, ns3::MultiModelSpectrumChannel, ns3::MultiUserScheduler, ns3::NdiscCache, ns3::NetDeviceQueueInterface, ns3::NoBackhaulEpcHelper, ns3::Node, ns3::NodeListPriv, ns3::NonCommunicatingNetDevice, ns3::NoOpComponentCarrierManager, ns3::NoOpHandoverAlgorithm, ns3::NullMessageSimulatorImpl, ns3::ObssPdAlgorithm, ns3::olsr::RoutingProtocol, ns3::OmnetDataOutput, ns3::OnOffApplication, ns3::OpenFlowSwitchNetDevice, ns3::PacketBurst, ns3::PacketCounterCalculator, ns3::PacketSink, ns3::PacketSizeMinMaxAvgTotalCalculator, ns3::PacketSocket, ns3::PacketSocketClient, ns3::PacketSocketServer, ns3::PfFfMacScheduler, ns3::PhasedArraySpectrumPropagationLossModel, ns3::PieQueueDisc, ns3::Ping, ns3::PointToPointEpcHelper, ns3::PointToPointNetDevice, ns3::PssFfMacScheduler, ns3::QosFrameExchangeManager, ns3::QosTxop, ns3::Queue< Item, Container >, ns3::Queue< Item >, ns3::Queue< ns3::Packet >, ns3::Queue< WifiMpdu, ns3::WifiMacQueueContainer >, ns3::QueueDisc, ns3::QueueDiscClass, ns3::RadioBearerStatsCalculator, ns3::RadioEnvironmentMapHelper, ns3::Radvd, ns3::RandomDirection2dMobilityModel, ns3::RandomWalk2dMobilityModel, ns3::RandomWalk2dOutdoorMobilityModel, ns3::RealtimeSimulatorImpl, ns3::RedQueueDisc, ns3::RemSpectrumPhy, ns3::Rip, ns3::RipNg, ns3::RrFfMacScheduler, ns3::RrMultiUserScheduler, ns3::ServiceFlowManager, ns3::ShannonSpectrumErrorModel, ns3::SimpleNetDevice, ns3::SimpleOfdmWimaxPhy, ns3::SimpleUeComponentCarrierManager, ns3::SingleModelSpectrumChannel, ns3::SixLowPanNetDevice, ns3::Socket, ns3::SpectrumAnalyzer, ns3::SpectrumChannel, ns3::SpectrumInterference, ns3::SpectrumPropagationLossModel, ns3::SpectrumTransmitFilter, ns3::SpectrumWifiPhy, ns3::SSLinkManager, ns3::SSScheduler, ns3::SsServiceFlowManager, ns3::StaWifiMac, ns3::SubscriberStationNetDevice, ns3::TapBridge, ns3::TbfQueueDisc, ns3::TcpL4Protocol, ns3::TcpSocketFactoryImpl, ns3::TdBetFfMacScheduler, ns3::TdMtFfMacScheduler, ns3::TdTbfqFfMacScheduler, ns3::ThreeGppChannelConditionModel, ns3::ThreeGppChannelModel, ns3::ThreeGppHttpClient, ns3::ThreeGppHttpServer, ns3::ThreeGppPropagationLossModel, ns3::ThreeGppSpectrumPropagationLossModel, ns3::TimeMinMaxAvgTotalCalculator, ns3::TrafficControlLayer, ns3::TtaFfMacScheduler, ns3::TwoRaySpectrumPropagationLossModel, ns3::Txop, ns3::UanChannel, ns3::UanMacAloha, ns3::UanMacCw, ns3::UanMacRc, ns3::UanMacRcGw, ns3::UanNetDevice, ns3::UanNoiseModel, ns3::UanPhyCalcSinr, ns3::UanPhyDual, ns3::UanPhyGen, ns3::UanPhyPer, ns3::UanPropModel, ns3::UanTransducerHd, ns3::UdpL4Protocol, ns3::UdpSocketFactoryImpl, ns3::UeManager, ns3::V4TraceRoute, ns3::VirtualNetDevice, ns3::VisualSimulatorImpl, ns3::WaveformGenerator, ns3::WaypointMobilityModel, ns3::WifiAckManager, ns3::WifiAssocManager, ns3::WifiDefaultAssocManager, ns3::WifiMac, ns3::WifiMacQueue, ns3::WifiMacQueueScheduler, ns3::WifiMacQueueSchedulerImpl< Priority, Compare >, ns3::WifiMacQueueSchedulerImpl< FcfsPrio >, ns3::WifiNetDevice, ns3::WifiPhy, ns3::WifiProtectionManager, ns3::WifiRadioEnergyModel, ns3::WifiRemoteStationManager, ns3::WifiSpectrumPhyInterface, ns3::WimaxConnection, ns3::WimaxNetDevice, ns3::WimaxPhy, ns3::YansWifiPhy, OfdmaSpectrumWifiPhy, Receiver, and Sender.
Definition at line 433 of file object.cc.
References m_disposed, NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by Dispose(), DoDelete(), anonymous_namespace{object-test-suite.cc}::DerivedA::DoDispose(), anonymous_namespace{object-test-suite.cc}::DerivedB::DoDispose(), ns3::AdvancedApEmlsrManager::DoDispose(), ns3::AdvancedEmlsrManager::DoDispose(), ns3::AlohaNoackNetDevice::DoDispose(), ns3::aodv::RoutingProtocol::DoDispose(), ns3::ApEmlsrManager::DoDispose(), ns3::Application::DoDispose(), ns3::ArpCache::DoDispose(), ns3::ArpL3Protocol::DoDispose(), ns3::BridgeNetDevice::DoDispose(), ns3::BuildingListPriv::DoDispose(), ns3::CcHelper::DoDispose(), ns3::ChannelListPriv::DoDispose(), ns3::ComponentCarrier::DoDispose(), ns3::ComponentCarrierEnb::DoDispose(), ns3::ComponentCarrierUe::DoDispose(), ns3::CsmaNetDevice::DoDispose(), ns3::DataCalculator::DoDispose(), ns3::DataCollector::DoDispose(), ns3::DataOutputInterface::DoDispose(), ns3::DefaultSimulatorImpl::DoDispose(), ns3::DistributedSimulatorImpl::DoDispose(), ns3::dsdv::RoutingProtocol::DoDispose(), ns3::dsr::DsrRouting::DoDispose(), ns3::EmlsrManager::DoDispose(), ns3::EpcHelper::DoDispose(), ns3::FdNetDevice::DoDispose(), ns3::FlowMonitor::DoDispose(), ns3::FlowProbe::DoDispose(), ns3::FrameExchangeManager::DoDispose(), ns3::GaussMarkovMobilityModel::DoDispose(), ns3::GlobalRouter::DoDispose(), ns3::HalfDuplexIdealPhy::DoDispose(), ns3::HeFrameExchangeManager::DoDispose(), ns3::Icmpv4L4Protocol::DoDispose(), ns3::Icmpv6L4Protocol::DoDispose(), ns3::Ipv4ClickRouting::DoDispose(), ns3::Ipv4GlobalRouting::DoDispose(), ns3::Ipv4Interface::DoDispose(), ns3::Ipv4L3ClickProtocol::DoDispose(), ns3::Ipv4L3Protocol::DoDispose(), ns3::Ipv4StaticRouting::DoDispose(), ns3::Ipv6ExtensionDemux::DoDispose(), ns3::Ipv6ExtensionFragment::DoDispose(), ns3::Ipv6ExtensionRoutingDemux::DoDispose(), ns3::Ipv6Interface::DoDispose(), ns3::Ipv6L3Protocol::DoDispose(), ns3::Ipv6OptionDemux::DoDispose(), ns3::Ipv6StaticRouting::DoDispose(), ns3::LoopbackNetDevice::DoDispose(), ns3::lrwpan::LrWpanMac::DoDispose(), ns3::lrwpan::LrWpanNetDevice::DoDispose(), ns3::lrwpan::LrWpanPhy::DoDispose(), ns3::LteHelper::DoDispose(), ns3::LteHexGridEnbTopologyHelper::DoDispose(), ns3::LteInterference::DoDispose(), ns3::LteNetDevice::DoDispose(), ns3::LtePhy::DoDispose(), ns3::LteSimpleHelper::DoDispose(), ns3::LteSimpleSpectrumPhy::DoDispose(), ns3::LteSpectrumPhy::DoDispose(), ns3::LteUeMac::DoDispose(), ns3::MeshPointDevice::DoDispose(), ns3::MockNetDevice::DoDispose(), ns3::MpduAggregator::DoDispose(), ns3::MsduAggregator::DoDispose(), ns3::MultiUserScheduler::DoDispose(), ns3::NdiscCache::DoDispose(), ns3::NetDeviceQueueInterface::DoDispose(), ns3::Node::DoDispose(), ns3::NodeListPriv::DoDispose(), ns3::NonCommunicatingNetDevice::DoDispose(), ns3::NullMessageSimulatorImpl::DoDispose(), ns3::olsr::RoutingProtocol::DoDispose(), ns3::OpenFlowSwitchNetDevice::DoDispose(), ns3::PointToPointNetDevice::DoDispose(), ns3::Queue< Item, Container >::DoDispose(), ns3::QueueDisc::DoDispose(), ns3::QueueDiscClass::DoDispose(), ns3::RandomDirection2dMobilityModel::DoDispose(), ns3::RandomWalk2dMobilityModel::DoDispose(), ns3::RandomWalk2dOutdoorMobilityModel::DoDispose(), ns3::RealtimeSimulatorImpl::DoDispose(), ns3::RemSpectrumPhy::DoDispose(), ns3::Rip::DoDispose(), ns3::RipNg::DoDispose(), ns3::ShannonSpectrumErrorModel::DoDispose(), ns3::SimpleNetDevice::DoDispose(), ns3::SixLowPanNetDevice::DoDispose(), ns3::SpectrumAnalyzer::DoDispose(), ns3::SpectrumInterference::DoDispose(), ns3::SpectrumTransmitFilter::DoDispose(), ns3::TapBridge::DoDispose(), ns3::TcpL4Protocol::DoDispose(), ns3::TcpSocketFactoryImpl::DoDispose(), ns3::TrafficControlLayer::DoDispose(), ns3::UanChannel::DoDispose(), ns3::UanMacAloha::DoDispose(), ns3::UanMacCw::DoDispose(), ns3::UanMacRc::DoDispose(), ns3::UanMacRcGw::DoDispose(), ns3::UanNetDevice::DoDispose(), ns3::UanNoiseModel::DoDispose(), ns3::UanPhyCalcSinr::DoDispose(), ns3::UanPhyDual::DoDispose(), ns3::UanPhyGen::DoDispose(), ns3::UanPhyPer::DoDispose(), ns3::UanPropModel::DoDispose(), ns3::UanTransducerHd::DoDispose(), ns3::UdpL4Protocol::DoDispose(), ns3::UdpSocketFactoryImpl::DoDispose(), ns3::VirtualNetDevice::DoDispose(), ns3::VisualSimulatorImpl::DoDispose(), ns3::WaypointMobilityModel::DoDispose(), ns3::WifiAckManager::DoDispose(), ns3::WifiNetDevice::DoDispose(), ns3::WifiProtectionManager::DoDispose(), and ns3::WimaxNetDevice::DoDispose().
Find an Object of TypeId tid in the aggregates of this Object.
[in] | tid | The TypeId we're looking for |
Definition at line 153 of file object.cc.
References ns3::Object::Aggregates::buffer, CheckLoose(), GetInstanceTypeId(), ns3::TypeId::GetParent(), GetTypeId(), m_aggregates, m_getObjectCount, m_unidirectionalAggregates, ns3::Object::Aggregates::n, NS_ASSERT, NS_LOG_FUNCTION, and UpdateSortedArray().
Referenced by AggregateObject(), GetObject(), GetObject(), and UnidirectionalAggregateObject().
|
protectedvirtual |
Initialize() implementation.
This method is called only once by Initialize(). If the user calls Initialize() multiple times, DoInitialize() is called only the first time.
Subclasses are expected to override this method and chain up to their parent's implementation once they are done. It is safe to call GetObject() and AggregateObject() from within this method.
Reimplemented in Emitter, Emitter, Emitter, Emitter, MuMimoSpectrumWifiPhy, MuRtsCtsSpectrumWifiPhy, ns3::A2A4RsrqHandoverAlgorithm, ns3::A3RsrpHandoverAlgorithm, ns3::AarfcdWifiManager, ns3::AarfWifiManager, ns3::AmrrWifiManager, ns3::aodv::RoutingProtocol, ns3::AparfWifiManager, ns3::Application, ns3::ApWifiMac, ns3::ArfWifiManager, ns3::CaraWifiManager, ns3::CcHelper, ns3::ChannelAccessManager, ns3::ComponentCarrierEnb, ns3::ComponentCarrierUe, ns3::dot11s::HwmpProtocol, ns3::dot11s::PeerManagementProtocol, ns3::energy::BasicEnergyHarvester, ns3::energy::BasicEnergySource, ns3::energy::EnergyHarvesterContainer, ns3::energy::EnergySourceContainer, ns3::energy::GenericBatteryModel, ns3::energy::LiIonEnergySource, ns3::energy::RvBatteryModel, ns3::FdNetDevice, ns3::HierarchicalMobilityModel, ns3::IdealWifiManager, ns3::Ipv4ClickRouting, ns3::Ipv4ListRouting, ns3::lrwpan::LrWpanMac, ns3::lrwpan::LrWpanNetDevice, ns3::lrwpan::LrWpanPhy, ns3::LteAnr, ns3::LteEnbNetDevice, ns3::LteEnbPhy, ns3::LteFfrDistributedAlgorithm, ns3::LteFfrEnhancedAlgorithm, ns3::LteFfrSimple, ns3::LteFfrSoftAlgorithm, ns3::LteFrHardAlgorithm, ns3::LteFrNoOpAlgorithm, ns3::LteFrSoftAlgorithm, ns3::LteFrStrictAlgorithm, ns3::LteHelper, ns3::LteRlcSm, ns3::LteSimpleHelper, ns3::LteSimpleNetDevice, ns3::LteUeNetDevice, ns3::LteUePhy, ns3::LteUePowerControl, ns3::LteUeRrc, ns3::MeshWifiInterfaceMac, ns3::MinstrelHtWifiManager, ns3::MinstrelWifiManager, ns3::MobilityBuildingInfo, ns3::MultiUserScheduler, ns3::Node, ns3::NoOpComponentCarrierManager, ns3::NoOpHandoverAlgorithm, ns3::olsr::RoutingProtocol, ns3::OnoeWifiManager, ns3::ParfWifiManager, ns3::QueueDisc, ns3::RandomDirection2dMobilityModel, ns3::RandomWalk2dMobilityModel, ns3::RandomWalk2dOutdoorMobilityModel, ns3::RandomWaypointMobilityModel, ns3::Rip, ns3::RipNg, ns3::RraaWifiManager, ns3::RrMultiUserScheduler, ns3::RrpaaWifiManager, ns3::SimpleUeComponentCarrierManager, ns3::SpectrumWifiPhy, ns3::StaWifiMac, ns3::SteadyStateRandomWaypointMobilityModel, ns3::ThreeGppHttpVariables, ns3::TraceFadingLossModel, ns3::TrafficControlLayer, ns3::Txop, ns3::UanNetDevice, ns3::UeManager, ns3::WifiMac, ns3::WifiNetDevice, ns3::WifiPhy, and OfdmaSpectrumWifiPhy.
Definition at line 440 of file object.cc.
References m_initialized, NS_ASSERT, and NS_LOG_FUNCTION.
Referenced by ns3::LteEnbRrc::ConfigureCarriers(), ns3::A2A4RsrqHandoverAlgorithm::DoInitialize(), ns3::A3RsrpHandoverAlgorithm::DoInitialize(), ns3::aodv::RoutingProtocol::DoInitialize(), ns3::Application::DoInitialize(), ns3::FdNetDevice::DoInitialize(), ns3::Ipv4ListRouting::DoInitialize(), ns3::lrwpan::LrWpanMac::DoInitialize(), ns3::lrwpan::LrWpanNetDevice::DoInitialize(), ns3::LteEnbPhy::DoInitialize(), ns3::LteFfrDistributedAlgorithm::DoInitialize(), ns3::LteFfrEnhancedAlgorithm::DoInitialize(), ns3::LteFfrSimple::DoInitialize(), ns3::LteFfrSoftAlgorithm::DoInitialize(), ns3::LteFrHardAlgorithm::DoInitialize(), ns3::LteFrNoOpAlgorithm::DoInitialize(), ns3::LteFrSoftAlgorithm::DoInitialize(), ns3::LteFrStrictAlgorithm::DoInitialize(), ns3::LteHelper::DoInitialize(), ns3::LteSimpleHelper::DoInitialize(), ns3::LteUePhy::DoInitialize(), ns3::Node::DoInitialize(), ns3::NoOpComponentCarrierManager::DoInitialize(), ns3::NoOpHandoverAlgorithm::DoInitialize(), ns3::QueueDisc::DoInitialize(), ns3::RandomDirection2dMobilityModel::DoInitialize(), ns3::RandomWalk2dMobilityModel::DoInitialize(), ns3::RandomWalk2dOutdoorMobilityModel::DoInitialize(), ns3::RandomWaypointMobilityModel::DoInitialize(), ns3::Rip::DoInitialize(), ns3::RipNg::DoInitialize(), ns3::SimpleUeComponentCarrierManager::DoInitialize(), ns3::SteadyStateRandomWaypointMobilityModel::DoInitialize(), ns3::TrafficControlLayer::DoInitialize(), ns3::UanNetDevice::DoInitialize(), ns3::WifiNetDevice::DoInitialize(), and Initialize().
Object::AggregateIterator ns3::Object::GetAggregateIterator | ( | ) | const |
Get an iterator to the Objects aggregated to this one.
If no Objects are aggregated to this Object, then, the returned iterator will be empty and AggregateIterator::HasNext() will always return false
.
Definition at line 418 of file object.cc.
References AggregateIterator, and NS_LOG_FUNCTION.
|
overridevirtual |
Get the most derived TypeId for this Object.
This method is typically implemented by ns3::Object::GetInstanceTypeId but some classes which derive from ns3::ObjectBase directly have to implement it themselves.
Implements ns3::ObjectBase.
Reimplemented in anonymous_namespace{sequence-number-test-suite.cc}::SequenceNumberTestObj, ns3::PointToPointEpcHelper, ns3::RttEstimator, ns3::RttMeanDeviation, ns3::TcpOption, ns3::TcpOptionEnd, ns3::TcpOptionMSS, ns3::TcpOptionNOP, ns3::TcpOptionSack, ns3::TcpOptionSackPermitted, ns3::TcpOptionTS, ns3::TcpOptionUnknown, ns3::TcpOptionWinScale, ns3::TcpSocketBase, and ns3::TrafficControlLayer.
Definition at line 83 of file object.cc.
References m_tid, and NS_LOG_FUNCTION.
Referenced by AggregateObject(), ns3::cell_data_function_col_0(), ns3::cell_tooltip_callback(), DoGetObject(), ns3::RandomVariableStream::GetInteger(), ns3::RandomVariableStream::SetStream(), and UnidirectionalAggregateObject().
|
inline |
Get a pointer to the requested aggregated Object.
If the type of object requested is ns3::Object, a Ptr to the calling object is returned.
T | [explicit] The type of the aggregated Object to retrieve. |
Definition at line 511 of file object.h.
References ns3::Object::Aggregates::buffer, DoGetObject(), m_aggregates, and ns3::PeekPointer().
Referenced by ns3::NoBackhaulEpcHelper::NoBackhaulEpcHelper(), ns3::DhcpClient::AcceptAck(), ns3::Ipv6Interface::AddAddress(), ns3::Ipv4L3ClickProtocol::AddInterface(), ns3::Ipv4L3Protocol::AddInterface(), ns3::Ipv6L3Protocol::AddInterface(), ns3::FileHelper::AddProbe(), ns3::GnuplotHelper::AddProbe(), ns3::EpcX2::AddX2Interface(), ns3::LteUeRrc::ApplyRadioResourceConfigDedicated(), ns3::UdpSocketImpl::Bind(), ns3::UdpSocketImpl::BindToNetDevice(), ns3::LteHelper::ChannelModelInitialization(), ns3::GlobalRouteManagerImpl::CheckForStubNode(), ns3::Ipv4RawSocketImpl::Close(), ns3::Ipv6RawSocketImpl::Close(), ns3::ArpL3Protocol::CreateCache(), ns3::olsr::HelloRegressionTest::CreateNodes(), ns3::olsr::TcRegressionTest::CreateNodes(), ns3::Ipv4RawSocketFactoryImpl::CreateSocket(), ns3::Ipv6RawSocketFactoryImpl::CreateSocket(), ns3::PacketSocketFactory::CreateSocket(), ns3::GlobalRouter::DiscoverLSAs(), ns3::Icmpv6L4Protocol::DoDAD(), ns3::Ipv4ClickRouting::DoInitialize(), ns3::MobilityBuildingInfo::DoInitialize(), ns3::olsr::RoutingProtocol::DoInitialize(), ns3::Rip::DoInitialize(), ns3::RipNg::DoInitialize(), ns3::WifiRadioEnergyModelHelper::DoInstall(), AcousticModemEnergyDepletionTestCase::DoRun(), AcousticModemEnergyTestCase::DoRun(), BridgeTest::DoRun(), BuildingsHelperOneTestCase::DoRun(), CarrierAggregationTestCase::DoRun(), DsssModulationTest::DoRun(), IpAddressHelperTestCasev6::DoRun(), Ipv4DeduplicationTest::DoRun(), Issue211Test::DoRun(), LanTest::DoRun(), LenaCqaFfMacSchedulerTestCase1::DoRun(), LenaCqaFfMacSchedulerTestCase2::DoRun(), LenaDataPhyErrorModelTestCase::DoRun(), LenaDlCtrlPhyErrorModelTestCase::DoRun(), LenaFdBetFfMacSchedulerTestCase1::DoRun(), LenaFdBetFfMacSchedulerTestCase2::DoRun(), LenaFdMtFfMacSchedulerTestCase::DoRun(), LenaFdTbfqFfMacSchedulerTestCase1::DoRun(), LenaFdTbfqFfMacSchedulerTestCase2::DoRun(), LenaHarqTestCase::DoRun(), LenaMimoTestCase::DoRun(), LenaPfFfMacSchedulerTestCase1::DoRun(), LenaPfFfMacSchedulerTestCase2::DoRun(), LenaPssFfMacSchedulerTestCase1::DoRun(), LenaPssFfMacSchedulerTestCase2::DoRun(), LenaRrFfMacSchedulerTestCase::DoRun(), LenaTdBetFfMacSchedulerTestCase1::DoRun(), LenaTdBetFfMacSchedulerTestCase2::DoRun(), LenaTdMtFfMacSchedulerTestCase::DoRun(), LenaTdTbfqFfMacSchedulerTestCase1::DoRun(), LenaTdTbfqFfMacSchedulerTestCase2::DoRun(), LenaTtaFfMacSchedulerTestCase::DoRun(), LinkTest::DoRun(), LteDistributedFfrAreaTestCase::DoRun(), LteDownlinkPowerControlTestCase::DoRun(), LteEnbAntennaTestCase::DoRun(), LteEnhancedFfrAreaTestCase::DoRun(), LteHardFrTestCase::DoRun(), LteInterferenceHardFrTestCase::DoRun(), LteInterferenceStrictFrTestCase::DoRun(), LteInterferenceTestCase::DoRun(), LteLinkAdaptationTestCase::DoRun(), LtePathlossModelSystemTestCase::DoRun(), LteRadioLinkFailureTestCase::DoRun(), LteRrcConnectionEstablishmentErrorTestCase::DoRun(), LteSoftFfrAreaTestCase::DoRun(), LteSoftFrAreaTestCase::DoRun(), LteStrictFrAreaTestCase::DoRun(), LteStrictFrTestCase::DoRun(), LteUeMeasurementsPiecewiseTestCase1::DoRun(), LteUeMeasurementsPiecewiseTestCase2::DoRun(), LteUeMeasurementsPiecewiseTestCase3::DoRun(), LteUplinkClosedLoopPowerControlAbsoluteModeTestCase::DoRun(), LteUplinkClosedLoopPowerControlAccumulatedModeTestCase::DoRun(), LteUplinkOpenLoopPowerControlTestCase::DoRun(), LteX2HandoverMeasuresTestCase::DoRun(), NixVectorRoutingTest::DoRun(), ns3::LenaDeactivateBearerTestCase::DoRun(), OutdoorRandomWalkTestCase::DoRun(), OverallGainAverageTest::DoRun(), PointerAttributeTestCase::DoRun(), SpectrumIdealPhyTestCase::DoRun(), SteadyStateRandomWaypointTest::DoRun(), TwoBridgeTest::DoRun(), TwoLanTest::DoRun(), TwoLinkTest::DoRun(), WaveformGeneratorTestCase::DoRun(), WaypointMobilityModelAddWaypointTest::DoRun(), WaypointMobilityModelNotifyTest::DoRun(), WaypointMobilityModelViaHelper::DoRun(), WifiAcMappingTest::DoRun(), WifiUseAvailBwTest::DoRun(), ns3::UdpSocketImpl::DoSendTo(), ns3::UdpSocketImpl::DoSendTo(), ns3::Ipv4Interface::DoSetup(), ns3::Ipv6Interface::DoSetup(), PingTestCase::DoSetup(), TestUlOfdmaPowerControl::DoSetup(), experiment(), ns3::Icmpv4L4Protocol::Forward(), ns3::Icmpv6L4Protocol::Forward(), ns3::Icmpv6L4Protocol::FunctionDadTimeout(), ns3::WaveformGenerator::GenerateWaveform(), ns3::Ipv6ExtensionFragment::GetFragments(), ns3::AnimationInterface::GetIpv4Address(), ns3::AnimationInterface::GetIpv4Addresses(), ns3::AnimationInterface::GetIpv6Address(), ns3::AnimationInterface::GetIpv6Addresses(), ns3::NoBackhaulEpcHelper::GetUeDefaultGatewayAddress(), ns3::NoBackhaulEpcHelper::GetUeDefaultGatewayAddress6(), ns3::Ipv6ExtensionFragment::HandleFragmentsTimeout(), ns3::Icmpv6L4Protocol::HandleNS(), ns3::Icmpv6L4Protocol::HandlePacketTooBig(), ns3::Icmpv6L4Protocol::HandleRA(), ns3::Radvd::HandleRead(), ns3::Icmpv6L4Protocol::HandleRedirection(), ns3::Icmpv6L4Protocol::HandleRS(), ns3::CsmaHelper::Install(), ns3::CsmaHelper::Install(), ns3::GroupMobilityHelper::Install(), ns3::MobilityHelper::Install(), ns3::RadioEnvironmentMapHelper::Install(), ns3::SpectrumAnalyzerHelper::Install(), ns3::TvSpectrumTransmitterHelper::Install(), ns3::TvSpectrumTransmitterHelper::Install(), ns3::WaveformGeneratorHelper::Install(), ns3::TvSpectrumTransmitterHelper::InstallAdjacent(), ns3::TvSpectrumTransmitterHelper::InstallAdjacent(), ns3::LteHelper::InstallSingleEnbDevice(), ns3::LteHelper::InstallSingleUeDevice(), ns3::Ipv6RawSocketImpl::Ipv6JoinGroup(), ns3::UdpSocketImpl::Ipv6JoinGroup(), ns3::MobilityBuildingInfo::IsIndoor(), ns3::DhcpClient::LinkStateHandler(), ns3::Ipv6L3Protocol::LocalDeliver(), ns3::aodv::RoutingProtocol::NotifyAddAddress(), ns3::dsdv::RoutingProtocol::NotifyAddAddress(), ns3::aodv::RoutingProtocol::NotifyInterfaceDown(), ns3::dsdv::RoutingProtocol::NotifyInterfaceDown(), ns3::aodv::RoutingProtocol::NotifyInterfaceUp(), ns3::dsdv::RoutingProtocol::NotifyInterfaceUp(), ns3::Rip::NotifyInterfaceUp(), ns3::RipNg::NotifyInterfaceUp(), ns3::ArpL3Protocol::NotifyNewAggregate(), ns3::dsr::DsrRouting::NotifyNewAggregate(), ns3::Icmpv4L4Protocol::NotifyNewAggregate(), ns3::Icmpv6L4Protocol::NotifyNewAggregate(), ns3::Ipv4L3ClickProtocol::NotifyNewAggregate(), ns3::Ipv4L3Protocol::NotifyNewAggregate(), ns3::Ipv6L3Protocol::NotifyNewAggregate(), ns3::MultiUserScheduler::NotifyNewAggregate(), ns3::TcpL4Protocol::NotifyNewAggregate(), ns3::TrafficControlLayer::NotifyNewAggregate(), ns3::UdpL4Protocol::NotifyNewAggregate(), ns3::aodv::RoutingProtocol::NotifyRemoveAddress(), ns3::dsdv::RoutingProtocol::NotifyRemoveAddress(), ns3::lrwpan::LrWpanPhy::PdDataRequest(), ns3::aodv::RoutingProtocol::PrintRoutingTable(), ns3::dsdv::RoutingProtocol::PrintRoutingTable(), ns3::Ipv4GlobalRouting::PrintRoutingTable(), ns3::Ipv4ListRouting::PrintRoutingTable(), ns3::Ipv4StaticRouting::PrintRoutingTable(), ns3::Ipv6ListRouting::PrintRoutingTable(), ns3::Ipv6StaticRouting::PrintRoutingTable(), ns3::olsr::RoutingProtocol::PrintRoutingTable(), ns3::Rip::PrintRoutingTable(), ns3::RipNg::PrintRoutingTable(), ns3::Ipv6ExtensionLooseRouting::Process(), ns3::Ipv6ExtensionRouting::Process(), ns3::Ipv6Extension::ProcessOptions(), ns3::dsr::DsrRouting::Receive(), ns3::Icmpv6L4Protocol::Receive(), ns3::Ping::Receive(), ns3::Rip::Receive(), ns3::RipNg::Receive(), ns3::TcpL4Protocol::Receive(), ns3::UdpL4Protocol::Receive(), ns3::olsr::RoutingProtocol::RecvOlsr(), ns3::Ipv6L3Protocol::RegisterExtensions(), ns3::Ipv6L3Protocol::RegisterOptions(), ns3::DhcpClient::RemoveAndStart(), ns3::Ipv6AutoconfiguredPrefix::RemoveMe(), ns3::Ipv4ListRouting::RouteInput(), ns3::Ipv6ListRouting::RouteInput(), ns3::olsr::RoutingProtocol::RouteInput(), ns3::olsr::RoutingProtocol::RouteOutput(), RoutingExperiment::Run(), Issue40TestCase::RunOne(), TestInterBssConstantObssPdAlgo::RunOne(), ns3::RadioEnvironmentMapHelper::RunOneIteration(), ns3::dsdv::RoutingProtocol::Send(), ns3::Ipv4Interface::Send(), ns3::Ipv6Interface::Send(), ns3::Radvd::Send(), ns3::ArpL3Protocol::SendArpRequest(), ns3::Icmpv4L4Protocol::SendMessage(), ns3::Icmpv6L4Protocol::SendMessage(), ns3::Icmpv6L4Protocol::SendMessage(), ns3::DhcpServer::SendOffer(), ns3::TcpL4Protocol::SendPacketV4(), ns3::TcpL4Protocol::SendPacketV6(), ns3::Icmpv6L4Protocol::SendRS(), ns3::Ipv4RawSocketImpl::SendTo(), ns3::Ipv6RawSocketImpl::SendTo(), ns3::GroupMobilityHelper::SetMemberPositionAllocator(), ns3::NetDeviceQueueInterface::SetNTxQueues(), ns3::MobilityHelper::SetPositionAllocator(), ns3::Ipv4L3ClickProtocol::SetPromisc(), ns3::GroupMobilityHelper::SetReferenceMobilityModel(), ns3::GroupMobilityHelper::SetReferencePositionAllocator(), UanExperiment::SetupCommunications(), ns3::UeManager::SetupDataRadioBearer(), WifiFilsFrameTest::SetupDevice(), ns3::TcpSocketBase::SetupEndpoint(), ns3::TcpSocketBase::SetupEndpoint6(), ns3::Ipv4L3ClickProtocol::SetupLoopback(), ns3::Ipv4L3Protocol::SetupLoopback(), ns3::Ipv6L3Protocol::SetupLoopback(), DsdvManetExample::SetupMobility(), UanExperiment::SetupPositions(), DualStackTestCase::SetUpSim(), ns3::TvSpectrumTransmitter::SetupTx(), ns3::DhcpClient::StartApplication(), ns3::DhcpServer::StartApplication(), ns3::Radvd::StartApplication(), Receiver::StartApplication(), Sender::StartApplication(), ns3::HalfDuplexIdealPhy::StartTx(), ns3::LteSpectrumPhy::StartTxDataFrame(), ns3::LteSpectrumPhy::StartTxDlCtrlFrame(), ns3::LteSpectrumPhy::StartTxUlSrsFrame(), ns3::DhcpClient::StopApplication(), and ns3::AnimationInterface::WriteNodeEnergies().
Specialization of () for objects of type ns3::Object.
Get a pointer to the requested aggregated Object by TypeId.
If the TypeId argument is ns3::Object, a Ptr to the calling object is returned.
T | [explicit] The type of the aggregated Object to retrieve. |
Definition at line 544 of file object.h.
References DoGetObject(), and ns3::PeekPointer().
Specialization of (TypeId tid) for objects of type ns3::Object.
Definition at line 563 of file object.h.
References DoGetObject(), and GetTypeId().
|
static |
Register this type.
Definition at line 90 of file object.cc.
References ns3::TypeId::SetParent().
Referenced by DoGetObject(), and GetObject().
void ns3::Object::Initialize | ( | ) |
Invoke DoInitialize on all Objects aggregated to this one.
This method calls the virtual DoInitialize() method on all the Objects aggregated to this Object. DoInitialize() will be called only once over the lifetime of an Object, just like DoDispose() is called only once.
Note: the code here is a bit tricky because we need to protect ourselves from modifications in the aggregate array while DoInitialize is called. The user's implementation of the DoInitialize method could call GetObject (which could reorder the array) and it could call AggregateObject which would add an object at the end of the array. To be safe, we restart iteration over the array whenever we call some user code, just in case.
Definition at line 203 of file object.cc.
References ns3::Object::Aggregates::buffer, DoInitialize(), m_aggregates, m_initialized, m_unidirectionalAggregates, ns3::Object::Aggregates::n, and NS_LOG_FUNCTION.
Referenced by ns3::BuildingListPriv::Add(), ns3::ChannelListPriv::Add(), ns3::NodeListPriv::Add(), ns3::Node::AddApplication(), ns3::Node::AddDevice(), ns3::LteHelper::ChannelModelInitialization(), ns3::ApWifiMac::DoInitialize(), ns3::UanNetDevice::DoInitialize(), ns3::WifiMac::DoInitialize(), SteadyStateRandomWaypointTest::DoRun(), WaypointMobilityModelAddWaypointTest::DoRun(), WaypointMobilityModelNotifyTest::DoRun(), ns3::LteHelper::InstallEnbDevice(), and ns3::LteSimpleHelper::InstallEnbDevice().
bool ns3::Object::IsInitialized | ( | ) | const |
Check if the object has been initialized.
Check if the object has been initialized.
true
if the object has been initialized. Definition at line 240 of file object.cc.
References m_initialized, and NS_LOG_FUNCTION.
Referenced by ns3::WifiPhy::DoChannelSwitch(), ns3::SpectrumWifiPhy::FinalizeChannelSwitch(), ns3::WifiPhy::GetDelayUntilChannelSwitch(), ns3::StaWifiMac::NotifyChannelSwitching(), ns3::WifiPhy::RegisterListener(), ns3::MultiUserScheduler::SetAccessReqInterval(), ns3::ThreeGppHttpVariables::SetEmbeddedObjectSizeMean(), ns3::ThreeGppHttpVariables::SetEmbeddedObjectSizeStdDev(), ns3::ThreeGppHttpVariables::SetMainObjectSizeMean(), ns3::ThreeGppHttpVariables::SetMainObjectSizeStdDev(), ns3::EmlsrManager::SetMainPhyId(), ns3::WifiPhy::SetOperatingChannel(), and ns3::WifiMac::SetQosSupported().
|
protectedvirtual |
Notify all Objects aggregated to this one of a new Object being aggregated.
This method is invoked whenever two sets of Objects are aggregated together. It is invoked exactly once for each Object in both sets. This method can be overridden by subclasses who wish to be notified of aggregation events. These subclasses must chain up to their base class NotifyNewAggregate() method.
It is safe to call GetObject() and AggregateObject() from within this method.
Reimplemented in ns3::ArpL3Protocol, ns3::dsr::DsrRouting, ns3::Icmpv4L4Protocol, ns3::Icmpv6L4Protocol, ns3::Ipv4L3ClickProtocol, ns3::Ipv4L3Protocol, ns3::Ipv6L3Protocol, ns3::MultiUserScheduler, ns3::NetDeviceQueueInterface, ns3::TcpL4Protocol, ns3::TrafficControlLayer, and ns3::UdpL4Protocol.
Definition at line 412 of file object.cc.
References NS_LOG_FUNCTION.
Referenced by AggregateObject(), ns3::ArpL3Protocol::NotifyNewAggregate(), ns3::dsr::DsrRouting::NotifyNewAggregate(), ns3::Icmpv4L4Protocol::NotifyNewAggregate(), ns3::Icmpv6L4Protocol::NotifyNewAggregate(), ns3::Ipv4L3ClickProtocol::NotifyNewAggregate(), ns3::Ipv4L3Protocol::NotifyNewAggregate(), ns3::Ipv6L3Protocol::NotifyNewAggregate(), ns3::MultiUserScheduler::NotifyNewAggregate(), ns3::NetDeviceQueueInterface::NotifyNewAggregate(), ns3::TcpL4Protocol::NotifyNewAggregate(), ns3::TrafficControlLayer::NotifyNewAggregate(), and ns3::UdpL4Protocol::NotifyNewAggregate().
|
private |
Set the TypeId of this Object.
[in] | tid | The TypeId value to set. |
Invoked from ns3::CreateObject only. Initialize the m_tid
member variable to keep track of the type of this Object instance.
Definition at line 425 of file object.cc.
References Check(), m_tid, NS_ASSERT, and NS_LOG_FUNCTION.
Aggregate an Object to another Object.
[in] | other | The other Object pointer |
This method aggregates the an object to another Object: after this method returns, it becomes possible to call GetObject() on the aggregating Object to get the other, but not vice-versa.
This method calls the virtual method NotifyNewAggregates() to notify all aggregated Objects that they have been aggregated together.
This method is useful only if there is the need to aggregate an object to more than one object at the same time, and should be avoided if not strictly necessary. In particular, objects aggregated with this method should be destroyed only after making sure that the objects they are aggregated to are destroyed as well. However, the destruction of the aggregating objects will take care of the unidirectional aggregated objects gracefully.
Beware that an object aggregated to another with this function behaves differently than other aggregates in the following ways. Suppose that Object B is aggregated unidirectionally:
Definition at line 368 of file object.cc.
References ns3::Object::Aggregates::buffer, CheckLoose(), DoGetObject(), GetInstanceTypeId(), m_aggregates, m_disposed, m_unidirectionalAggregates, ns3::Object::Aggregates::n, NS_ASSERT, NS_FATAL_ERROR, NS_LOG_FUNCTION, and ns3::PeekPointer().
|
private |
Keep the list of aggregates in most-recently-used order.
[in,out] | aggregates | The list of aggregated Objects. |
[in] | i | The most recently used entry in the list. |
Definition at line 284 of file object.cc.
References ns3::Object::Aggregates::buffer, m_getObjectCount, and NS_LOG_FUNCTION.
Referenced by AggregateObject(), and DoGetObject().
|
friend |
|
friend |
Copy an Object.
T | [deduced] The type of the Object being copied. |
[in] | object | A pointer to the object to copy. |
This method invoke the copy constructor of the input object and returns the new instance.
Definition at line 581 of file object.h.
Referenced by ns3::TcpSocketBase::TcpSocketBase(), ns3::TcpYeah::TcpYeah(), ns3::RttMeanDeviation::Copy(), ns3::TcpBbr::Fork(), ns3::TcpBic::Fork(), ns3::TcpClassicRecovery::Fork(), ns3::TcpCubic::Fork(), ns3::TcpDctcp::Fork(), ns3::TcpHighSpeed::Fork(), ns3::TcpHtcp::Fork(), ns3::TcpHybla::Fork(), ns3::TcpIllinois::Fork(), ns3::TcpLedbat::Fork(), ns3::TcpLinuxReno::Fork(), ns3::TcpLp::Fork(), ns3::TcpNewReno::Fork(), ns3::TcpPrrRecovery::Fork(), ns3::TcpScalable::Fork(), ns3::TcpSocketBase::Fork(), ns3::TcpSocketCongestedRouter::Fork(), ns3::TcpSocketMsgBase::Fork(), ns3::TcpSocketSmallAcks::Fork(), ns3::TcpVegas::Fork(), ns3::TcpVeno::Fork(), ns3::TcpYeah::Fork(), TcpDctcpCongestedRouter::Fork(), TcpSocketAdvertisedWindowProxy::Fork(), and TcpSocketHalfAck::Fork().
|
friend |
|
friend |
Friends.
Definition at line 357 of file object.h.
Referenced by ns3::LteHelper::SetEnbComponentCarrierManagerType(), ns3::LteHelper::SetFadingModel(), ns3::LteHelper::SetFfrAlgorithmType(), ns3::LteHelper::SetHandoverAlgorithmType(), ns3::LteHelper::SetPathlossModelType(), ns3::LteHelper::SetSchedulerType(), ns3::NetDeviceQueueInterface::SetTxQueuesType(), and ns3::LteHelper::SetUeComponentCarrierManagerType().
|
private |
A pointer to an array of 'aggregates'.
A pointer to each Object aggregated to this Object is stored in this array. The array is shared by all aggregated Objects so the size of the array is indirectly a reference count.
Definition at line 467 of file object.h.
Referenced by Object(), Object(), ~Object(), AggregateObject(), CheckLoose(), Dispose(), DoDelete(), DoGetObject(), GetObject(), ns3::Object::AggregateIterator::HasNext(), Initialize(), ns3::Object::AggregateIterator::Next(), and UnidirectionalAggregateObject().
|
private |
Set to true
when the DoDispose() method of the Object has run, false
otherwise.
Definition at line 454 of file object.h.
Referenced by AggregateObject(), Dispose(), DoDelete(), DoDispose(), and UnidirectionalAggregateObject().
|
private |
The number of times the Object was accessed with a call to GetObject().
This integer is used to implement a heuristic to sort the array of aggregates in most-frequently accessed order.
Definition at line 486 of file object.h.
Referenced by DoGetObject(), and UpdateSortedArray().
|
private |
Set to true
once the DoInitialize() method has run, false
otherwise.
Definition at line 459 of file object.h.
Referenced by DoInitialize(), Initialize(), and IsInitialized().
|
private |
Identifies the type of this Object instance.
Definition at line 449 of file object.h.
Referenced by GetInstanceTypeId(), and SetTypeId().
An array of unidirectional aggregates, i.e., objects that are aggregated to the current object, but not vice-versa.
This is useful (and suggested) only for Objects that should be aggregated to multiple other Objects, where the normal Aggregation would create an issue.
Definition at line 477 of file object.h.
Referenced by ~Object(), Dispose(), DoGetObject(), Initialize(), and UnidirectionalAggregateObject().