1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-08-13 14:39:47 +00:00

Add SetListingView.

I'm having linker errors in gtest, pushing to see
if this also happens on the build server.
This commit is contained in:
King_DuckZ 2016-02-09 23:23:50 +01:00
parent 346946340d
commit ada0f1df50
4 changed files with 52 additions and 32 deletions

View file

@ -144,6 +144,10 @@ namespace mchlib {
}
auto SetListing::begin() const -> const_iterator {
return cbegin();
}
auto SetListing::cbegin() const -> const_iterator {
std::unique_ptr<PathName> base_path;
if (m_list.begin() != m_list.end()) {
base_path.reset(new PathName(m_list.front().abs_path));
@ -151,15 +155,23 @@ namespace mchlib {
return const_iterator(m_list.begin(), m_list.end(), std::move(base_path));
}
//auto SetListing::cbegin() const -> const_iterator {
//}
//auto SetListing::end() const -> const_iterator {
//}
//auto SetListing::cend() const -> const_iterator {
//}
//ListType descend_copy (const const_iterator& parItem) const {
//}
SetListingView::SetListingView (const const_iterator& parIter) :
m_begin(parIter.m_current),
m_end(parIter.m_end)
{
}
auto SetListingView::cbegin() const -> const_iterator {
std::unique_ptr<PathName> base_path;
if (m_begin != m_end) {
base_path.reset(new PathName(m_begin->abs_path));
}
return const_iterator(m_begin, m_end, std::move(base_path));
}
} //namespace mchlib