src: Updating code style to conform (more or less) to ndn-cxx style
Also, adding .clang-format that describes the applied style. Note that
this style requires a slightly customized version of clang-format.
diff --git a/model/cs/ndn-content-store.cpp b/model/cs/ndn-content-store.cpp
index 4d3bb65..3588eb9 100644
--- a/model/cs/ndn-content-store.cpp
+++ b/model/cs/ndn-content-store.cpp
@@ -17,7 +17,7 @@
*
* Author: Alexander Afanasyev <alexander.afanasyev@ucla.edu>
* Ilya Moiseenko <iliamo@cs.ucla.edu>
- *
+ *
*/
#include "ndn-content-store.hpp"
@@ -25,32 +25,31 @@
#include "ns3/log.h"
#include "ns3/packet.h"
-NS_LOG_COMPONENT_DEFINE ("ndn.cs.ContentStore");
+NS_LOG_COMPONENT_DEFINE("ndn.cs.ContentStore");
namespace ns3 {
namespace ndn {
-NS_OBJECT_ENSURE_REGISTERED (ContentStore);
+NS_OBJECT_ENSURE_REGISTERED(ContentStore);
TypeId
-ContentStore::GetTypeId (void)
+ContentStore::GetTypeId(void)
{
- static TypeId tid = TypeId ("ns3::ndn::ContentStore")
- .SetGroupName ("Ndn")
- .SetParent<Object> ()
+ static TypeId tid =
+ TypeId("ns3::ndn::ContentStore")
+ .SetGroupName("Ndn")
+ .SetParent<Object>()
- .AddTraceSource ("CacheHits", "Trace called every time there is a cache hit",
- MakeTraceSourceAccessor (&ContentStore::m_cacheHitsTrace))
+ .AddTraceSource("CacheHits", "Trace called every time there is a cache hit",
+ MakeTraceSourceAccessor(&ContentStore::m_cacheHitsTrace))
- .AddTraceSource ("CacheMisses", "Trace called every time there is a cache miss",
- MakeTraceSourceAccessor (&ContentStore::m_cacheMissesTrace))
- ;
+ .AddTraceSource("CacheMisses", "Trace called every time there is a cache miss",
+ MakeTraceSourceAccessor(&ContentStore::m_cacheMissesTrace));
return tid;
}
-
-ContentStore::~ContentStore ()
+ContentStore::~ContentStore()
{
}
@@ -58,31 +57,30 @@
//////////////////////////////////////////////////////////////////////
-Entry::Entry (Ptr<ContentStore> cs, Ptr<const Data> data)
- : m_cs (cs)
- , m_data (data)
+Entry::Entry(Ptr<ContentStore> cs, Ptr<const Data> data)
+ : m_cs(cs)
+ , m_data(data)
{
}
const Name&
-Entry::GetName () const
+Entry::GetName() const
{
- return m_data->GetName ();
+ return m_data->GetName();
}
Ptr<const Data>
-Entry::GetData () const
+Entry::GetData() const
{
return m_data;
}
Ptr<ContentStore>
-Entry::GetContentStore ()
+Entry::GetContentStore()
{
return m_cs;
}
-
} // namespace cs
} // namespace ndn
} // namespace ns3