I have following class hierrachy:

```
class Base
{
public:
    virtual void DoA();
    virtual void DoB();
    virtual void DoC();

protected:
    float m_x;
    float m_y;
};

class DerivedA : public Base
{
public:
    virtual void DoA() override;
    virtual void DoB() override;
    virtual void DoC() override;
};

class DerivedB : public Base
{
public:
    virtual void DoA() override;
    virtual void DoB() override;
    virtual void DoC() override;
};

```

All of methods `DoA(), DoB()` ... operate only on members of base class,
and some of them might call base class methods inside of them. At runtime, I create object of type `DerivedA` as default, but I might need to change it to `DerivedB` or `DerivedC`. However I find it useless to create these object by copying state of `DerivedA` and initializing it again. I think the solution might be to cast `DerivedA` to any other type, but I'm not sure if it's safe and if it's a good design. Any opinions?