38 #include <visp3/core/vpMomentDatabase.h>
39 #include <visp3/core/vpMoment.h>
42 #include <visp3/core/vpMomentObject.h>
51 void vpMomentDatabase::add(
vpMoment& moment,
const char* name){
52 moments.insert(std::pair<const char*,vpMoment*>((
const char*)name,&moment));
62 std::map<const char*,vpMoment*,vpMomentDatabase::cmp_str>::const_iterator it = moments.find(type);
64 found = (it!=moments.end());
76 std::map<const char*,vpMoment*,vpMomentDatabase::cmp_str>::const_iterator itr;
77 for(itr = moments.begin(); itr != moments.end(); ++itr){
78 (*itr).second->update(
object);
86 std::map<const char*,vpMoment*,vpMomentDatabase::cmp_str>::const_iterator itr;
89 for(itr = m.moments.begin(); itr != m.moments.end(); ++itr){
90 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...
This class defines shared methods/attributes for 2D moments.
const vpMoment & get(const char *type, bool &found) const
virtual void updateAll(vpMomentObject &object)
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)