473,387 Members | 3,810 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

emit helpstring attribute to idl for enum elements

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?

Mar 1 '06 #1
1 2178
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...

Mar 3 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: | last post by:
Would be nice to specify an incremenet or decremenet as an attribute in an enum so I can for example have the following... enum SomeEnum { A = 0, B, // 2 C, // 4 D /6
8
by: Eyeawanda Pondicherry | last post by:
I have put some code together that creates an enum dynamically from some database values. The enum can be read perfectly by an application that references the dynamically generated dll. If I...
31
by: Michael C | last post by:
If a class inherits from another class, say Form inherits from control, then I can assign the Form to a variable of type Control without needing an explicit conversion, eg Form1 f = new Form1();...
1
by: adam | last post by:
h How do i get an asp checkBoxList to emit client script. I want it so that when each checkbox is clicked, i can cause some action to happen i tried CheckBoxList cbl = new CheckBoxList()...
4
by: John Salerno | last post by:
I created this enumeration: enum Status { Off = 0, Red = 1, Yellow = 2, Blue = 4, Overload = 8
2
by: Ray Cassick \(Home\) | last post by:
I have a function that takes a value is as System.Enum and I want to be able to look at that value and determine if it is a regular enum or an enum that has a <Flag()> attribute set on it. I am...
1
by: PSN | last post by:
can any one tell me if there is a way to redeclare a typedef enum to add new elements at the end .. Ex: "test.h" typedef enum test1 { hcone = 0, hctwo hcthree, hcfour,
2
by: Jigar.Patel | last post by:
Hi, I have following enum definition. public enum OperationTypes { All = 1, New = 2, View = 4,
13
by: Rohit | last post by:
Is there any way by which I can find number of elements in an enum list? Generally I use one last element at the end to find out total number of elements. e.g. typedef enum{ SUN, MON, TUE,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.