title: Custom Iterator in C++
body: <p>I have a class TContainer that is an aggregate of several stl collections pointers to TItems class.</p>
  
  <p>I need to create an Iterator to traverse the elements in all the collections in my TContainer class abstracting the client of the inner workings.</p>
  
  <p>What would be a good way to do this?.  Should I crate a class that extends an iterator (if so, what iterator class should I extend), should I create an iterator class that is an aggregate of iterators?</p>
  
  <p>I only need a FORWARD_ONLY iterator.</p>
  
  <p>I.E, If this is my container: </p>
  
  <pre><code>typedef std::vector &lt;TItem*&gt; ItemVector;
  class TContainer {
     std::vector &lt;ItemVector *&gt; m_Items;
  };
  </code></pre>
  
  <p>What would be a good Iterator to traverse all the items contained in the vectors of the m_Items member variable.</p>