Commits

Anonymous committed 765350e

fix const/non-const pointers and refs

Comments (0)

Files changed (1)

Navigation/NavigableIterator.h

 {
  public:
 
-  typedef CHILDCOLL                          coll_type;
-  typedef typename coll_type::iterator       coll_iterator;
-  typedef typename coll_type::const_iterator coll_const_iterator;
-  typedef CHILD                              child_type;
-
   ////////////////////////////////
   // Constructor and Destructor //
   ////////////////////////////////
 
-  NavigableIterator(const coll_type* theCollection)
+  NavigableIterator(const CHILDCOLL* theCollection)
     : m_collection(theCollection)
     { }
 
   NavigableIterator  operator++(int) { this->next(); }
   NavigableIterator& operator--()    { this->previous(); }
   NavigableIterator  operator--(int) { this->previous(); }
-  bool operator==( NavigableIterator<child_type, coll_type>& 
+  bool operator==( NavigableIterator<CHILD,CHILDCOLL>& 
 		   anOtherIterator) const
     { return m_actual == anOtherIterator.m_actual; }
-  bool operator!=( NavigableIterator<child_type, coll_type>& 
+  bool operator!=( NavigableIterator<CHILD,CHILDCOLL>& 
 		   anOtherIterator) const
     { return !( *this == anOtherIterator ); }
 
   // operators for value retrieval
-  child_type operator*() const
+  const CHILD* operator*() const
     {
       return ( m_actual != m_collection->end() )
 	? m_collection->getChildPtr(m_actual)
 	: 0;
     }
-  child_type operator->() const
+  const CHILD* operator->() const
     {
       return m_actual != m_collection->end() 
 	? m_collection->getChildPtr(m_actual)
 
  protected:
 
-  coll_const_iterator m_actual;
-  const coll_type*    m_collection;
+  typename CHILDCOLL::const_iterator m_actual;
+  const CHILDCOLL*                   m_collection;
 
 };  
 #endif