*** include/X3DTK/private/MESH_SceneGraphTypes.h.orig Fri Aug 27 13:18:32 2004 --- include/X3DTK/private/MESH_SceneGraphTypes.h Sat Oct 29 12:40:12 2005 *************** *** 112,118 **** typename Base::iterator it = Base::find(element->getIndex()); if ((*it).second == element) return it; ! return end(); } /// Finds the element. Is provided for having a common interface with std::set and std::map. --- 112,118 ---- typename Base::iterator it = Base::find(element->getIndex()); if ((*it).second == element) return it; ! return Base::end(); } /// Finds the element. Is provided for having a common interface with std::set and std::map. *************** *** 121,127 **** typename Base::const_iterator it = Base::find(element->getIndex()); if ((*it).second == element) return it; ! return end(); } }; --- 121,127 ---- typename Base::const_iterator it = Base::find(element->getIndex()); if ((*it).second == element) return it; ! return Base::end(); } }; *************** *** 163,169 **** /// operator[]. SFTemplateEdge *const &operator[](const unsigned int &n) const { ! typename Base::const_iterator it = begin(); for (unsigned int i = 0; i < n; ++i) ++it; return *it; --- 163,169 ---- /// operator[]. SFTemplateEdge *const &operator[](const unsigned int &n) const { ! typename Base::const_iterator it = Base::begin(); for (unsigned int i = 0; i < n; ++i) ++it; return *it; *************** *** 220,226 **** typename Base::iterator it = Base::find(element->getIndex()); if ((*it).second == element) return it; ! return end(); } /// Finds the element. Is provided for having a common interface with std::set and std::map. typename std::map *>::const_iterator find(SFTemplateFace *const &element) const --- 220,226 ---- typename Base::iterator it = Base::find(element->getIndex()); if ((*it).second == element) return it; ! return Base::end(); } /// Finds the element. Is provided for having a common interface with std::set and std::map. typename std::map *>::const_iterator find(SFTemplateFace *const &element) const *************** *** 228,234 **** typename Base::const_iterator it = Base::find(element->getIndex()); if ((*it).second == element) return it; ! return end(); } }; --- 228,234 ---- typename Base::const_iterator it = Base::find(element->getIndex()); if ((*it).second == element) return it; ! return Base::end(); } }; *************** *** 262,271 **** /// Inserts element x at index x.first of the std::vector. Is provided to have common interface with std::map. std::pair *>::iterator, bool> insert(const std::pair *> &x) { ! if (x.first >= size()) resize(x.first + 1, 0); ! typename Base::iterator it = begin(); it += x.first; *it = x.second; --- 262,271 ---- /// Inserts element x at index x.first of the std::vector. Is provided to have common interface with std::map. std::pair *>::iterator, bool> insert(const std::pair *> &x) { ! if (x.first >= Base::size()) resize(x.first + 1, 0); ! typename Base::iterator it = Base::begin(); it += x.first; *it = x.second; *************** *** 275,281 **** /// Finds the element. Is provided for having a common interface with std::set and std::map. typename std::vector *>::iterator find(SFTemplateVertex *const &element) const { ! return std::find(begin(), end(), element); } }; --- 275,281 ---- /// Finds the element. Is provided for having a common interface with std::set and std::map. typename std::vector *>::iterator find(SFTemplateVertex *const &element) const { ! return std::find(Base::begin(), Base::end(), element); } }; *************** *** 307,319 **** std::pair *>::iterator, bool> insert(const typename std::vector *>::value_type &x) { push_back(x); ! return std::pair(end(), true); } /// Finds the element. Is provided for having a common interface with std::set and std::map. typename std::vector *>::iterator find(SFTemplateEdge *const &element) const { ! return std::find(begin(), end(), element); } }; --- 307,319 ---- std::pair *>::iterator, bool> insert(const typename std::vector *>::value_type &x) { push_back(x); ! return std::pair(Base::end(), true); } /// Finds the element. Is provided for having a common interface with std::set and std::map. typename std::vector *>::iterator find(SFTemplateEdge *const &element) const { ! return std::find(Base::begin(), Base::end(), element); } }; *************** *** 343,352 **** /// Inserts element x at the end of the std::vector. Is equivalent to push_back and provided to have common interface with std::map. std::pair insert(const std::pair *> &x) { ! if (x.first >= size()) resize(x.first + 1, 0); ! typename Base::iterator it = begin(); it += x.first; *it = x.second; --- 343,352 ---- /// Inserts element x at the end of the std::vector. Is equivalent to push_back and provided to have common interface with std::map. std::pair insert(const std::pair *> &x) { ! if (x.first >= Base::size()) resize(x.first + 1, 0); ! typename Base::iterator it = Base::begin(); it += x.first; *it = x.second; *************** *** 356,367 **** /// Finds the element. Is provided for having a common interface with std::set and std::map. typename std::vector *>::iterator find(SFTemplateFace *const &element) { ! return std::find(begin(), end(), element); } /// Finds the element. Is provided for having a common interface with std::set and std::map. typename std::vector *>::const_iterator find(SFTemplateFace *const &element) const { ! return std::find(begin(), end(), element); } }; --- 356,367 ---- /// Finds the element. Is provided for having a common interface with std::set and std::map. typename std::vector *>::iterator find(SFTemplateFace *const &element) { ! return std::find(Base::begin(), Base::end(), element); } /// Finds the element. Is provided for having a common interface with std::set and std::map. typename std::vector *>::const_iterator find(SFTemplateFace *const &element) const { ! return std::find(Base::begin(), Base::end(), element); } };