1
0
Fork 0
mirror of https://github.com/KingDuckZ/dindexer.git synced 2025-07-02 14:04:22 +00:00

Better way to construct SetListingView

This commit is contained in:
King_DuckZ 2016-02-12 20:14:12 +01:00
parent 2a7b8437ed
commit bed191c4fc
3 changed files with 32 additions and 27 deletions

View file

@ -54,33 +54,14 @@ namespace mchlib {
};
};
class SetListing {
friend class SetListingView;
public:
typedef std::vector<FileRecordData> ListType;
typedef implem::DirIterator const_iterator;
explicit SetListing ( ListType&& parList, bool parSort=true );
~SetListing ( void ) noexcept;
const_iterator begin ( void ) const;
const_iterator cbegin ( void ) const;
const_iterator end ( void ) const;
const_iterator cend ( void ) const;
//ListType descend_copy ( const const_iterator& parItem ) const;
private:
ListType m_list;
};
class SetListingView {
public:
typedef SetListing::const_iterator const_iterator;
typedef SetListing::ListType::const_iterator list_iterator;
typedef implem::DirIterator const_iterator;
typedef std::vector<FileRecordData>::const_iterator list_iterator;
explicit SetListingView ( const const_iterator& parIter );
explicit SetListingView ( const SetListing& parListing );
SetListingView ( list_iterator parBeg, list_iterator parEnd );
SetListingView ( SetListingView&& ) = default;
~SetListingView ( void ) noexcept = default;
const_iterator begin ( void ) const;
@ -92,6 +73,26 @@ namespace mchlib {
list_iterator m_begin;
list_iterator m_end;
};
class SetListing {
public:
typedef std::vector<FileRecordData> ListType;
typedef SetListingView::const_iterator const_iterator;
explicit SetListing ( ListType&& parList, bool parSort=true );
~SetListing ( void ) noexcept;
const_iterator begin ( void ) const;
const_iterator cbegin ( void ) const;
const_iterator end ( void ) const;
const_iterator cend ( void ) const;
//ListType descend_copy ( const const_iterator& parItem ) const;
SetListingView make_view ( void ) const;
private:
ListType m_list;
};
} //namespace mchlib
#endif