They should be called decorators, not bundles. Here is a cleaned version.
class XYZDecorator {
static FloatKey kx_, ky_, kz_;
public:
XYZDecorator(Particle*p): p_(p){}
bool get_is_initialized() {
XYZBundle::Pointer xyzp= XYZBundle::initialize(p) to add the right
fields
or
XYZBundle::Pointer xyzp= XYZBundle::cast(p) to use.
I am a bit uncomfortable about the faking aspect of the design
especially without working reference counting. Since Bundles don't
need to get passed back and forth from python, we could make the
reference counting work. It might be better to just allocate Bundles
on the stack. This removes a memory management issue at the cost of
eliminating the possibility of using a NULL pointer to signify
failure. So things would have to look more like