41 #include <visp3/core/vpMoment.h> 42 #include <visp3/core/vpMomentDatabase.h> 43 #include <visp3/core/vpMomentObject.h> 53 void vpMomentDatabase::add(
vpMoment &moment,
const char *name)
55 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());
84 std::map<const char *, vpMoment *, vpMomentDatabase::cmp_str>::const_iterator itr;
85 for (itr = moments.begin(); itr != moments.end(); ++itr) {
86 (*itr).second->update(
object);
95 std::map<const char *, vpMoment *, vpMomentDatabase::cmp_str>::const_iterator itr;
98 for (itr = m.moments.begin(); itr != m.moments.end(); ++itr) {
99 os << (*itr).first <<
": [" << *((*itr).second) <<
"],";
const vpMoment & get(const char *type, bool &found) const
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.
virtual void updateAll(vpMomentObject &object)
friend VISP_EXPORT std::ostream & operator<<(std::ostream &os, const vpMomentDatabase &v)