Small refactoring: Sync::CcnxNameInfo renamed to Sync::Ns3NameInfo
diff --git a/model/sync-ccnx-name-info.cc b/model/sync-ns3-name-info.cc
similarity index 79%
rename from model/sync-ccnx-name-info.cc
rename to model/sync-ns3-name-info.cc
index c1fbf93..459486f 100644
--- a/model/sync-ccnx-name-info.cc
+++ b/model/sync-ns3-name-info.cc
@@ -20,7 +20,7 @@
* Alexander Afanasyev <alexander.afanasyev@ucla.edu>
*/
-#include "sync-ccnx-name-info.h"
+#include "sync-ns3-name-info.h"
#include "ns3/ccnx-name-components.h"
#include <boost/lexical_cast.hpp>
@@ -32,18 +32,18 @@
namespace Sync {
NameInfoConstPtr
-CcnxNameInfo::FindOrCreate (ns3::Ptr<const ns3::CcnxNameComponents> name)
+Ns3NameInfo::FindOrCreate (ns3::Ptr<const ns3::CcnxNameComponents> name)
{
string key = lexical_cast<string> (*name);
- NameInfoPtr value = NameInfoPtr (new CcnxNameInfo (name));
+ NameInfoPtr value = NameInfoPtr (new Ns3NameInfo (name));
pair<NameMap::iterator,bool> item =
m_names.insert (make_pair (key, value));
return item.first->second;
}
-CcnxNameInfo::CcnxNameInfo (ns3::Ptr<const ns3::CcnxNameComponents> name)
+Ns3NameInfo::Ns3NameInfo (ns3::Ptr<const ns3::CcnxNameComponents> name)
: m_name (name)
{
m_id = m_ids ++; // set ID for a newly inserted element
@@ -51,17 +51,17 @@
}
string
-CcnxNameInfo::toString () const
+Ns3NameInfo::toString () const
{
return lexical_cast<std::string> (*m_name);
}
bool
-CcnxNameInfo::operator == (const NameInfo &info) const
+Ns3NameInfo::operator == (const NameInfo &info) const
{
try
{
- return *m_name == *dynamic_cast<const CcnxNameInfo&> (info).m_name;
+ return *m_name == *dynamic_cast<const Ns3NameInfo&> (info).m_name;
}
catch (...)
{
diff --git a/model/sync-ccnx-name-info.h b/model/sync-ns3-name-info.h
similarity index 88%
rename from model/sync-ccnx-name-info.h
rename to model/sync-ns3-name-info.h
index 17ed162..ffc26d5 100644
--- a/model/sync-ccnx-name-info.h
+++ b/model/sync-ns3-name-info.h
@@ -29,7 +29,7 @@
namespace Sync {
-class CcnxNameInfo : public NameInfo
+class Ns3NameInfo : public NameInfo
{
public:
/**
@@ -39,7 +39,7 @@
static NameInfoConstPtr
FindOrCreate (ns3::Ptr<const ns3::CcnxNameComponents> name);
- virtual ~CcnxNameInfo () { };
+ virtual ~Ns3NameInfo () { };
// from NameInfo
virtual bool
@@ -57,9 +57,9 @@
/**
* @brief Disabled default
*/
- CcnxNameInfo () {}
- CcnxNameInfo& operator = (const CcnxNameInfo &info) { return *this; }
- CcnxNameInfo (ns3::Ptr<const ns3::CcnxNameComponents> name);
+ Ns3NameInfo () {}
+ Ns3NameInfo& operator = (const Ns3NameInfo &info) { return *this; }
+ Ns3NameInfo (ns3::Ptr<const ns3::CcnxNameComponents> name);
ns3::Ptr<const ns3::CcnxNameComponents> m_name;
};