MultiParameterIterator.cpp
Go to the documentation of this file.
00001 #include <face_contour_detector/MultiParameterIterator.h>
00002 
00003 #include <iostream>
00004 
00005 namespace face_contour_detector {
00006 
00007         MultiParameterIterator::MultiParameterIterator() {
00008 
00009         }
00010         void MultiParameterIterator::Add(boost::shared_ptr<ParameterIteratorI> iterator) {
00011                 m_iterators.push_back(iterator);
00012         }
00013         void MultiParameterIterator::Next() {
00014                 std::vector<boost::shared_ptr<ParameterIteratorI> >::iterator it;
00015                 for (it = m_iterators.begin(); it != m_iterators.end(); it++) {
00016                         if ((*it)->HasNext()) {
00017                                 (*it)->Next();
00018                                 return;
00019                         } else {
00020                                 (*it)->Reset();
00021                         }
00022                 }
00023         }
00024         bool MultiParameterIterator::HasNext() {
00025                 std::vector<boost::shared_ptr<ParameterIteratorI> >::iterator it;
00026                 for (it = m_iterators.begin(); it != m_iterators.end(); it++) {
00027                         if ((*it)->HasNext()) {
00028                                 return true;
00029                         }
00030                 }
00031                 return false;
00032         }
00033         void MultiParameterIterator::Reset() {
00034                 std::vector<boost::shared_ptr<ParameterIteratorI> >::iterator it;
00035                 for (it = m_iterators.begin(); it != m_iterators.end(); it++) {
00036                         (*it)->Reset();
00037                 }
00038         }
00039 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends


face_contour_detector
Author(s): Fabian Wenzelmann and Julian Schmid
autogenerated on Wed Dec 26 2012 16:18:17