hiho,

Specifically to *generate* the enum, I would use an inner class with the
ImplementationType property set appropriately.

When using the code generation language of C++ (and I just tried ANSI C++
and I couldn't quickly get it to work the same way), create class MyEnums
and create an nested class entitled First (to create the nested class you
right click on the class in the browser tree and select New | Nested Class).

Double-click on the nested class First in the browser tree and go to the C++
tab.  Set the ImplementationType to be "enum {First = 1, First2, First3}".

Generate code and see if it is what you want.  It does not look exactly like
your example below, but it is the same to my (possibly weak) eye.

           ------ b

--
Brian G. Lyons
Number Six Software - Voted Rational's Best Complementary Service Provider
1655 North Fort Myer Drive, Suite 1100
Arlington, VA 22209-3196
http://www.numbersix.com


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Srivatsan
Chakravarthy
Sent: Tuesday, March 06, 2001 7:22 PM
To: [EMAIL PROTECTED]
Subject: (ROSE) declaring enums inside class



I've been trying to find a way in Rose to represent a
set of enums within a class. Does anyone know how to
do this ? The code I have in mind is as follows:

 class MyEnums {
   public:
     enum First { FIRST1=1, FIRST2, FIRST3 };
     enum Second { SECOND1=1, SECOND2 } ;

   private:
     MyEnums() {}
  }

Thanks!
Sriv

=====
-Sriv

************************************************************************
* Rose Forum is a public venue for ideas and discussions.
* For technical support, visit http://www.rational.com/support
*
* Admin.Subscription Requests: [EMAIL PROTECTED]
* Archive of messages: 
http://www.rational.com/products/rose/usergroups/rose_forum.jtmpl
* Other Requests: [EMAIL PROTECTED]
*
* To unsubscribe from the list, please send email
*
* To: [EMAIL PROTECTED]
* Subject:<BLANK>
* Body: unsubscribe rose_forum
*
*************************************************************************

Reply via email to