UML Modelling and Codegeneration related discussions » Modelling with UML » How can I automatically create Accessor and Mutator for Interfaces?


How can I automatically create Accessor and Mutator for Interfaces?

2891 Betrachtungen
Seite: 1
ph2nd
avatar
Community Member
8 Beiträge

How can I automatically create Accessor and Mutator for Interfaces?

Hello guys,
I have the problem that I want to get or set attributes of a class which is realized by an interface. At the moment I must write all accessor and mutator by hand. What shall I do that Rhapsody do the work for me?
Thanks for help.

Greetz,

ph2nd

Walter
avatar
Moderator
29 Beiträge

Re: How can I automatically create Accessor and Mutator for Interfaces?

There are properties for an attribute that control the automatic generation of get and set operators. C_CG:Attribute:Accessorgenerate (TRUE) and C_CG:Attribute:Mutatorgenerate (Always or Smart). You can set this attribute at Class level to et it for all attributes in the class or package or model level to enlarge the scope. This should also work for interfaces. In Rhapsody in C, attributes are not "copied" in the subclass when it inherits from a superclass/Interface BTW.

Walter

PS
When you wrote "right", i assumed you meant "write".

W.

Seite: 1

Currently Online:

There is nobody online.

Welcome to our latest member: lammils