I am only making a guess at what you want to do, but if my guess is correct, you might be thinking of something like the below.
struct FSM_Base {
int x;
struct submachine1;
struct submachine2;
FSM_Base () : x(0) {}
virtual ~FSM_Base () {}
};
struct FSM_Base::submachine1 : virtual public FSM_Base {
void oneentry () { int g = x; }
};
struct FSM_Base::submachine2 : virtual public FSM_Base {
void oneentry () { int g = x; }
};
struct FSM : public FSM_Base::submachine1,
public FSM_Base::submachine2 {
FSM_Base::submachine1 * sub1 () { return this; }
FSM_Base::submachine2 * sub2 () { return this; }
};