Wierd interface method for point Iterator
问题 I have to iterate over specific points of perimeter rectangle (in some cases I need to iterate over one line of this rectangle, In other cases I need to iterate over entire rectangle). I have an interface PointIterator. struct Point { double x,y } class PointIteratorI { virtual void next() =0; virtual void isOver() =0; virtual Point& getPoint() = 0; } in case of iterating over one line class LineIterator:public PointIterator { .... } in case of iterating over rectangle's perimeter class