#pragma once #include "ReverseRangeIterator.Base.tlh" #include "VectorOfPtr.tlh" //----------------------------------------------------------------------------- // VectorOfPtr // Æ«ÌØ»¯ - ±äÁ¿ //----------------------------------------------------------------------------- namespace ReverseRangeIterator { template class _VP_Iterator : public __BaseIterator ::reverse_iterator> { typedef __BaseIterator ::reverse_iterator> inherited; public: // using inherited::inherited; // VC2013 ±àÒë´íÎó // using __Iterator >::__Iterator >; _VP_Iterator () : inherited () { } _VP_Iterator (VectorOfPtr & ar) { Iter = _begin = ar.rbegin (); _end = ar.rend (); m_Count = (int) ar.size (); m_Index = m_Count - 1; m_MinIndex = 0; m_MaxIndex = m_Count - 1; } _VP_Iterator (const _VP_Iterator & from) { CopyAssign (from); } _VP_Iterator (_VP_Iterator && from) { MoveAssign (from); } public: _VP_Iterator & operator = (const _VP_Iterator & from) { inherited::operator = (from); return (*this); } public: inline T * Current () { return (*Iter).get (); } inline T * operator () (void) { return Current (); } inline T * operator * (void) { return Current (); } }; }