encoding: Refactoring EncodingBuffer
Breaks: nfd:commit:c0273e3505ac2ccf843401be77a513d8eb663127
Breaks: ChronoSync:commit:e042f83a1df184a8e7a90ef00034d11026891cd1
Change-Id: I8275c6276c5ecfa280f87f584189907521febf5f
Refs: #2494, #2490
diff --git a/src/management/nfd-forwarder-status.cpp b/src/management/nfd-forwarder-status.cpp
index c4e736a..4e989ee 100644
--- a/src/management/nfd-forwarder-status.cpp
+++ b/src/management/nfd-forwarder-status.cpp
@@ -1,6 +1,6 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
/**
- * Copyright (c) 2013-2014 Regents of the University of California.
+ * Copyright (c) 2013-2015 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
*
@@ -53,9 +53,9 @@
this->wireDecode(payload);
}
-template<bool T>
+template<encoding::Tag TAG>
size_t
-ForwarderStatus::wireEncode(EncodingImpl<T>& encoder) const
+ForwarderStatus::wireEncode(EncodingImpl<TAG>& encoder) const
{
size_t totalLength = 0;
@@ -81,7 +81,7 @@
time::toUnixTimestamp(m_currentTimestamp).count());
totalLength += prependNonNegativeIntegerBlock(encoder, tlv::nfd::StartTimestamp,
time::toUnixTimestamp(m_startTimestamp).count());
- totalLength += prependByteArrayBlock(encoder,tlv::nfd::NfdVersion,
+ totalLength += encoder.prependByteArrayBlock(tlv::nfd::NfdVersion,
reinterpret_cast<const uint8_t*>(m_nfdVersion.c_str()),
m_nfdVersion.size());
@@ -91,10 +91,10 @@
}
template size_t
-ForwarderStatus::wireEncode<true>(EncodingImpl<true>& block) const;
+ForwarderStatus::wireEncode<encoding::EncoderTag>(EncodingImpl<encoding::EncoderTag>&) const;
template size_t
-ForwarderStatus::wireEncode<false>(EncodingImpl<false>& block) const;
+ForwarderStatus::wireEncode<encoding::EstimatorTag>(EncodingImpl<encoding::EstimatorTag>&) const;
const Block&
ForwarderStatus::wireEncode() const