On Thu, Oct 25, 2007 at 09:26:31AM -0400, Richard Heck wrote:
> Abdelrazak Younes wrote:
> >[EMAIL PROTECTED] wrote:
> >>+    /// Return parameter information for command cmdName.
> >>+    /// Not implemented here. Must be implemented in derived class.
> >>+    static CommandInfo const * findInfo(std::string const & cmdName);
> >
> >So make it pure virtual:
> >
> >vitual CommandInfo const * findInfo(std::string const & cmdName) = 0;
> 
> I didn't do that because it needs, at least in the base classes, to be 
> static, and I wanted to indicate here that it needed to be implemented 
> as a static function. But of course "virtual static" is out, and so is 
> "static blah =0". Thoughts?


class Base
{
public:
        static Foo findInfo() { return doFindInfo(); }

protected:
        virtual Foo doFindInfo() const = 0;
};


class Derived : public Base
{
protected:
        virtual Foo doFindInfo() const { return Something; }
};


Andre'

Reply via email to