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

[IMP-dev] decorators



Another source of excess checks in the IMP code is the decorators. There are three reasons to create them
- you have a new particle and need to add fields to it
- you have a particle which may or may not have the needed fields
- you have a particle which has the needed fields (you know already)

We currently support the first two and have no way of expressing the third. In addition, the current syntax is kind of annoying.

I propose adding constructors to the decorators from Particle* to express the third. The constructors would have an assertion that they particles have the correct attributes (but this assertion would go away in non debugged code). Thoughts?