diff --git a/samples/main-adhoc-wifi.cc b/samples/main-adhoc-wifi.cc index 08823b155..5370f3a20 100644 --- a/samples/main-adhoc-wifi.cc +++ b/samples/main-adhoc-wifi.cc @@ -95,8 +95,8 @@ ReceivePacket (Ptr socket, Ptr packet, const Address &address) static Ptr SetupPacketReceive (Ptr node, uint16_t port) { - TypeId iid = TypeId::LookupByName ("Packet"); - Ptr socketFactory = node->QueryInterface (iid); + TypeId tid = TypeId::LookupByName ("Packet"); + Ptr socketFactory = node->QueryInterface (tid); Ptr sink = socketFactory->CreateSocket (); sink->Bind (); sink->SetRecvCallback (MakeCallback (&ReceivePacket)); diff --git a/samples/main-simple.cc b/samples/main-simple.cc index 69e0313f6..f70486ab7 100644 --- a/samples/main-simple.cc +++ b/samples/main-simple.cc @@ -42,8 +42,8 @@ RunSimulation (void) { Ptr a = CreateObject (); - TypeId iid = TypeId::LookupByName ("Udp"); - Ptr socketFactory = a->QueryInterface (iid); + TypeId tid = TypeId::LookupByName ("Udp"); + Ptr socketFactory = a->QueryInterface (tid); Ptr sink = socketFactory->CreateSocket (); InetSocketAddress local = InetSocketAddress (Ipv4Address::GetAny (), 80); diff --git a/src/applications/onoff/onoff-application.cc b/src/applications/onoff/onoff-application.cc index 4e1a5f7b4..af5409893 100644 --- a/src/applications/onoff/onoff-application.cc +++ b/src/applications/onoff/onoff-application.cc @@ -53,20 +53,20 @@ static NumericDefaultValue g_defaultSize ("OnOffApplicationPacketSize" OnOffApplication::OnOffApplication(Ptr n, const Address &remote, - std::string iid, + std::string tid, const RandomVariable& ontime, const RandomVariable& offtime) : Application(n), m_cbrRate (g_defaultRate.GetValue ()) { - Construct (n, remote, iid, + Construct (n, remote, tid, ontime, offtime, g_defaultSize.GetValue ()); } OnOffApplication::OnOffApplication(Ptr n, const Address &remote, - std::string iid, + std::string tid, const RandomVariable& ontime, const RandomVariable& offtime, DataRate rate, @@ -75,13 +75,13 @@ OnOffApplication::OnOffApplication(Ptr n, m_cbrRate (rate) { NS_LOG_FUNCTION; - Construct (n, remote, iid, ontime, offtime, size); + Construct (n, remote, tid, ontime, offtime, size); } void OnOffApplication::Construct (Ptr n, const Address &remote, - std::string iid, + std::string tid, const RandomVariable& onTime, const RandomVariable& offTime, uint32_t size) @@ -98,7 +98,7 @@ OnOffApplication::Construct (Ptr n, m_lastStartTime = Seconds (0); m_maxBytes = 0; m_totBytes = 0; - m_iid = iid; + m_tid = tid; } OnOffApplication::~OnOffApplication() @@ -154,8 +154,8 @@ void OnOffApplication::StartApplication() // Called at time specified by Start // Create the socket if not already if (!m_socket) { - TypeId iid = TypeId::LookupByName (m_iid); - Ptr socketFactory = GetNode ()->QueryInterface (iid); + TypeId tid = TypeId::LookupByName (m_tid); + Ptr socketFactory = GetNode ()->QueryInterface (tid); m_socket = socketFactory->CreateSocket (); m_socket->Bind (); m_socket->Connect (m_peer); diff --git a/src/applications/onoff/onoff-application.h b/src/applications/onoff/onoff-application.h index c16730cad..31ebb3c08 100644 --- a/src/applications/onoff/onoff-application.h +++ b/src/applications/onoff/onoff-application.h @@ -54,20 +54,20 @@ public: /** * \param n node associated to this application * \param remote remote ip address - * \param iid + * \param tid * \param ontime on time random variable * \param offtime off time random variable */ OnOffApplication(Ptr n, const Address &remote, - std::string iid, + std::string tid, const RandomVariable& ontime, const RandomVariable& offtime); /** * \param n node associated to this application * \param remote remote ip address - * \param iid + * \param tid * \param ontime on time random variable * \param offtime off time random variable * \param rate data rate when on @@ -75,7 +75,7 @@ public: */ OnOffApplication(Ptr n, const Address &remote, - std::string iid, + std::string tid, const RandomVariable& ontime, const RandomVariable& offtime, DataRate rate, @@ -110,7 +110,7 @@ private: void Construct (Ptr n, const Address &remote, - std::string iid, + std::string tid, const RandomVariable& ontime, const RandomVariable& offtime, uint32_t size); @@ -135,7 +135,7 @@ private: EventId m_startStopEvent; // Event id for next start or stop event EventId m_sendEvent; // Eventid of pending "send packet" event bool m_sending; // True if currently in sending state - std::string m_iid; + std::string m_tid; CallbackTraceSource > m_txTrace; private: diff --git a/src/applications/packet-sink/packet-sink.cc b/src/applications/packet-sink/packet-sink.cc index 44e245baf..1e53491c0 100644 --- a/src/applications/packet-sink/packet-sink.cc +++ b/src/applications/packet-sink/packet-sink.cc @@ -38,20 +38,20 @@ NS_LOG_COMPONENT_DEFINE ("PacketSinkApplication"); PacketSink::PacketSink (Ptr n, const Address &local, - std::string iid) + std::string tid) : Application(n) { - Construct (n, local, iid); + Construct (n, local, tid); } void PacketSink::Construct (Ptr n, const Address &local, - std::string iid) + std::string tid) { m_socket = 0; m_local = local; - m_iid = iid; + m_tid = tid; } PacketSink::~PacketSink() @@ -73,9 +73,9 @@ void PacketSink::StartApplication() // Called at time specified by Start // Create the socket if not already if (!m_socket) { - TypeId iid = TypeId::LookupByName (m_iid); + TypeId tid = TypeId::LookupByName (m_tid); Ptr socketFactory = - GetNode ()->QueryInterface (iid); + GetNode ()->QueryInterface (tid); m_socket = socketFactory->CreateSocket (); m_socket->Bind (m_local); } diff --git a/src/applications/packet-sink/packet-sink.h b/src/applications/packet-sink/packet-sink.h index 96fc7f98f..d4abe0ef7 100644 --- a/src/applications/packet-sink/packet-sink.h +++ b/src/applications/packet-sink/packet-sink.h @@ -56,11 +56,11 @@ public: /** * \param n node associated to this application * \param local local address to bind to - * \param iid string to identify transport protocol of interest + * \param tid string to identify transport protocol of interest */ PacketSink (Ptr n, const Address &local, - std::string iid); + std::string tid); virtual ~PacketSink (); @@ -75,13 +75,13 @@ private: void Construct (Ptr n, const Address &local, - std::string iid); + std::string tid); virtual void Receive (Ptr socket, Ptr packet, const Address& from); Ptr m_socket; // Associated socket Address m_local; // Local address to bind to - std::string m_iid; // Protocol name (e.g., "Udp") + std::string m_tid; // Protocol name (e.g., "Udp") CallbackTraceSource, const Address &> m_rxTrace; }; diff --git a/src/applications/udp-echo/udp-echo-client.cc b/src/applications/udp-echo/udp-echo-client.cc index 9ee4dfbc0..d25c19fb0 100644 --- a/src/applications/udp-echo/udp-echo-client.cc +++ b/src/applications/udp-echo/udp-echo-client.cc @@ -91,9 +91,9 @@ UdpEchoClient::StartApplication (void) if (!m_socket) { - TypeId iid = TypeId::LookupByName ("Udp"); + TypeId tid = TypeId::LookupByName ("Udp"); Ptr socketFactory = - GetNode ()->QueryInterface (iid); + GetNode ()->QueryInterface (tid); m_socket = socketFactory->CreateSocket (); m_socket->Bind (); m_socket->Connect (m_peer); diff --git a/src/applications/udp-echo/udp-echo-server.cc b/src/applications/udp-echo/udp-echo-server.cc index 2220bf68f..8dbfaf330 100644 --- a/src/applications/udp-echo/udp-echo-server.cc +++ b/src/applications/udp-echo/udp-echo-server.cc @@ -77,9 +77,9 @@ UdpEchoServer::StartApplication (void) if (!m_socket) { - TypeId iid = TypeId::LookupByName ("Udp"); + TypeId tid = TypeId::LookupByName ("Udp"); Ptr socketFactory = - GetNode ()->QueryInterface (iid); + GetNode ()->QueryInterface (tid); m_socket = socketFactory->CreateSocket (); m_socket->Bind (m_local); } diff --git a/src/common/error-model.cc b/src/common/error-model.cc index 8c11d573b..dbe1289a7 100644 --- a/src/common/error-model.cc +++ b/src/common/error-model.cc @@ -43,9 +43,9 @@ NS_OBJECT_ENSURE_REGISTERED (ErrorModel); TypeId ErrorModel::GetTypeId (void) { - static TypeId iid = TypeId ("ErrorModel") + static TypeId tid = TypeId ("ErrorModel") .SetParent (); - return iid; + return tid; } ErrorModel::ErrorModel () : @@ -127,10 +127,10 @@ NS_OBJECT_ENSURE_REGISTERED (RateErrorModel); TypeId RateErrorModel::GetTypeId (void) { - static TypeId iid = TypeId ("RateErrorModel") + static TypeId tid = TypeId ("RateErrorModel") .SetParent () .AddConstructor (); - return iid; + return tid; } @@ -248,10 +248,10 @@ NS_OBJECT_ENSURE_REGISTERED (ListErrorModel); TypeId ListErrorModel::GetTypeId (void) { - static TypeId iid = TypeId ("ListErrorModel") + static TypeId tid = TypeId ("ListErrorModel") .SetParent () .AddConstructor (); - return iid; + return tid; } ListErrorModel::ListErrorModel () diff --git a/src/core/interface-id-default-value.cc b/src/core/interface-id-default-value.cc index 87124d3b6..f4baf550a 100644 --- a/src/core/interface-id-default-value.cc +++ b/src/core/interface-id-default-value.cc @@ -4,12 +4,12 @@ namespace ns3 { TypeIdDefaultValue::TypeIdDefaultValue (std::string name, std::string help, - TypeId iid, + TypeId tid, std::string defaultValue) : DefaultValueBase (name, help), m_defaultName (defaultValue), m_name (defaultValue), - m_interfaceId (iid) + m_interfaceId (tid) { DefaultValueList::Add (this); } @@ -33,13 +33,13 @@ TypeIdDefaultValue::DoParseValue (const std::string &value) { for (uint32_t i = 0; i < TypeId::GetRegisteredN (); i++) { - TypeId iid = TypeId::GetRegistered (i); + TypeId tid = TypeId::GetRegistered (i); do { - if (iid.GetName () == value && - iid.HasConstructor ()) + if (tid.GetName () == value && + tid.HasConstructor ()) { // check that it really supports the requested interface. - TypeId tmp = iid; + TypeId tmp = tid; do { if (tmp == m_interfaceId) { @@ -49,8 +49,8 @@ TypeIdDefaultValue::DoParseValue (const std::string &value) tmp = tmp.GetParent (); } while (tmp != Object::GetTypeId ()); } - iid = iid.GetParent (); - } while (iid != Object::GetTypeId ()); + tid = tid.GetParent (); + } while (tid != Object::GetTypeId ()); } return false; } @@ -63,11 +63,11 @@ TypeIdDefaultValue::DoGetType (void) const bool first = true; for (uint32_t i = 0; i < TypeId::GetRegisteredN (); i++) { - TypeId iid = TypeId::GetRegistered (i); + TypeId tid = TypeId::GetRegistered (i); // can this interface id be used to create objects ? - if (iid.HasConstructor ()) + if (tid.HasConstructor ()) { - TypeId tmp = iid; + TypeId tmp = tid; // does this interface id supports the requested interface id ? do { if (tmp == m_interfaceId) @@ -77,7 +77,7 @@ TypeIdDefaultValue::DoGetType (void) const oss << "|"; first = false; } - oss << iid.GetName (); + oss << tid.GetName (); } tmp = tmp.GetParent (); } while (tmp != Object::GetTypeId ()); diff --git a/src/core/interface-id-default-value.h b/src/core/interface-id-default-value.h index 561459ba3..029367c17 100644 --- a/src/core/interface-id-default-value.h +++ b/src/core/interface-id-default-value.h @@ -12,14 +12,14 @@ public: /** * \param name the name of this default value. * \param help the help text associated to this default value - * \param iid the interface id which all objects created + * \param tid the interface id which all objects created * through this "default value" must support. * \param defaultValue the name of the object to create * by default. */ TypeIdDefaultValue (std::string name, std::string help, - TypeId iid, + TypeId tid, std::string defaultValue); /** * \returns the TypeId of the object selected by the user. diff --git a/src/core/object.cc b/src/core/object.cc index 91eed49bc..ee2581ce9 100644 --- a/src/core/object.cc +++ b/src/core/object.cc @@ -257,12 +257,12 @@ TypeId::TypeId (std::string name) { uint16_t uid = Singleton::Get ()->AllocateUid (name); NS_ASSERT (uid != 0); - m_iid = uid; + m_tid = uid; } -TypeId::TypeId (uint16_t iid) - : m_iid (iid) +TypeId::TypeId (uint16_t tid) + : m_tid (tid) {} TypeId::~TypeId () {} @@ -285,41 +285,41 @@ TypeId::GetRegistered (uint32_t i) } TypeId -TypeId::SetParent (TypeId iid) +TypeId::SetParent (TypeId tid) { - Singleton::Get ()->SetParent (m_iid, iid.m_iid); + Singleton::Get ()->SetParent (m_tid, tid.m_tid); return *this; } TypeId TypeId::GetParent (void) const { - uint16_t parent = Singleton::Get ()->GetParent (m_iid); + uint16_t parent = Singleton::Get ()->GetParent (m_tid); return TypeId (parent); } std::string TypeId::GetName (void) const { - std::string name = Singleton::Get ()->GetName (m_iid); + std::string name = Singleton::Get ()->GetName (m_tid); return name; } bool TypeId::HasConstructor (void) const { - bool hasConstructor = Singleton::Get ()->HasConstructor (m_iid); + bool hasConstructor = Singleton::Get ()->HasConstructor (m_tid); return hasConstructor; } void TypeId::DoAddConstructor (CallbackBase cb, uint32_t nArguments) { - Singleton::Get ()->AddConstructor (m_iid, cb, nArguments); + Singleton::Get ()->AddConstructor (m_tid, cb, nArguments); } CallbackBase TypeId::LookupConstructor (uint32_t nArguments) { - CallbackBase constructor = Singleton::Get ()->GetConstructor (m_iid, nArguments); + CallbackBase constructor = Singleton::Get ()->GetConstructor (m_tid, nArguments); return constructor; } @@ -335,12 +335,12 @@ TypeId::CreateObject (void) bool operator == (TypeId a, TypeId b) { - return a.m_iid == b.m_iid; + return a.m_tid == b.m_tid; } bool operator != (TypeId a, TypeId b) { - return a.m_iid != b.m_iid; + return a.m_tid != b.m_tid; } /********************************************************************* @@ -352,22 +352,22 @@ NS_OBJECT_ENSURE_REGISTERED (Object); static TypeId GetObjectIid (void) { - TypeId iid = TypeId ("Object"); - iid.SetParent (iid); - return iid; + TypeId tid = TypeId ("Object"); + tid.SetParent (tid); + return tid; } TypeId Object::GetTypeId (void) { - static TypeId iid = GetObjectIid (); - return iid; + static TypeId tid = GetObjectIid (); + return tid; } Object::Object () : m_count (1), - m_iid (Object::GetTypeId ()), + m_tid (Object::GetTypeId ()), m_disposed (false), m_collecting (false), m_next (this) @@ -377,18 +377,18 @@ Object::~Object () m_next = 0; } Ptr -Object::DoQueryInterface (TypeId iid) const +Object::DoQueryInterface (TypeId tid) const { NS_ASSERT (CheckLoose ()); const Object *currentObject = this; do { NS_ASSERT (currentObject != 0); - TypeId cur = currentObject->m_iid; - while (cur != iid && cur != Object::GetTypeId ()) + TypeId cur = currentObject->m_tid; + while (cur != tid && cur != Object::GetTypeId ()) { cur = cur.GetParent (); } - if (cur == iid) + if (cur == tid) { return const_cast (currentObject); } @@ -438,10 +438,10 @@ Object::TraceDisconnect (std::string path, const CallbackBase &cb) const } void -Object::SetTypeId (TypeId iid) +Object::SetTypeId (TypeId tid) { NS_ASSERT (Check ()); - m_iid = iid; + m_tid = tid; } void @@ -535,7 +535,7 @@ Object::DoCollectSources (std::string path, const TraceContext &context, { NS_ASSERT (current != 0); NS_LOG_LOGIC ("collect current=" << current); - TypeId cur = current->m_iid; + TypeId cur = current->m_tid; while (cur != Object::GetTypeId ()) { std::string name = cur.GetName (); @@ -592,10 +592,10 @@ class BaseA : public ns3::Object { public: static ns3::TypeId GetTypeId (void) { - static ns3::TypeId iid = ns3::TypeId ("BaseA") + static ns3::TypeId tid = ns3::TypeId ("BaseA") .SetParent (Object::GetTypeId ()) .AddConstructor (); - return iid; + return tid; } BaseA () {} @@ -617,10 +617,10 @@ class DerivedA : public BaseA { public: static ns3::TypeId GetTypeId (void) { - static ns3::TypeId iid = ns3::TypeId ("DerivedA") + static ns3::TypeId tid = ns3::TypeId ("DerivedA") .SetParent (BaseA::GetTypeId ()) .AddConstructor (); - return iid; + return tid; } DerivedA (int v) {} @@ -644,10 +644,10 @@ class BaseB : public ns3::Object { public: static ns3::TypeId GetTypeId (void) { - static ns3::TypeId iid = ns3::TypeId ("BaseB") + static ns3::TypeId tid = ns3::TypeId ("BaseB") .SetParent (Object::GetTypeId ()) .AddConstructor (); - return iid; + return tid; } BaseB () {} @@ -669,11 +669,11 @@ class DerivedB : public BaseB { public: static ns3::TypeId GetTypeId (void) { - static ns3::TypeId iid = ns3::TypeId ("DerivedB") + static ns3::TypeId tid = ns3::TypeId ("DerivedB") .SetParent (BaseB::GetTypeId ()) .AddConstructor () .AddConstructor (); - return iid; + return tid; } DerivedB (int v) {} diff --git a/src/core/object.h b/src/core/object.h index 4de7f6692..952a1f7ab 100644 --- a/src/core/object.h +++ b/src/core/object.h @@ -32,8 +32,8 @@ static struct X##type##RegistrationClass \ { \ X##type##RegistrationClass () { \ - ns3::TypeId iid = type::GetTypeId (); \ - iid.GetParent (); \ + ns3::TypeId tid = type::GetTypeId (); \ + tid.GetParent (); \ } \ } x_##type##RegistrationVariable @@ -63,7 +63,7 @@ public: static uint32_t GetRegisteredN (void); static TypeId GetRegistered (uint32_t i); /** - * \param iid a unique id + * \param tid a unique id * \returns the parent of the requested id * * This method cannot fail: it will crash if the input @@ -83,7 +83,7 @@ public: TypeId (std::string); - TypeId SetParent (TypeId iid); + TypeId SetParent (TypeId tid); template TypeId SetParent (void); @@ -118,11 +118,11 @@ private: friend bool operator == (TypeId a, TypeId b); friend bool operator != (TypeId a, TypeId b); - explicit TypeId (uint16_t iid); + explicit TypeId (uint16_t tid); void DoAddConstructor (CallbackBase callback, uint32_t nArguments); CallbackBase LookupConstructor (uint32_t nArguments); - uint16_t m_iid; + uint16_t m_tid; }; /** @@ -159,11 +159,11 @@ public: template Ptr QueryInterface (void) const; /** - * \param iid the interface id of the requested interface + * \param tid the interface id of the requested interface * \returns a pointer to the requested interface or zero if it could not be found. */ template - Ptr QueryInterface (TypeId iid) const; + Ptr QueryInterface (TypeId tid) const; /** * Run the DoDispose methods of this object and all the * objects aggregated to it. @@ -231,7 +231,7 @@ private: template friend Ptr CreateObject (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7); - Ptr DoQueryInterface (TypeId iid) const; + Ptr DoQueryInterface (TypeId tid) const; void DoCollectSources (std::string path, const TraceContext &context, TraceResolver::SourceCollection *collection) const; void DoTraceAll (std::ostream &os, const TraceContext &context) const; @@ -239,16 +239,16 @@ private: bool CheckLoose (void) const; void MaybeDelete (void) const; /** - * \param iid an TypeId + * \param tid an TypeId * * Every subclass which defines a new TypeId for itself * should register this TypeId by calling this method * from its constructor. */ - void SetTypeId (TypeId iid); + void SetTypeId (TypeId tid); mutable uint32_t m_count; - TypeId m_iid; + TypeId m_tid; bool m_disposed; mutable bool m_collecting; Object *m_next; @@ -451,9 +451,9 @@ Object::QueryInterface () const template Ptr -Object::QueryInterface (TypeId iid) const +Object::QueryInterface (TypeId tid) const { - Ptr found = DoQueryInterface (iid); + Ptr found = DoQueryInterface (tid); if (found != 0) { return Ptr (dynamic_cast (PeekPointer (found))); diff --git a/src/devices/csma/csma-topology.cc b/src/devices/csma/csma-topology.cc index b44cc5011..e5277d7cd 100644 --- a/src/devices/csma/csma-topology.cc +++ b/src/devices/csma/csma-topology.cc @@ -85,12 +85,12 @@ CsmaTopology::ConnectPacketSocket(Ptr app, } Ptr -CsmaTopology::CreatePacketSocket(Ptr n1, std::string iid_name) +CsmaTopology::CreatePacketSocket(Ptr n1, std::string tid_name) { - TypeId iid = TypeId::LookupByName (iid_name); + TypeId tid = TypeId::LookupByName (tid_name); Ptr socketFactory = - n1->QueryInterface (iid); + n1->QueryInterface (tid); Ptr socket = socketFactory->CreateSocket (); diff --git a/src/devices/csma/csma-topology.h b/src/devices/csma/csma-topology.h index 9f39b73ef..e74338d88 100644 --- a/src/devices/csma/csma-topology.h +++ b/src/devices/csma/csma-topology.h @@ -106,14 +106,14 @@ static Ptr ConnectPacketSocket(Ptr app, /** * \param n1 Node from which socketfactory should be tested. - * \param iid_name Interface identifier ("Packet", in this case) + * \param tid_name Interface identifier ("Packet", in this case) * * This is a test function to make sure that a socket can be created * by using the socketfactory interface provided in the * netdevicenode. */ static Ptr CreatePacketSocket(Ptr n1, - std::string iid_name); + std::string tid_name); #endif }; diff --git a/src/internet-node/arp-l3-protocol.cc b/src/internet-node/arp-l3-protocol.cc index cd3ca69b7..2fb34c50a 100644 --- a/src/internet-node/arp-l3-protocol.cc +++ b/src/internet-node/arp-l3-protocol.cc @@ -40,9 +40,9 @@ NS_OBJECT_ENSURE_REGISTERED (ArpL3Protocol); TypeId ArpL3Protocol::GetTypeId (void) { - static TypeId iid = TypeId ("ArpL3Protocol") + static TypeId tid = TypeId ("ArpL3Protocol") .SetParent (); - return iid; + return tid; } ArpL3Protocol::ArpL3Protocol (Ptr node) diff --git a/src/internet-node/ipv4-l3-protocol.cc b/src/internet-node/ipv4-l3-protocol.cc index 245cbf348..4bcec3f85 100644 --- a/src/internet-node/ipv4-l3-protocol.cc +++ b/src/internet-node/ipv4-l3-protocol.cc @@ -47,9 +47,9 @@ NS_OBJECT_ENSURE_REGISTERED (Ipv4L3Protocol); TypeId Ipv4L3Protocol::GetTypeId (void) { - static TypeId iid = TypeId ("Ipv4L3Protocol") + static TypeId tid = TypeId ("Ipv4L3Protocol") .SetParent (); - return iid; + return tid; } Ipv4L3ProtocolTraceContextElement::Ipv4L3ProtocolTraceContextElement () diff --git a/src/internet-node/ipv4-l4-demux.cc b/src/internet-node/ipv4-l4-demux.cc index ab9f994b3..252bc47c8 100644 --- a/src/internet-node/ipv4-l4-demux.cc +++ b/src/internet-node/ipv4-l4-demux.cc @@ -63,9 +63,9 @@ Ipv4L4ProtocolTraceContextElement::GetTypeName (void) const TypeId Ipv4L4Demux::GetTypeId (void) { - static TypeId iid = TypeId ("Ipv4L4Demux") + static TypeId tid = TypeId ("Ipv4L4Demux") .SetParent (); - return iid; + return tid; } Ipv4L4Demux::Ipv4L4Demux (Ptr node) diff --git a/src/mobility/hierarchical-mobility-model.cc b/src/mobility/hierarchical-mobility-model.cc index c1fd062ba..46f0150b3 100644 --- a/src/mobility/hierarchical-mobility-model.cc +++ b/src/mobility/hierarchical-mobility-model.cc @@ -27,9 +27,9 @@ NS_OBJECT_ENSURE_REGISTERED (HierarchicalMobilityModel); TypeId HierarchicalMobilityModel::GetTypeId (void) { - static TypeId iid = TypeId ("HierarchicalMobilityModel") + static TypeId tid = TypeId ("HierarchicalMobilityModel") .SetParent (); - return iid; + return tid; } HierarchicalMobilityModel::HierarchicalMobilityModel (Ptr child, Ptr parent) diff --git a/src/mobility/mobility-model-notifier.cc b/src/mobility/mobility-model-notifier.cc index 6941b7274..c48f7ce42 100644 --- a/src/mobility/mobility-model-notifier.cc +++ b/src/mobility/mobility-model-notifier.cc @@ -26,10 +26,10 @@ namespace ns3 { TypeId MobilityModelNotifier::GetTypeId (void) { - static TypeId iid = TypeId ("MobilityModelNotifier") + static TypeId tid = TypeId ("MobilityModelNotifier") .SetParent () .AddConstructor (); - return iid; + return tid; } MobilityModelNotifier::MobilityModelNotifier () diff --git a/src/mobility/mobility-model.cc b/src/mobility/mobility-model.cc index 7a8d56f48..a27a230ac 100644 --- a/src/mobility/mobility-model.cc +++ b/src/mobility/mobility-model.cc @@ -26,9 +26,9 @@ namespace ns3 { TypeId MobilityModel::GetTypeId (void) { - static TypeId iid = TypeId ("MobilityModel") + static TypeId tid = TypeId ("MobilityModel") .SetParent (); - return iid; + return tid; } MobilityModel::MobilityModel () diff --git a/src/mobility/random-direction-2d-mobility-model.cc b/src/mobility/random-direction-2d-mobility-model.cc index d519f3d80..9f13588dc 100644 --- a/src/mobility/random-direction-2d-mobility-model.cc +++ b/src/mobility/random-direction-2d-mobility-model.cc @@ -113,11 +113,11 @@ RandomDirection2dMobilityModelParameters::GetCurrent (void) TypeId RandomDirection2dMobilityModel::GetTypeId (void) { - static TypeId iid = TypeId ("RandomDirection2dMobilityModel") + static TypeId tid = TypeId ("RandomDirection2dMobilityModel") .SetParent () .AddConstructor () .AddConstructor > (); - return iid; + return tid; } diff --git a/src/mobility/random-position.cc b/src/mobility/random-position.cc index 234d16d74..22b235d3b 100644 --- a/src/mobility/random-position.cc +++ b/src/mobility/random-position.cc @@ -63,9 +63,9 @@ NS_OBJECT_ENSURE_REGISTERED (RandomPosition); TypeId RandomPosition::GetTypeId (void) { - static TypeId iid = TypeId ("RandomPosition") + static TypeId tid = TypeId ("RandomPosition") .SetParent (); - return iid; + return tid; } RandomPosition::RandomPosition () @@ -80,11 +80,11 @@ NS_OBJECT_ENSURE_REGISTERED (RandomRectanglePosition); TypeId RandomRectanglePosition::GetTypeId (void) { - static TypeId iid = TypeId ("RandomRectanglePosition") + static TypeId tid = TypeId ("RandomRectanglePosition") .SetParent () .AddConstructor () .AddConstructor (); - return iid; + return tid; } RandomRectanglePosition::RandomRectanglePosition () @@ -116,11 +116,11 @@ NS_OBJECT_ENSURE_REGISTERED (RandomDiscPosition); TypeId RandomDiscPosition::GetTypeId (void) { - static TypeId iid = TypeId ("RandomDiscPosition") + static TypeId tid = TypeId ("RandomDiscPosition") .SetParent () .AddConstructor () .AddConstructor (); - return iid; + return tid; } RandomDiscPosition::RandomDiscPosition () diff --git a/src/mobility/random-walk-2d-mobility-model.cc b/src/mobility/random-walk-2d-mobility-model.cc index 3f32d9762..5210f9d7d 100644 --- a/src/mobility/random-walk-2d-mobility-model.cc +++ b/src/mobility/random-walk-2d-mobility-model.cc @@ -132,11 +132,11 @@ RandomWalk2dMobilityModelParameters::GetCurrent (void) TypeId RandomWalk2dMobilityModel::GetTypeId (void) { - static TypeId iid = TypeId ("RandomWalkMobilityModel") + static TypeId tid = TypeId ("RandomWalkMobilityModel") .SetParent () .AddConstructor () .AddConstructor > (); - return iid; + return tid; } RandomWalk2dMobilityModel::RandomWalk2dMobilityModel () diff --git a/src/mobility/random-waypoint-mobility-model.cc b/src/mobility/random-waypoint-mobility-model.cc index 01eb71754..c9faa0744 100644 --- a/src/mobility/random-waypoint-mobility-model.cc +++ b/src/mobility/random-waypoint-mobility-model.cc @@ -103,11 +103,11 @@ RandomWaypointMobilityModelParameters::GetCurrent (void) TypeId RandomWaypointMobilityModel::GetTypeId (void) { - static TypeId iid = TypeId ("RandomWaypointMobilityModel") + static TypeId tid = TypeId ("RandomWaypointMobilityModel") .SetParent () .AddConstructor () .AddConstructor > (); - return iid; + return tid; } RandomWaypointMobilityModel::RandomWaypointMobilityModel () diff --git a/src/mobility/static-mobility-model.cc b/src/mobility/static-mobility-model.cc index a12dd63cc..f9c0a81d1 100644 --- a/src/mobility/static-mobility-model.cc +++ b/src/mobility/static-mobility-model.cc @@ -26,11 +26,11 @@ NS_OBJECT_ENSURE_REGISTERED (StaticMobilityModel); TypeId StaticMobilityModel::GetTypeId (void) { - static TypeId iid = TypeId ("StaticMobilityModel") + static TypeId tid = TypeId ("StaticMobilityModel") .SetParent () .AddConstructor () .AddConstructor (); - return iid; + return tid; } StaticMobilityModel::StaticMobilityModel () diff --git a/src/mobility/static-speed-mobility-model.cc b/src/mobility/static-speed-mobility-model.cc index ce8a3f76a..11c641a28 100644 --- a/src/mobility/static-speed-mobility-model.cc +++ b/src/mobility/static-speed-mobility-model.cc @@ -26,12 +26,12 @@ NS_OBJECT_ENSURE_REGISTERED (StaticSpeedMobilityModel); TypeId StaticSpeedMobilityModel::GetTypeId (void) { - static TypeId iid = TypeId ("StaticSpeedMobilityModel") + static TypeId tid = TypeId ("StaticSpeedMobilityModel") .SetParent () .AddConstructor () .AddConstructor () .AddConstructor (); - return iid; + return tid; } StaticSpeedMobilityModel::StaticSpeedMobilityModel () diff --git a/src/node/channel.cc b/src/node/channel.cc index d48b00b9d..f6cc4b66a 100644 --- a/src/node/channel.cc +++ b/src/node/channel.cc @@ -29,9 +29,9 @@ NS_OBJECT_ENSURE_REGISTERED (Channel); TypeId Channel::GetTypeId (void) { - static TypeId iid = TypeId ("Channel") + static TypeId tid = TypeId ("Channel") .SetParent (); - return iid; + return tid; } Channel::Channel () diff --git a/src/node/drop-tail-queue.cc b/src/node/drop-tail-queue.cc index b6bf848e3..c4532d1a9 100644 --- a/src/node/drop-tail-queue.cc +++ b/src/node/drop-tail-queue.cc @@ -28,10 +28,10 @@ NS_OBJECT_ENSURE_REGISTERED (DropTailQueue); TypeId DropTailQueue::GetTypeId (void) { - static TypeId iid = TypeId ("DropTailQueue") + static TypeId tid = TypeId ("DropTailQueue") .SetParent () .AddConstructor (); - return iid; + return tid; } DropTailQueue::DropTailQueue () : diff --git a/src/node/ipv4.cc b/src/node/ipv4.cc index 5c4569386..41c9f28fa 100644 --- a/src/node/ipv4.cc +++ b/src/node/ipv4.cc @@ -30,9 +30,9 @@ NS_OBJECT_ENSURE_REGISTERED (Ipv4); TypeId Ipv4::GetTypeId (void) { - static TypeId iid = TypeId ("Ipv4") + static TypeId tid = TypeId ("Ipv4") .SetParent (); - return iid; + return tid; } Ipv4::Ipv4 () diff --git a/src/node/net-device.cc b/src/node/net-device.cc index ee9b3dc81..7d9e07cf7 100644 --- a/src/node/net-device.cc +++ b/src/node/net-device.cc @@ -37,9 +37,9 @@ NS_OBJECT_ENSURE_REGISTERED (NetDevice); TypeId NetDevice::GetTypeId (void) { - static TypeId iid = TypeId ("NetDevice") + static TypeId tid = TypeId ("NetDevice") .SetParent (); - return iid; + return tid; } NetDevice::NetDevice(Ptr node, const Address& addr) : diff --git a/src/node/node.cc b/src/node/node.cc index 29777427e..419bd126d 100644 --- a/src/node/node.cc +++ b/src/node/node.cc @@ -34,9 +34,9 @@ NS_OBJECT_ENSURE_REGISTERED (Node); TypeId Node::GetTypeId (void) { - static TypeId iid = TypeId ("Node") + static TypeId tid = TypeId ("Node") .SetParent (); - return iid; + return tid; } NodeNetDeviceIndex::NodeNetDeviceIndex () diff --git a/src/node/packet-socket-factory.cc b/src/node/packet-socket-factory.cc index d53c6b7c6..f396393fe 100644 --- a/src/node/packet-socket-factory.cc +++ b/src/node/packet-socket-factory.cc @@ -29,9 +29,9 @@ NS_OBJECT_ENSURE_REGISTERED (PacketSocketFactory); TypeId PacketSocketFactory::GetTypeId (void) { - static TypeId iid = TypeId ("Packet") + static TypeId tid = TypeId ("Packet") .SetParent (); - return iid; + return tid; } PacketSocketFactory::PacketSocketFactory () diff --git a/src/node/queue.cc b/src/node/queue.cc index 6044c9695..c6a43341a 100644 --- a/src/node/queue.cc +++ b/src/node/queue.cc @@ -101,9 +101,9 @@ QueueTraceType::Print (std::ostream &os) const TypeId Queue::GetTypeId (void) { - static TypeId iid = TypeId ("Queue") + static TypeId tid = TypeId ("Queue") .SetParent (); - return iid; + return tid; } Queue::Queue() : diff --git a/src/node/socket-factory.cc b/src/node/socket-factory.cc index 8c53e5bd5..2a2057dcf 100644 --- a/src/node/socket-factory.cc +++ b/src/node/socket-factory.cc @@ -26,9 +26,9 @@ NS_OBJECT_ENSURE_REGISTERED (SocketFactory); TypeId SocketFactory::GetTypeId (void) { - static TypeId iid = TypeId ("SocketFactory") + static TypeId tid = TypeId ("SocketFactory") .SetParent (); - return iid; + return tid; } SocketFactory::SocketFactory () diff --git a/src/node/udp.cc b/src/node/udp.cc index 77fd75375..217f08d6f 100644 --- a/src/node/udp.cc +++ b/src/node/udp.cc @@ -26,9 +26,9 @@ NS_OBJECT_ENSURE_REGISTERED (Udp); TypeId Udp::GetTypeId (void) { - static TypeId iid = TypeId ("Udp") + static TypeId tid = TypeId ("Udp") .SetParent (); - return iid; + return tid; } Udp::Udp () diff --git a/src/routing/global-routing/global-router-interface.cc b/src/routing/global-routing/global-router-interface.cc index efdbe557f..76ad24190 100644 --- a/src/routing/global-routing/global-router-interface.cc +++ b/src/routing/global-routing/global-router-interface.cc @@ -436,9 +436,9 @@ NS_OBJECT_ENSURE_REGISTERED (GlobalRouter); TypeId GlobalRouter::GetTypeId (void) { - static TypeId iid = TypeId ("GlobalRouter") + static TypeId tid = TypeId ("GlobalRouter") .SetParent (); - return iid; + return tid; } GlobalRouter::GlobalRouter () diff --git a/src/routing/olsr/olsr-agent-impl.cc b/src/routing/olsr/olsr-agent-impl.cc index 78c99f8d8..4c9e6d5cd 100644 --- a/src/routing/olsr/olsr-agent-impl.cc +++ b/src/routing/olsr/olsr-agent-impl.cc @@ -153,10 +153,10 @@ NS_OBJECT_ENSURE_REGISTERED (AgentImpl); TypeId AgentImpl::GetTypeId (void) { - static TypeId iid = TypeId ("OlsrAgentImpl") + static TypeId tid = TypeId ("OlsrAgentImpl") .SetParent () .AddConstructor > (); - return iid; + return tid; } diff --git a/src/routing/olsr/olsr-agent.cc b/src/routing/olsr/olsr-agent.cc index b5fa65de8..9dbf61678 100644 --- a/src/routing/olsr/olsr-agent.cc +++ b/src/routing/olsr/olsr-agent.cc @@ -35,16 +35,16 @@ NS_OBJECT_ENSURE_REGISTERED (Agent); TypeId Agent::GetTypeId (void) { - static TypeId iid = TypeId ("OlsrAgent") + static TypeId tid = TypeId ("OlsrAgent") .SetParent (); - return iid; + return tid; } Ptr Agent::CreateDefault (Ptr node) { - TypeId iid = g_defaultImpl.GetValue (); - Ptr agent = iid.CreateObject (node)->QueryInterface (); + TypeId tid = g_defaultImpl.GetValue (); + Ptr agent = tid.CreateObject (node)->QueryInterface (); return agent; }