On Wed, 24 May 2006, Dave Korn wrote:
Perhaps it would be better to factor out the prototype generation into
a separate macro that could be invoked by both instances of "#define
CREATABLE_CLASS" ?
What's wrong with the following?
#define _CREATABLE_CLASS_DECL(name) \
class name : virtual public OBJECT
#define _CREATABLE_CLASS_PROTO(name) \
extern class OBJECT* create_##name( int argc, const char* argv[] );
#ifndef CC_NO_CLASS_DECL
#define CREATABLE_CLASS(name) \
_CREATABLE_CLASS_PROTO(name) \
_CREATABLE_CLASS_DECL(name)
#else
#define CREATABLE_CLASS(name) \
_CREATABLE_CLASS_PROTO(name)
#endif