Boolean array in Papyrusrt [message #1844652] |
Mon, 20 September 2021 12:14 |
Shruthi Basavaraju Messages: 4 Registered: September 2021 |
Junior Member |
|
|
I want to create an attribute in my capsule with type array which can hold Boolean values.
Is there a way to do it ? I looked up in the attribute type window and unsure about what type to select and how to use it.
Thanks & Regards
Shruthi
Thanks & Regards
Shruthi B
|
|
|
Re: Boolean array in Papyrusrt [message #1844663 is a reply to message #1844652] |
Mon, 20 September 2021 17:49 |
Ernesto Posse Messages: 438 Registered: March 2011 |
Senior Member |
|
|
In the Model Explorer, right-click on the capsule, select "New UML-RT Child > Attribute", give it a name. Then select the attribute itself, and in the Properties view, in the UML tab, set the Type field to Boolean by clicking the button with dots [...] to browse for types. You can find several boolean types: under the "Primitive Types" library, you'll get the UML Boolean type, under the "EcorePrimitiveTypes", you'll get the Ecore Boolean type, and under the "Ansi C" library, you'll get the plain C bool type. For the purpose of code generation, all of them will result in the C++ bool type. Once you've set the attribute type to Boolean, set the "Multiplicity" field to the size of the array. It has the format n..m. So if you want an array of size 5, type 5..5.
|
|
|
|
Powered by
FUDForum. Page generated in 0.02631 seconds