#pragma once #include "RangeIterator.Base.tlh" #include "VectorOfPtr.tlh" //----------------------------------------------------------------------------- // VectorOfPtr // Æ«ÌØ»¯ - ±äÁ¿ //----------------------------------------------------------------------------- namespace RangeIterator { template class _VP_Iterator : public __BaseIterator ::iterator> { typedef __BaseIterator ::iterator> inherited; public: // using inherited::inherited; // VC2013 ±àÒë´íÎó // using __Iterator >::__Iterator >; _VP_Iterator () : inherited () { } _VP_Iterator (VectorOfPtr & ar) { Iter = _begin = ar.begin (); _end = ar.end (); m_Count = (int) ar.size (); m_Index = 0; m_MinIndex = 0; m_MaxIndex = m_Count - 1; } _VP_Iterator (const _VP_Iterator & from) { CopyAssign (from); } _VP_Iterator (_VP_Iterator && from) { MoveAssign (from); } public: inline _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 (); } }; }