Andre Poenitz wrote:
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; }
};
Thanks!

rh


--
==================================================================
Richard G Heck, Jr
Professor of Philosophy
Brown University
http://frege.brown.edu/heck/
==================================================================
Get my public key from http://sks.keyserver.penguin.de
Hash: 0x1DE91F1E66FFBDEC
Learn how to sign your email using Thunderbird and GnuPG at:
http://dudu.dyn.2-h.org/nist/gpg-enigmail-howto

Reply via email to