Depending on the problem, a pattern that may fit very well is to have a base class and several classes that inherit from it (each one being a "state") and then call bless to change your object from one class to another, to another and back to the first.
If you want a particular method to be doing one of several fixed things, this is probably a much cleaner solution than what you are using right now.
In reply to Re (tilly) 1: Re-using/changing a class
by tilly
in thread Re-using/changing a class
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |