[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Objecting to objects



I think I have a proposal I like over the other ones:
See below or https://salilab.org/internal/wiki/IMP/Particle_objects_or_table

- keep the attributes identified by strings
- bundle attributes into groups which are presented along with a set of helper functions--this can be done in Doxygen easily - using a string which internally merges its representation (see the web page) - get and set values for the attributes through the Particle, rather than through the attribute table

This approach is completely flexible. Users are encouraged to use the helper functions since they are bundled up with the attribute names themselves. Getting an attribute involves a search through a list of integers before fetching it from the table--so not as good as the objects case, but not horrible either and I'll bet we can make the compiler build it to something that is the same as the current Index based version via inlining. There are no changes to IO or the XML or the web stuff. Restraints have to get rid of XIndex classes.