How to access plugin name from VMPluginCodeGenerator
PhiHo Hoang
phiho.hoang at rogers.com
Sun Jul 13 01:52:57 UTC 2003
Maybe a bit of rational behind this RFH would help.
>From the latest source for MiscPrimitivePlugin :
/******** generated by VMMaker **********'/
static const char *moduleName =
#ifdef SQUEAK_BUILTIN_PLUGIN
"MiscPrimitivePlugin 21 June 2003 (i)"
#else
"MiscPrimitivePlugin 21 June 2003 (e)"
#endif
; // Note how the semicolon on this line is refactored !
/*** isn't a bit hard to read ? does it make you itchy ? ***/
/******** is this one better ? **********'/
#ifdef SQUEAK_BUILTIN_PLUGIN
#define IE "(i)"
#else
#define IE "(e)"
#endif
#define MODULENAME(ie) "MiscPrimitivePlugin 12 July 2003"##ie
static const char *moduleName = MODULENAME(IE) ;
/***** if yes, can VMMaker generate it ? ***/
/**** MobVM plugins (processed by Notepad) ****/
static const char *moduleName = "MiscPrimitivePlugin 12 July 2003" ;
/*** The "(i)", "(e)" bits are generated at runtime. ***/
What do you think ?
Cheers,
PhiHo.
----- Original Message -----
From: "PhiHo Hoang" <phiho.hoang at rogers.com>
To: <squeak-dev at lists.squeakfoundation.org>
Sent: Saturday, July 12, 2003 4:24 PM
Subject: How to access plugin name from VMPluginCodeGenerator
> Hi,
>
> I need to generate a macro like:
>
> #define MODULENAME(ie) "MiscPrimitivePlugin 12 July 2003"##ie
>
> How can I access 'nameString' (plugin name) from within
> 'VMPluginCodeGenerator>>emitCHeaderOn: aStream' ?
>
> I am sure there is a more gooder way to do it.
>
> Thanks for your help.
>
> PhiHo.
>
>
More information about the Squeak-dev
mailing list
|