Hello all,

Enums were not supported in VC++ up to Rose 2000e,
but this has changed in Rose 2001. This is from the releasenotes:
http://www.rational.com/support/documentation/release/v2001/rose_relnote.htm
l
------------------
Improved C++ Language Support
Rational Rose Visual C++ now supports the following C++ language constructs:

Enumerated types (enum keyword) 
typedef type declarations 
Nested classes 
------------------

For their usage please see the following entries of the online help:

Code Generated for Enums 
Enum Tab (Model Assistant) 
Enumeration Attributes Tab (Model Assistant)

Please be aware of the following from the online help of Rose 2001 on:
=======================================
Reverse Engineering Enums -- Visual C++
=======================================
Enums are reverse engineered as a class, stereotyped <<enum>>, that contains
its enumerations as class attributes. Enums must be coded with no more than
one element per line. For example: 

enum Color
{
        red = 1,
        green, 
        blue 
}; 

An enum written as: 

enum Color  { red = 1, green, blue }; 

results in a parse error and is ignored. This is interpreted as multiple
declarations on a single line, which is not currently supported. 
=======================================

Regards, Lara

======================================================================
         Please reply also to [EMAIL PROTECTED] 
         Please preserve your CaseID in the subject line 
======================================================================
Upgrades to Rose 2000e Unix and to Rose 2001 Windows:   
http://www.rational.com/support/downloadcenter/upgrades/rose.jsp
Rose Technotes: 
http://www.rational.com/support/technotes/index.jsp
Rose Unix patches:   
ftp://ftp.rational.com/patch_info/index.html         
New licensing service:
http://www.rational.com/accountlink
======================================================================

Lara Ziosi
Technical Support Engineer
Rational Software               Phone:             +31 (0)20 4546 200
Beechavenue 30                  Fax:               +31 (0)20 4546 201
1119 PV  Schiphol-Rijk          Email:    [EMAIL PROTECTED]
The Netherlands                 Web:  http://www.rational.com/support

======================================================================


> -----Original Message-----
> From: Mathieu Girard [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 03, 2001 5:16 PM
> To: David R. Stockwell; Aker, Eric
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: (ROSE) enum types
> 
> 
> Hi all,
> 
> This is how we deal with enums in my project.
> 
> 1. I model the enum as a class (just as Eric said), using 
> attributes as
> enumerated values, without defining any type, and optionaly using the
> attribute value to specify the value for the enumerated item.
> 
> 2. I set the "ClassKey" C++ property for the class to "enum".
> 
> 3. I launch the home made attached script, which scans the 
> whole model for
> classes which have the "ClassKey" property set to "enum", and 
> stores the
> explicit C++ enum code in their "ImplementationType" property .
> 
> 4. All I have to do is generate the code, since Rose will 
> replace the usual
> class generation with the "ImplementationType" content.
> 
> Hope it helps
> 
> Regards,
> 
> Mathieu Girard
> Software Architect
> 
> Ubi Soft Entertainment
> 
> P.S.
> This script works with Rose98, I do not know how it will work 
> on recent
> releases.
> 
> -----Message d'origine-----
> De: David R. Stockwell [mailto:[EMAIL PROTECTED]]
> Date: jeudi 28 d�cembre 2000 23:01
> �: Aker, Eric
> Cc: '[EMAIL PROTECTED]'
> Objet: Re: (ROSE) enum types
> 
> 
> 
> Eric,
> 
> Thanks for the help.  Yes according to the Rose help file, enum is not
> supported as part of it's code generation for VC++ (at least 
> thats the way I
> believe the file reads).   I'd expect the true msvc to 
> support it as it's a
> standard type.
> 
> I'll take a look at your suggestions and see what can be done.
> 
> Thanks
> 
> David Stockwell
> ----- Original Message -----
> From: "Aker, Eric" <[EMAIL PROTECTED]>
> To: "'David R. Stockwell'" <[EMAIL PROTECTED]>;
> "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]>
> Sent: Thursday, December 28, 2000 5:04 PM
> Subject: RE: (ROSE) enum types
> 
> 
> > Since you start with saying that enum is not supported in CV++ ???
> >
> > I would model them as attributes.
> > Stereotype the class as <<enum>>
> >
> >
> > In the classic C++ code generator you would set the enum 
> type and values
> > in the code generation properties.
> >
> >
> >
> > -----Original Message-----
> > From: David R. Stockwell [mailto:[EMAIL PROTECTED]]
> > Sent: Thursday, December 28, 2000 9:24 AM
> > To: '[EMAIL PROTECTED]'
> > Subject: (ROSE) enum types
> >
> >
> > Hello all,
> >
> > I noticed in the help file, enum types are unsupported for VC++.
> >
> > How do I specify an enum type in my rose model?  According to help I
> > just name the class as
> >
> > <<enum>> myenumtype
> >
> >
> > How/where do I put the (items and)  values associated with 
> each of the
> > enumerated items?
> >
> > as in
> >
> > enum x
> > {
> >    x_unassigned = 0,
> >    x_something=1,
> >    x_other = 2,
> >    // etc
> > };
> >
> > Thanks in advance
> >
> > David Stockwell
> >
> 
> **************************************************************
> **********
> * 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
> *
> **************************************************************
> ***********
> 
> 
************************************************************************
* 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