iid (void) -> GetTypeId (void)

This commit is contained in:
Mathieu Lacage
2008-01-15 12:43:07 +01:00
parent 44c33f1618
commit a2e63b7f0b
56 changed files with 100 additions and 100 deletions

View File

@@ -27,7 +27,7 @@ int main (int argc, char *argv[])
GridTopology grid (-100, -100, 20, 5, 20);
// each object will be attached a static position.
grid.SetMobilityModel (StaticMobilityModel::iid ());
grid.SetMobilityModel (StaticMobilityModel::GetTypeId ());
// finalize the setup by attaching to each object
// in the input array a position and initializing

View File

@@ -36,12 +36,12 @@ namespace ns3 {
static TypeIdDefaultValue g_interfaceIdErrorModelDefaultValue ("ErrorModel",
"Error Model",
ErrorModel::iid (),
ErrorModel::GetTypeId (),
"RateErrorModel");
NS_OBJECT_ENSURE_REGISTERED (ErrorModel);
TypeId ErrorModel::iid (void)
TypeId ErrorModel::GetTypeId (void)
{
static TypeId iid = TypeId ("ErrorModel")
.SetParent<Object> ();
@@ -125,7 +125,7 @@ static EnumDefaultValue<enum ErrorUnit>
NS_OBJECT_ENSURE_REGISTERED (RateErrorModel);
TypeId RateErrorModel::iid (void)
TypeId RateErrorModel::GetTypeId (void)
{
static TypeId iid = TypeId ("RateErrorModel")
.SetParent<ErrorModel> ()
@@ -246,7 +246,7 @@ RateErrorModel::DoReset (void)
NS_OBJECT_ENSURE_REGISTERED (ListErrorModel);
TypeId ListErrorModel::iid (void)
TypeId ListErrorModel::GetTypeId (void)
{
static TypeId iid = TypeId ("ListErrorModel")
.SetParent<ErrorModel> ()

View File

@@ -66,7 +66,7 @@ class RandomVariable;
class ErrorModel : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
/**
* A factory method to generate a preconfigured default ErrorModel for use
* \return an ErrorModel smart pointer that is the default ErrorModel
@@ -136,7 +136,7 @@ enum ErrorUnit
class RateErrorModel : public ErrorModel
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
RateErrorModel ();
virtual ~RateErrorModel ();
@@ -202,7 +202,7 @@ private:
class ListErrorModel : public ErrorModel
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
ListErrorModel ();
virtual ~ListErrorModel ();

View File

@@ -47,10 +47,10 @@ TypeIdDefaultValue::DoParseValue (const std::string &value)
return true;
}
tmp = tmp.GetParent ();
} while (tmp != Object::iid ());
} while (tmp != Object::GetTypeId ());
}
iid = iid.GetParent ();
} while (iid != Object::iid ());
} while (iid != Object::GetTypeId ());
}
return false;
}
@@ -80,7 +80,7 @@ TypeIdDefaultValue::DoGetType (void) const
oss << iid.GetName ();
}
tmp = tmp.GetParent ();
} while (tmp != Object::iid ());
} while (tmp != Object::GetTypeId ());
}
}
oss << ")";

View File

@@ -358,7 +358,7 @@ GetObjectIid (void)
}
TypeId
Object::iid (void)
Object::GetTypeId (void)
{
static TypeId iid = GetObjectIid ();
return iid;
@@ -367,7 +367,7 @@ Object::iid (void)
Object::Object ()
: m_count (1),
m_iid (Object::iid ()),
m_iid (Object::GetTypeId ()),
m_disposed (false),
m_collecting (false),
m_next (this)
@@ -384,7 +384,7 @@ Object::DoQueryInterface (TypeId iid) const
do {
NS_ASSERT (currentObject != 0);
TypeId cur = currentObject->m_iid;
while (cur != iid && cur != Object::iid ())
while (cur != iid && cur != Object::GetTypeId ())
{
cur = cur.GetParent ();
}
@@ -536,7 +536,7 @@ Object::DoCollectSources (std::string path, const TraceContext &context,
NS_ASSERT (current != 0);
NS_LOG_LOGIC ("collect current=" << current);
TypeId cur = current->m_iid;
while (cur != Object::iid ())
while (cur != Object::GetTypeId ())
{
std::string name = cur.GetName ();
std::string fullpath = path;
@@ -591,9 +591,9 @@ namespace {
class BaseA : public ns3::Object
{
public:
static ns3::TypeId iid (void) {
static ns3::TypeId GetTypeId (void) {
static ns3::TypeId iid = ns3::TypeId ("BaseA")
.SetParent (Object::iid ())
.SetParent (Object::GetTypeId ())
.AddConstructor<BaseA> ();
return iid;
}
@@ -616,9 +616,9 @@ public:
class DerivedA : public BaseA
{
public:
static ns3::TypeId iid (void) {
static ns3::TypeId GetTypeId (void) {
static ns3::TypeId iid = ns3::TypeId ("DerivedA")
.SetParent (BaseA::iid ())
.SetParent (BaseA::GetTypeId ())
.AddConstructor<DerivedA,int> ();
return iid;
}
@@ -643,9 +643,9 @@ public:
class BaseB : public ns3::Object
{
public:
static ns3::TypeId iid (void) {
static ns3::TypeId GetTypeId (void) {
static ns3::TypeId iid = ns3::TypeId ("BaseB")
.SetParent (Object::iid ())
.SetParent (Object::GetTypeId ())
.AddConstructor<BaseB> ();
return iid;
}
@@ -668,9 +668,9 @@ public:
class DerivedB : public BaseB
{
public:
static ns3::TypeId iid (void) {
static ns3::TypeId GetTypeId (void) {
static ns3::TypeId iid = ns3::TypeId ("DerivedB")
.SetParent (BaseB::iid ())
.SetParent (BaseB::GetTypeId ())
.AddConstructor<DerivedB,int> ()
.AddConstructor<DerivedB,int,int &> ();
return iid;
@@ -752,11 +752,11 @@ ObjectTest::RunTests (void)
Ptr<BaseA> baseA = CreateObject<BaseA> ();
NS_TEST_ASSERT_EQUAL (baseA->QueryInterface<BaseA> (), baseA);
NS_TEST_ASSERT_EQUAL (baseA->QueryInterface<BaseA> (DerivedA::iid ()), 0);
NS_TEST_ASSERT_EQUAL (baseA->QueryInterface<BaseA> (DerivedA::GetTypeId ()), 0);
NS_TEST_ASSERT_EQUAL (baseA->QueryInterface<DerivedA> (), 0);
baseA = CreateObject<DerivedA> (10);
NS_TEST_ASSERT_EQUAL (baseA->QueryInterface<BaseA> (), baseA);
NS_TEST_ASSERT_EQUAL (baseA->QueryInterface<BaseA> (DerivedA::iid ()), baseA);
NS_TEST_ASSERT_EQUAL (baseA->QueryInterface<BaseA> (DerivedA::GetTypeId ()), baseA);
NS_TEST_ASSERT_UNEQUAL (baseA->QueryInterface<DerivedA> (), 0);
baseA = CreateObject<BaseA> ();
@@ -862,13 +862,13 @@ ObjectTest::RunTests (void)
baseB->TraceDisconnect ("/$DerivedA/*", MakeCallback (&ObjectTest::BaseATrace, this));
// Test the object creation code of TypeId
Ptr<Object> a = BaseA::iid ().CreateObject ();
Ptr<Object> a = BaseA::GetTypeId ().CreateObject ();
NS_TEST_ASSERT_EQUAL (a->QueryInterface<BaseA> (), a);
NS_TEST_ASSERT_EQUAL (a->QueryInterface<BaseA> (DerivedA::iid ()), 0);
NS_TEST_ASSERT_EQUAL (a->QueryInterface<BaseA> (DerivedA::GetTypeId ()), 0);
NS_TEST_ASSERT_EQUAL (a->QueryInterface<DerivedA> (), 0);
a = DerivedA::iid ().CreateObject (10);
a = DerivedA::GetTypeId ().CreateObject (10);
NS_TEST_ASSERT_EQUAL (a->QueryInterface<BaseA> (), a);
NS_TEST_ASSERT_EQUAL (a->QueryInterface<BaseA> (DerivedA::iid ()), a);
NS_TEST_ASSERT_EQUAL (a->QueryInterface<BaseA> (DerivedA::GetTypeId ()), a);
NS_TEST_ASSERT_UNEQUAL (a->QueryInterface<DerivedA> (), 0);

View File

@@ -32,7 +32,7 @@
static struct X##type##RegistrationClass \
{ \
X##type##RegistrationClass () { \
ns3::TypeId iid = type::iid (); \
ns3::TypeId iid = type::GetTypeId (); \
iid.GetParent (); \
} \
} x_##type##RegistrationVariable
@@ -135,7 +135,7 @@ private:
class Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
Object ();
virtual ~Object ();
@@ -286,7 +286,7 @@ template <typename T>
TypeId
TypeId::SetParent (void)
{
return SetParent (T::iid ());
return SetParent (T::GetTypeId ());
}
template <typename T>
@@ -441,7 +441,7 @@ template <typename T>
Ptr<T>
Object::QueryInterface () const
{
Ptr<Object> found = DoQueryInterface (T::iid ());
Ptr<Object> found = DoQueryInterface (T::GetTypeId ());
if (found != 0)
{
return Ptr<T> (dynamic_cast<T *> (PeekPointer (found)));
@@ -465,7 +465,7 @@ template <typename T>
Ptr<T> CreateObject (void)
{
Ptr<T> p = Ptr<T> (new T (), false);
p->SetTypeId (T::iid ());
p->SetTypeId (T::GetTypeId ());
return p;
}
@@ -473,7 +473,7 @@ template <typename T, typename T1>
Ptr<T> CreateObject (T1 a1)
{
Ptr<T> p = Ptr<T> (new T (a1), false);
p->SetTypeId (T::iid ());
p->SetTypeId (T::GetTypeId ());
return p;
}
@@ -481,7 +481,7 @@ template <typename T, typename T1, typename T2>
Ptr<T> CreateObject (T1 a1, T2 a2)
{
Ptr<T> p = Ptr<T> (new T (a1, a2), false);
p->SetTypeId (T::iid ());
p->SetTypeId (T::GetTypeId ());
return p;
}
@@ -489,7 +489,7 @@ template <typename T, typename T1, typename T2, typename T3>
Ptr<T> CreateObject (T1 a1, T2 a2, T3 a3)
{
Ptr<T> p = Ptr<T> (new T (a1, a2, a3), false);
p->SetTypeId (T::iid ());
p->SetTypeId (T::GetTypeId ());
return p;
}
@@ -497,7 +497,7 @@ template <typename T, typename T1, typename T2, typename T3, typename T4>
Ptr<T> CreateObject (T1 a1, T2 a2, T3 a3, T4 a4)
{
Ptr<T> p = Ptr<T> (new T (a1, a2, a3, a4), false);
p->SetTypeId (T::iid ());
p->SetTypeId (T::GetTypeId ());
return p;
}
@@ -505,7 +505,7 @@ template <typename T, typename T1, typename T2, typename T3, typename T4, typena
Ptr<T> CreateObject (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5)
{
Ptr<T> p = Ptr<T> (new T (a1, a2, a3, a4, a5), false);
p->SetTypeId (T::iid ());
p->SetTypeId (T::GetTypeId ());
return p;
}
@@ -513,7 +513,7 @@ template <typename T, typename T1, typename T2, typename T3, typename T4, typena
Ptr<T> CreateObject (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6)
{
Ptr<T> p = Ptr<T> (new T (a1, a2, a3, a4, a5, a6), false);
p->SetTypeId (T::iid ());
p->SetTypeId (T::GetTypeId ());
return p;
}
@@ -521,7 +521,7 @@ template <typename T, typename T1, typename T2, typename T3, typename T4, typena
Ptr<T> CreateObject (T1 a1, T2 a2, T3 a3, T4 a4, T5 a5, T6 a6, T7 a7)
{
Ptr<T> p = Ptr<T> (new T (a1, a2, a3, a4, a5, a6, a7), false);
p->SetTypeId (T::iid ());
p->SetTypeId (T::GetTypeId ());
return p;
}

View File

@@ -38,7 +38,7 @@ const uint16_t ArpL3Protocol::PROT_NUMBER = 0x0806;
NS_OBJECT_ENSURE_REGISTERED (ArpL3Protocol);
TypeId
ArpL3Protocol::iid (void)
ArpL3Protocol::GetTypeId (void)
{
static TypeId iid = TypeId ("ArpL3Protocol")
.SetParent<Object> ();

View File

@@ -40,7 +40,7 @@ class TraceContext;
class ArpL3Protocol : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
static const uint16_t PROT_NUMBER;
/**
* \brief Constructor

View File

@@ -45,7 +45,7 @@ const uint16_t Ipv4L3Protocol::PROT_NUMBER = 0x0800;
NS_OBJECT_ENSURE_REGISTERED (Ipv4L3Protocol);
TypeId
Ipv4L3Protocol::iid (void)
Ipv4L3Protocol::GetTypeId (void)
{
static TypeId iid = TypeId ("Ipv4L3Protocol")
.SetParent<Object> ();

View File

@@ -99,7 +99,7 @@ private:
class Ipv4L3Protocol : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
static const uint16_t PROT_NUMBER;
Ipv4L3Protocol(Ptr<Node> node);

View File

@@ -61,7 +61,7 @@ Ipv4L4ProtocolTraceContextElement::GetTypeName (void) const
}
TypeId
Ipv4L4Demux::iid (void)
Ipv4L4Demux::GetTypeId (void)
{
static TypeId iid = TypeId ("Ipv4L4Demux")
.SetParent<Object> ();

View File

@@ -62,7 +62,7 @@ private:
class Ipv4L4Demux : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
Ipv4L4Demux (Ptr<Node> node);
virtual ~Ipv4L4Demux();

View File

@@ -28,7 +28,7 @@ GridTopology::GridTopology (double xMin, double yMin, uint32_t n, double deltaX,
m_n (n),
m_deltaX (deltaX),
m_deltaY (deltaY),
m_positionTypeId (StaticMobilityModel::iid ())
m_positionTypeId (StaticMobilityModel::GetTypeId ())
{}
void

View File

@@ -25,7 +25,7 @@ namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (HierarchicalMobilityModel);
TypeId
HierarchicalMobilityModel::iid (void)
HierarchicalMobilityModel::GetTypeId (void)
{
static TypeId iid = TypeId ("HierarchicalMobilityModel")
.SetParent<MobilityModel> ();

View File

@@ -33,7 +33,7 @@ namespace ns3 {
class HierarchicalMobilityModel : public MobilityModel
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
/**
* \param child the "relative" mobility model

View File

@@ -24,7 +24,7 @@
namespace ns3 {
TypeId
MobilityModelNotifier::iid (void)
MobilityModelNotifier::GetTypeId (void)
{
static TypeId iid = TypeId ("MobilityModelNotifier")
.SetParent<Object> ()

View File

@@ -33,7 +33,7 @@ namespace ns3 {
class MobilityModelNotifier : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
/**
* Create a new position notifier

View File

@@ -24,7 +24,7 @@
namespace ns3 {
TypeId
MobilityModel::iid (void)
MobilityModel::GetTypeId (void)
{
static TypeId iid = TypeId ("MobilityModel")
.SetParent<Object> ();

View File

@@ -35,7 +35,7 @@ namespace ns3 {
class MobilityModel : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
MobilityModel ();
virtual ~MobilityModel () = 0;

View File

@@ -111,7 +111,7 @@ RandomDirection2dMobilityModelParameters::GetCurrent (void)
}
TypeId
RandomDirection2dMobilityModel::iid (void)
RandomDirection2dMobilityModel::GetTypeId (void)
{
static TypeId iid = TypeId ("RandomDirection2dMobilityModel")
.SetParent<MobilityModel> ()

View File

@@ -89,7 +89,7 @@ class RandomDirection2dMobilityModelParameters : public Object
class RandomDirection2dMobilityModel : public MobilityModel
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
/**
* Create from \valueref{RandomDirection2dSpeed},

View File

@@ -61,7 +61,7 @@ g_discY ("RandomDiscPositionY",
NS_OBJECT_ENSURE_REGISTERED (RandomPosition);
TypeId
RandomPosition::iid (void)
RandomPosition::GetTypeId (void)
{
static TypeId iid = TypeId ("RandomPosition")
.SetParent<Object> ();
@@ -78,7 +78,7 @@ RandomPosition::~RandomPosition ()
NS_OBJECT_ENSURE_REGISTERED (RandomRectanglePosition);
TypeId
RandomRectanglePosition::iid (void)
RandomRectanglePosition::GetTypeId (void)
{
static TypeId iid = TypeId ("RandomRectanglePosition")
.SetParent<RandomPosition> ()
@@ -114,7 +114,7 @@ RandomRectanglePosition::Get (void) const
NS_OBJECT_ENSURE_REGISTERED (RandomDiscPosition);
TypeId
RandomDiscPosition::iid (void)
RandomDiscPosition::GetTypeId (void)
{
static TypeId iid = TypeId ("RandomDiscPosition")
.SetParent<RandomPosition> ()

View File

@@ -35,7 +35,7 @@ class RandomVariable;
class RandomPosition : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
RandomPosition ();
virtual ~RandomPosition ();
/**
@@ -51,7 +51,7 @@ public:
class RandomRectanglePosition : public RandomPosition
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
/**
* Create a random position model with construction
* values from \valueref{RandomRectanglePositionX}, and
@@ -80,7 +80,7 @@ private:
class RandomDiscPosition : public RandomPosition
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
/**
* Create a random position model with construction
* values from \valueref{RandomDiscPositionTheta},

View File

@@ -29,13 +29,13 @@ namespace ns3 {
static TypeIdDefaultValue
g_position ("RandomTopologyPositionType",
"The type of initial random position in a 3d topology.",
RandomPosition::iid (),
RandomPosition::GetTypeId (),
"RandomRectanglePosition");
static TypeIdDefaultValue
g_mobility ("RandomTopologyMobilityType",
"The type of mobility model attached to an object in a 3d topology.",
MobilityModel::iid (),
MobilityModel::GetTypeId (),
"StaticMobilityModel");
RandomTopology::RandomTopology ()

View File

@@ -130,7 +130,7 @@ RandomWalk2dMobilityModelParameters::GetCurrent (void)
}
TypeId
RandomWalk2dMobilityModel::iid (void)
RandomWalk2dMobilityModel::GetTypeId (void)
{
static TypeId iid = TypeId ("RandomWalkMobilityModel")
.SetParent<MobilityModel> ()

View File

@@ -115,7 +115,7 @@ class RandomWalk2dMobilityModelParameters : public Object
class RandomWalk2dMobilityModel : public MobilityModel
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
/**
* Instantiate a set of RandomWalk parameters initialized
* with construction values from \valueref{RandomWalk2dMode},

View File

@@ -42,7 +42,7 @@ g_pause ("RandomWaypointPause",
static TypeIdDefaultValue
g_position ("RandomWaypointPosition",
"A random position model used to pick the next waypoint position.",
RandomPosition::iid (),
RandomPosition::GetTypeId (),
"RandomRectanglePosition");
@@ -101,7 +101,7 @@ RandomWaypointMobilityModelParameters::GetCurrent (void)
}
TypeId
RandomWaypointMobilityModel::iid (void)
RandomWaypointMobilityModel::GetTypeId (void)
{
static TypeId iid = TypeId ("RandomWaypointMobilityModel")
.SetParent<MobilityModel> ()

View File

@@ -86,7 +86,7 @@ private:
class RandomWaypointMobilityModel : public MobilityModel
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
/**
* Default parameters from \valueref{RandomWaypointPause},
* and, \valueref{RandomWaypointPosition}.

View File

@@ -24,7 +24,7 @@ namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (StaticMobilityModel);
TypeId
StaticMobilityModel::iid (void)
StaticMobilityModel::GetTypeId (void)
{
static TypeId iid = TypeId ("StaticMobilityModel")
.SetParent<MobilityModel> ()

View File

@@ -32,7 +32,7 @@ namespace ns3 {
class StaticMobilityModel : public MobilityModel
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
/**
* Create a position located at coordinates (0,0,0)
*/

View File

@@ -24,7 +24,7 @@ namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (StaticSpeedMobilityModel);
TypeId StaticSpeedMobilityModel::iid (void)
TypeId StaticSpeedMobilityModel::GetTypeId (void)
{
static TypeId iid = TypeId ("StaticSpeedMobilityModel")
.SetParent<MobilityModel> ()

View File

@@ -35,7 +35,7 @@ namespace ns3 {
class StaticSpeedMobilityModel : public MobilityModel
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
/**
* Create position located at coordinates (0,0,0) with
* speed (0,0,0).

View File

@@ -27,7 +27,7 @@ namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (Channel);
TypeId
Channel::iid (void)
Channel::GetTypeId (void)
{
static TypeId iid = TypeId ("Channel")
.SetParent<Object> ();

View File

@@ -35,7 +35,7 @@ class NetDevice;
class Channel : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
Channel ();
Channel (std::string name);

View File

@@ -26,7 +26,7 @@ namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (DropTailQueue);
TypeId DropTailQueue::iid (void)
TypeId DropTailQueue::GetTypeId (void)
{
static TypeId iid = TypeId ("DropTailQueue")
.SetParent<Queue> ()

View File

@@ -35,7 +35,7 @@ const int DTQ_NPACKETS_MAX_DEFAULT = 100;
*/
class DropTailQueue : public Queue {
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
/**
* \brief DropTailQueue Constructor
*

View File

@@ -28,7 +28,7 @@ namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (Ipv4);
TypeId
Ipv4::iid (void)
Ipv4::GetTypeId (void)
{
static TypeId iid = TypeId ("Ipv4")
.SetParent<Object> ();

View File

@@ -157,7 +157,7 @@ public:
class Ipv4 : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
Ipv4 ();
virtual ~Ipv4 ();

View File

@@ -35,7 +35,7 @@ namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (NetDevice);
TypeId NetDevice::iid (void)
TypeId NetDevice::GetTypeId (void)
{
static TypeId iid = TypeId ("NetDevice")
.SetParent<Object> ();

View File

@@ -60,7 +60,7 @@ class Packet;
class NetDevice : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
virtual ~NetDevice();

View File

@@ -32,7 +32,7 @@ namespace ns3{
NS_OBJECT_ENSURE_REGISTERED (Node);
TypeId
Node::iid (void)
Node::GetTypeId (void)
{
static TypeId iid = TypeId ("Node")
.SetParent<Object> ();

View File

@@ -96,7 +96,7 @@ private:
class Node : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
/**
* Must be invoked by subclasses only.

View File

@@ -27,7 +27,7 @@ namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (PacketSocketFactory);
TypeId
PacketSocketFactory::iid (void)
PacketSocketFactory::GetTypeId (void)
{
static TypeId iid = TypeId ("Packet")
.SetParent<SocketFactory> ();

View File

@@ -34,7 +34,7 @@ class Socket;
class PacketSocketFactory : public SocketFactory
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
PacketSocketFactory ();

View File

@@ -28,7 +28,7 @@ NS_LOG_COMPONENT_DEFINE ("Queue");
namespace ns3 {
static TypeIdDefaultValue g_interfaceIdDefaultValue ("Queue", "Packet Queue",
Queue::iid (), "DropTailQueue");
Queue::GetTypeId (), "DropTailQueue");
NS_OBJECT_ENSURE_REGISTERED (Queue);
@@ -99,7 +99,7 @@ QueueTraceType::Print (std::ostream &os) const
}
TypeId
Queue::iid (void)
Queue::GetTypeId (void)
{
static TypeId iid = TypeId ("Queue")
.SetParent<Object> ();

View File

@@ -78,7 +78,7 @@ private:
class Queue : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
Queue ();
virtual ~Queue ();

View File

@@ -24,7 +24,7 @@ namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (SocketFactory);
TypeId SocketFactory::iid (void)
TypeId SocketFactory::GetTypeId (void)
{
static TypeId iid = TypeId ("SocketFactory")
.SetParent<Object> ();

View File

@@ -47,7 +47,7 @@ class Socket;
class SocketFactory : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
SocketFactory ();

View File

@@ -24,7 +24,7 @@ namespace ns3 {
NS_OBJECT_ENSURE_REGISTERED (Udp);
TypeId Udp::iid (void)
TypeId Udp::GetTypeId (void)
{
static TypeId iid = TypeId ("Udp")
.SetParent<SocketFactory> ();

View File

@@ -43,7 +43,7 @@ class Socket;
class Udp : public SocketFactory
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
Udp ();

View File

@@ -434,7 +434,7 @@ std::ostream& operator<< (std::ostream& os, GlobalRoutingLSA& lsa)
NS_OBJECT_ENSURE_REGISTERED (GlobalRouter);
TypeId
GlobalRouter::iid (void)
GlobalRouter::GetTypeId (void)
{
static TypeId iid = TypeId ("GlobalRouter")
.SetParent<Object> ();

View File

@@ -560,7 +560,7 @@ public:
*
* @see Object::QueryInterface ()
*/
static TypeId iid (void);
static TypeId GetTypeId (void);
/**
* @brief Create a Global Router class

View File

@@ -151,7 +151,7 @@ NS_LOG_COMPONENT_DEFINE ("OlsrAgent");
NS_OBJECT_ENSURE_REGISTERED (AgentImpl);
TypeId
AgentImpl::iid (void)
AgentImpl::GetTypeId (void)
{
static TypeId iid = TypeId ("OlsrAgentImpl")
.SetParent<Agent> ()
@@ -189,7 +189,7 @@ AgentImpl::AgentImpl (Ptr<Node> node)
m_ipv4 = node->QueryInterface<Ipv4> ();
NS_ASSERT (m_ipv4);
Ptr<SocketFactory> socketFactory = node->QueryInterface<SocketFactory> (Udp::iid ());
Ptr<SocketFactory> socketFactory = node->QueryInterface<SocketFactory> (Udp::GetTypeId ());
m_receiveSocket = socketFactory->CreateSocket ();
if (m_receiveSocket->Bind (InetSocketAddress (OLSR_PORT_NUMBER)))

View File

@@ -49,7 +49,7 @@ namespace olsr {
class AgentImpl : public Agent
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
AgentImpl (Ptr<Node> node);

View File

@@ -27,13 +27,13 @@ namespace olsr {
static TypeIdDefaultValue g_defaultImpl =
TypeIdDefaultValue ("OlsrAgentType",
"The type of OlsrAgent implementation",
Agent::iid (),
Agent::GetTypeId (),
"OlsrAgentImpl");
NS_OBJECT_ENSURE_REGISTERED (Agent);
TypeId
Agent::iid (void)
Agent::GetTypeId (void)
{
static TypeId iid = TypeId ("OlsrAgent")
.SetParent<Object> ();

View File

@@ -45,7 +45,7 @@ namespace olsr {
class Agent : public Object
{
public:
static TypeId iid (void);
static TypeId GetTypeId (void);
static Ptr<Agent> CreateDefault (Ptr<Node> node);