Problem with copy constructor with class with polymorphic pointers
<p>I have  class with two fields witch are pointers to abstract class. How i can write copy constructor witch will copy the data pointed with the two pointers.</p>

<p>Here is the class</p>

<pre><code>class OSGFMenu;
class OSGFMenuItem;
typedef void(OSGFMenu::*OSGFMenuCommand)(OSGFMenuItem*);
typedef int (OSGFMenuItem::*FNMETHOD) ( int, char* );
class OSGFMenuItem:
    public OSGFDrawableComponent
{
public:
    OSGFMenuItem(Game&amp; game,OSGFMenu&amp; menu)
        :OSGFDrawableComponent(game),mMenu(menu),mActive(false)
    {
    }
    OSGFMenuItem(const OSGFMenuItem&amp; menuItem)
        :OSGFDrawableComponent(menuItem),mMenu(menuItem.mMenu)
    {
        Copy(menuItem);
    }
    OSGFMenuItem&amp; operator=(const OSGFMenuItem&amp; menuItem)
    {
        if(&amp;menuItem != this)
            Copy(menuItem);
        return *this;
    }
    void SetActive(bool active)
    {
        mActive = active;
    }
    void Activate()
    {
        SetActive(true);
    }
    void DeActivate()
    {
        SetActive(false);
    }
    void SetCommand(OSGFMenuCommand command)
    {
        mCommand = command;
    }
    virtual void Render()const
    {
        if(!mActive)
            DrawIfNotNull(mDrawData);
        else
            if(!DrawIfNotNull(mActiveDrawData))
                DrawIfNotNull(mDrawData);

    }
    virtual void Update(double dTime)
    {
        OSGFDrawableComponent* drawData = 
            dynamic_cast&lt;OSGFDrawableComponent*&gt;(mDrawData);
        if(drawData)
            drawData-&gt;Update(dTime);
    }
    void Invoke()
    {
        (mMenu.*mCommand)(this);
    }
    ~OSGFMenuItem()
    {
        SafeDelete(mDrawData);
        SafeDelete(mActiveDrawData);
    }
protected:
    void SetDrawData(IDrawable* drawData)
    {
        mDrawData = drawData;
    }
    void SetActiveDrawData(IDrawable* drawData)
    {
        mActiveDrawData = drawData;
    }
private:
    bool DrawIfNotNull(IDrawable* drawData)const
    {
        if(!drawData)return false;
        drawData-&gt;Render();
        return true;
    }
    void Copy(const OSGFMenuItem&amp; menuItem)
    {
        mCommand = menuItem.mCommand;
        *mDrawData = *menuItem.mDrawData;
        *mActiveDrawData = *menuItem.mActiveDrawData;
        mActive = menuItem.mActive;
    }
    OSGFMenuCommand mCommand;
    OSGFMenu&amp; mMenu;
    IDrawable* mDrawData;
    IDrawable* mActiveDrawData;
    bool mActive;
};
</code></pre>
