It is currently Thu Feb 09, 2012 1:13 am

All times are UTC



Welcome
Welcome to RHAPSODY4YOU

You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, respond to polls, upload and download content, and access many other special features. Registration is fast, simple, and absolutely free, so please, register to join our community today.





 Page 1 of 1 [ 3 posts ] 
Author Message
 Post subject: Modifying a keyword from a property in code generation
PostPosted: Tue Mar 17, 2009 3:46 pm 

Joined: Fri May 23, 2008 7:23 am
Posts: 6
I am generating code (in java) from a Rhapsody model.
In most cases the code template comes from properties (such as CG:Attribute:Accessor) containing keywords recognised by the code generator ( ex: $attribute in get$attribute:c ).

My pb: I would like to modify the keyword substition result. For example, some of my attributes are starting with "m_" (ex: int m_toto; ) and I'd like to generate code substituting "m_" by "My" (ex: int getMyToto(); ). Does anyone know if this is possible and how ?

Thanks in advance.


Offline
 Profile  
 
 Post subject:
PostPosted: Tue Mar 17, 2009 8:31 pm 

Joined: Thu Aug 30, 2007 4:31 pm
Posts: 152
Location: Germany
at least for Rhapsody In C++ this can be done with ...

Model::Attribute::UsePrefix (default is m_)
Model::Attribute::Prefix (to change it to something else)

Then

CG:Attribute::Accessor::getMy$attribute

not excatly what you want ... but .. mmh ? let me know


Offline
 Profile  
 
 Post subject:
PostPosted: Wed Mar 18, 2009 2:04 pm 

Joined: Fri May 23, 2008 7:23 am
Posts: 6
Thanks for your answer. This is an interesting solution.
It may help me finding a workaround (eventually with the help of stereotypes).


Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 1 [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:


suspicion-preferred