41 #include <visp3/core/vpMoment.h>
42 #include <visp3/core/vpMomentDatabase.h>
43 #include <visp3/core/vpMomentObject.h>
54 void vpMomentDatabase::add(
vpMoment &moment,
const std::string &name)
56 moments.insert(std::pair<const std::string, vpMoment *>(name, &moment));
67 std::map<const std::string, vpMoment *, vpMomentDatabase::vpCmpStr_t>::const_iterator it = moments.find(moment_name);
69 found = (it != moments.end());
85 std::map<const std::string, vpMoment *, vpMomentDatabase::vpCmpStr_t>::const_iterator itr;
86 for (itr = moments.begin(); itr != moments.end(); ++itr) {
87 (*itr).second->update(
object);
96 #ifdef ENABLE_VISP_NAMESPACE
99 std::map<const std::string, vpMoment *, vpMomentDatabase::vpCmpStr_t>::const_iterator itr;
102 for (itr = m.moments.begin(); itr != m.moments.end(); ++itr) {
103 os << (*itr).first <<
": [" << *((*itr).second) <<
"],";
friend std::ostream & operator<<(std::ostream &s, const vpArray2D< Type > &A)
This class allows to register all vpMoments so they can access each other according to their dependen...
const vpMoment & get(const std::string &moment_name, bool &found) const
virtual void updateAll(vpMomentObject &object)
Class for generic objects.
This class defines shared methods/attributes for 2D moments.