Trailer::Register -> Trailer::AllocateUid and Header::Register -> Header::AllocateUid

This commit is contained in:
Mathieu Lacage
2007-08-08 10:01:19 +02:00
parent 55b4291df0
commit 5a38178db2
10 changed files with 13 additions and 13 deletions

View File

@@ -42,7 +42,7 @@ MyHeader::GetUid (void)
// code to keep track of the packet metadata.
// You need to make sure that this string is absolutely
// unique. The code will detect any duplicate string.
static uint32_t uid = Header::Register<MyHeader> ("MyHeader.test.nsnam.org");
static uint32_t uid = AllocateUid<MyHeader> ("MyHeader.test.nsnam.org");
return uid;
}

View File

@@ -91,7 +91,7 @@ class Header {
public:
protected:
template <typename T>
static uint32_t Register (std::string uuid);
static uint32_t AllocateUid (std::string uuid);
#if 0
private:
/**
@@ -152,7 +152,7 @@ namespace ns3 {
template <typename T>
uint32_t
Header::Register (std::string uuid)
Header::AllocateUid (std::string uuid)
{
return ChunkRegistry::RegisterHeader<T> (uuid);
}

View File

@@ -53,7 +53,7 @@ HistoryHeader<N>::GetUid (void)
{
std::ostringstream oss;
oss << N << "HistoryHeader.ns3";
static uint32_t uid = Header::Register<HistoryHeader<N> > (oss.str());
static uint32_t uid = AllocateUid<HistoryHeader<N> > (oss.str());
return uid;
}
@@ -133,7 +133,7 @@ HistoryTrailer<N>::GetUid (void)
{
std::ostringstream oss;
oss << N << "HistoryTrailer.ns3";
static uint32_t uid = Trailer::Register<HistoryTrailer<N> > (oss.str ());
static uint32_t uid = AllocateUid<HistoryTrailer<N> > (oss.str ());
return uid;
}

View File

@@ -114,7 +114,7 @@ class Trailer {
public:
protected:
template <typename T>
static uint32_t Register (std::string uidString);
static uint32_t AllocateUid (std::string uidString);
#if 0
private:
/**
@@ -179,7 +179,7 @@ namespace ns3 {
template <typename T>
uint32_t
Trailer::Register (std::string uidString)
Trailer::AllocateUid (std::string uidString)
{
return ChunkRegistry::RegisterTrailer<T> (uidString);
}

View File

@@ -30,7 +30,7 @@ namespace ns3 {
uint32_t
ArpHeader::GetUid (void)
{
static uint32_t uid = Header::Register<ArpHeader> ("ArpHeader.ns3");
static uint32_t uid = AllocateUid<ArpHeader> ("ArpHeader.ns3");
return uid;
}

View File

@@ -35,7 +35,7 @@ bool Ipv4Header::m_calcChecksum = false;
uint32_t
Ipv4Header::GetUid (void)
{
static uint32_t uid = Header::Register<Ipv4Header> ("Ipv4Header.ns3");
static uint32_t uid = AllocateUid<Ipv4Header> ("Ipv4Header.ns3");
return uid;
}

View File

@@ -31,7 +31,7 @@ bool UdpHeader::m_calcChecksum = false;
uint32_t
UdpHeader::GetUid (void)
{
static uint32_t uid = Header::Register<UdpHeader> ("UdpHeader.ns3");
static uint32_t uid = AllocateUid<UdpHeader> ("UdpHeader.ns3");
return uid;
}

View File

@@ -34,7 +34,7 @@ namespace ns3 {
uint32_t
EthernetHeader::GetUid (void)
{
static uint32_t uid = Header::Register<EthernetHeader> ("EthernetHeader.ns3");
static uint32_t uid = AllocateUid<EthernetHeader> ("EthernetHeader.ns3");
return uid;
}

View File

@@ -35,7 +35,7 @@ bool EthernetTrailer::m_calcFcs = false;
uint32_t
EthernetTrailer::GetUid (void)
{
static uint32_t uid = Trailer::Register<EthernetTrailer> ("EthernetTrailer.ns3");
static uint32_t uid = AllocateUid<EthernetTrailer> ("EthernetTrailer.ns3");
return uid;
}

View File

@@ -31,7 +31,7 @@ namespace ns3 {
uint32_t
LlcSnapHeader::GetUid (void)
{
static uint32_t uid = Header::Register<LlcSnapHeader> ("LlcSnapHeader.ns3");
static uint32_t uid = AllocateUid<LlcSnapHeader> ("LlcSnapHeader.ns3");
return uid;
}