/** * Copyright 2007-2013 IMP Inventors. All rights reserved */ #include #include #include #include int main(int, char *[]) { IMP_NEW(IMP::Model, m, ()); IMP_NEW(IMP::Particle, p, (m)); // special cased FloatKey for (unsigned int i=4; i< 7; ++i) { IMP::FloatKey k(i); std::cout << "add" << std::endl; m->add_attribute(k, p->get_index(), 1); std::cout << "get" << std::endl; assert(m->get_attribute(k, p->get_index()) == 1); std::cout << "set" << std::endl; m->set_attribute(k, p->get_index(), 2); assert(m->get_attribute(k, p->get_index())==2); } return 0; }