emit helpstring attribute to idl for enum elements

N

None

I'm trying to mark up an enum in a .h file such that when it is emitted
to the .idl file the elements of the enum can be marked up with
helpstring attributes.

Microsoft has a published sample from the ODL help:

typedef [uuid(DEADF00D-C0DE-B1FF-F001-A100FF001ED),
helpstring("Farm Animals are friendly"), helpcontext(234)]
enum {
[helpstring("Moo")] cows = 1,
pigs = 2
} ANIMALS;

Note the [helpstring("Moo")]. In previous things we've used this to
include helpstrings with the enums in our type libraries, but we did
hand coded IDL in those projects. We'd like to stop doing this and
stick with attributes. We've been successful with everything except
this one thing.

We've tried several things:

[export, helpstring("numbers")]
typedef enum {
[helpstring("uno")] one,
[helpstring("dos")] two
};

This puts the enum in the idl in the IDL with the helpstring on the
enum, but it strips off the helpstrings on the elements. No errors are
generated, it just silently eats the helpstrings.

[export, helpstring("numbers")]
typedef enum {
[idl_quote("helpstring("uno")")] one,
two
};

This didn't get us anywhere either.

Any clues?
 
N

None

Since there are no replies I'm going to guess that what we want to do
is unsupported under the current implementation of attributes for
enums. How unfortunate that functionality was lost with the transition
to this new approach...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top