42 #include <visp/vpMomentDatabase.h>
43 #include <visp/vpMoment.h>
46 #include <visp/vpMomentObject.h>
55 void vpMomentDatabase::add(
vpMoment& moment,
const char* name){
56 moments.insert(std::pair<const char*,vpMoment*>((
const char*)name,&moment));
66 std::map<const char*,vpMoment*,vpMomentDatabase::cmp_str>::const_iterator it = moments.find(type);
68 found = (it!=moments.end());
80 std::map<const char*,vpMoment*,vpMomentDatabase::cmp_str>::const_iterator itr;
81 for(itr = moments.begin(); itr != moments.end(); itr++){
82 (*itr).second->update(
object);
90 std::map<const char*,vpMoment*,vpMomentDatabase::cmp_str>::const_iterator itr;
93 for(itr = m.moments.begin(); itr != m.moments.end(); itr++){
94 os << (*itr).first <<
": [" << *((*itr).second) <<
"],";
Class for generic objects.
This class allows to register all vpMoments so they can access each other according to their dependen...
vpMoment & get(const char *type, bool &found)
This class defines shared methods/attributes for 2D moments.
virtual void updateAll(vpMomentObject &object)
VISP_EXPORT std::ostream & operator<<(std::ostream &os, const vpImagePoint &ip)