Hello Jerome,

you're right, I did misunderstood you. But that's the problem: You can't add
anything in the code generated by Rose if it's not in the preserved regions
(C++ -  not Visual C++). All additinal lines are 'killed' the next time you
generate code :(
We 'solved' the problem by moving our comments to the first line after
'...preserve=yes' like:

CatBString DBPrtAPlatz::GetSQLSelect (int ordertype)
{
  file://## begin DBPrtAPlatz::GetSQLSelect%3A091EBD0061.body preserve=yes
file://*********************************************************************
*****************
//  DBPrtAPlatz::GetSQLSelect()
//
//  build dyn. sql string for selecting obj in database
//
//  I:  int - order of result (if list)
//  O:  string with select-statement
//
file://*********************************************************************
*****************

<do something here>

file://## end DBPrtAPlatz::GetSQLSelect%3A091EBD0061.body
}

It isn't the best solution but if you get used with it, you know your
operation starts 2 lines before the comments...
At the beginning of working with Rose we tried to add preserved regions
manually, too. But that didn't und doesn't work. The ID is some kind of
encoded timestamp (Rational-support said so) that can't be imitated.

Sorry, but by this way I haven't a solution for your problems :(

Frank

+--------------------------------------------------------------------------
CAT Computer Anwendung Technologie GmbH
Niederlassung Wilnsdorf
57234 Wilnsdorf                      Tel.: ++49 2737 97008
Germany                                eMail: [EMAIL PROTECTED]
+--------------------------------------------------------------------------


----- Original Message -----
From: "Jerome Debard" <[EMAIL PROTECTED]>
To: "Frank Dueber" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Thursday, November 16, 2000 9:26 AM
Subject: Re: (ROSE) Code generation in C++


> Frank Dueber wrote:
> >
> > Hello :)
> >
> > Your first problem is solved by modifying the standart-properties of
your
> > C++ settings in Rose. Choose Tools->Option from menu and select the C++
tab.
> > In the settings for Module Body/Module Specification you'll find a row
> > called 'GenerateEmptyRegions'. Set it to 'All' or 'Preserved' (in both
> > lists) and Rose'll generate some more preserved regions in your
header/code
> > like this:
> >
> > file://## begin module%368355F400E3.includes preserve=yes
> > file://## end module%368355F400E3.includes
> >
> > Add your additional includes between this lines. Oh, I forgot: Both
lists
> > have a row called 'IncludeOrder'. I don't know if the've a default
setting -
> > I use 'ARMI' (click right mouse over the row for help). Each character
has
> > it's own region:
> >
> > A  module.AdditionalIncludes region
> > I  module.Includes region
> > M  AFX_INCLUDES group (Visual C++ only)
> > H header file
> > P precompiled header file
> > R  Rose-generated #includes.
> >
> > If you got a positive answer to your second question - please forward it
to
> > me. I searched a while but didn't find a solution :(
> >
> > Thanks,
> > Frank
> >
>
> Dear Franck,
>
> Thank you for your answer. Unfortunately, it is not exactly what
> I am looking for. It may be that I was not clear enough.
>
> Currently, Rational Rose generates for a function like this :
>
> STATUS STORAGE_DEVICE::ClearInfo ()
> {
>   file://## begin STORAGE_DEVICE::ClearInfo%39AA83B402D5.body preserve=yes
>
> <I have my own code here. This code is untouched by Rose>
>
>   file://## end STORAGE_DEVICE::ClearInfo%39AA83B402D5.body
> }
>
> What I cannot do is the following :
>
>
/***************************************************************************
**
> * STORAGE_DEVICE::ClearInfo - clear info
>  *
>  * <ClearInfo> clear the informationof the storage device
>  *
>  * RETURNS: OK or ERROR
>  */
> STATUS STORAGE_DEVICE::ClearInfo ()
> {
>   file://## begin STORAGE_DEVICE::ClearInfo%39AA83B402D5.body preserve=yes
>
> <I have my own code here. This code is untouched by Rose>
>
>   file://## end STORAGE_DEVICE::ClearInfo%39AA83B402D5.body
> }
>
> The first comment (before the function declaration) is always skipped
> when Rose re-generate the code. I understand that I probably have to
> add two lines to tell Rose not to touch this comment but I have no
> idea of what kind of '//## begin ...' and '//## end ...' lines I should
> add to do so.
>
> If I am still not clear enough, please let me know.
>
> Jerome.
>


************************************************************************
* 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