link: delete deprecated functions
refs #4055
Change-Id: I322debdbf55263d0de3208d8fa9eea2164737e86
diff --git a/src/link.cpp b/src/link.cpp
index 21e6045..1276904 100644
--- a/src/link.cpp
+++ b/src/link.cpp
@@ -1,5 +1,5 @@
/* -*- Mode:C++; c-file-style:"gnu"; indent-tabs-mode:nil; -*- */
-/**
+/*
* Copyright (c) 2013-2017 Regents of the University of California.
*
* This file is part of ndn-cxx library (NDN C++ library with eXperimental eXtensions).
@@ -61,8 +61,6 @@
else {
setContent(nullptr, 0);
}
-
- m_isDelSetDirty = true;
}
void
@@ -75,7 +73,6 @@
}
m_delList.wireDecode(getContent(), wantSort);
- m_isDelSetDirty = true;
}
void
@@ -102,53 +99,4 @@
return nErased > 0;
}
-Link::PairInitializerListHelper::PairInitializerListHelper(std::initializer_list<std::pair<uint32_t, Name>> dels)
-{
- for (const auto& p : dels) {
- m_delList.insert(p.first, p.second, DelegationList::INS_REPLACE);
- }
-}
-
-Link::Link(const Name& name, PairInitializerListHelper dels)
- : Data(name)
- , m_delList(std::move(dels.m_delList))
-{
- encodeContent();
-}
-
-const Link::DelegationSet&
-Link::getDelegations() const
-{
- if (m_isDelSetDirty) {
- m_delSet.clear();
- for (const auto& del : m_delList) {
- m_delSet.emplace(static_cast<uint32_t>(del.preference), del.name);
- }
- m_isDelSetDirty = false;
- }
- return m_delSet;
-}
-
-Link::DelegationTuple
-Link::getDelegationFromWire(const Block& block, size_t index)
-{
- Delegation del = Link(block, false).getDelegationList().at(index);
- return std::make_tuple(static_cast<uint32_t>(del.preference), del.name);
-}
-
-ssize_t
-Link::findDelegationFromWire(const Block& block, const Name& delegationName)
-{
- DelegationList dels = Link(block, false).getDelegationList();
- auto i = std::find_if(dels.begin(), dels.end(),
- [delegationName] (const Delegation& del) { return del.name == delegationName; });
- return i == dels.end() ? -1 : std::distance(dels.begin(), i);
-}
-
-ssize_t
-Link::countDelegationsFromWire(const Block& block)
-{
- return Link(block, false).getDelegationList().size();
-}
-
} // namespace ndn