Title: RE: (ROSE) Generating Code from Rose to Visual Basic

    Hi all,
    I am trying to generate code in vb from a component modelled in rose.
    i have some doubts regarding the mappings

    1)How is a "Sub" procedure is added in to a class

    • Make sure that you have set language for your model as ‘Visual Basic’.
    • To your class add an operation which you want to be a ‘Sub’. Make sure that you do NOT specify any return type. Now when you generate code, this operation is coded as a Sub and not as a function.
    • If you specify the return type, the same appears as a function.


    • 2)How is "optional argument " in a method �mapped in rose

    • Make sure that you have set language for your model as ‘Visual Basic’.
    • Open the specification for the operation.
    • Got to details tab and open the specification of the argument which you want to make optional.
    • You can make it optional in two ways:
      • Go to the Visual Basic tab of the specification of the argument.
      • You will see the ‘Optional’ property. Set it to True.
      • Alternatively, in the specification for the argument, in the general tab, simply specify a default value. This will automatically make the argument optional when you generate the code.

      3)How about "Paramarray" mapped in�rose

    • Make sure that you have set language for your model as ‘Visual Basic’.
    • Open the specification for the operation.
    • Got to details tab and open the specification of the argument which you want to make optional.
    • Go to the Visual Basic tab and set the property ParamArray to True.

    4)How can we map�UDT(user defined type)�as Return
    �� and �UDT as argument and UDT delaration inside class.

    • Add a class to the model, which you want to convert into  UDT.
    • Give it proper name.
    • Open the specification for it.
    • Change the stereotype to UDT.
    • Go to the ‘Attributes’ tab and add attributes, which will becomes members of the UDT.
    • Now, open the specification of the class and the open the specification of the operation.
    • For the operation, choose the UDT you just now added for the return type from the combo box. Yes, your UDT will appear in the return type combo.
    • On the similar lines, your UDT will appear in the type combo box for arguments.
    • After you are done, select the UDT class you added in the browser tree.
    • Drag it and drop it on the class inside which you want the UDT to get encapsulated.
    • Now, the UDT will appear in the ‘Nested’ tab of the specification of the class.
    • When you generate the code, the UDT declaration will appear in the class module.
    • In the specification of the UDT class, you can specify whether it is public or private.

    5)How do we map in Rose�"MTS transaction mode" settings on class properties

    I think this is not possible. I have been struggling with this. I even modified the PTY file to add MTS related stuff into it. But, VB add-in seems to be doing something and I think it does not support MTS related class properties.


    6)Can we map the Dll project properties like
    ��� compatibility,unattended execution can be set,remore server files�etc on a rose model.
    Refer to #5 response. I think this will also not be possible.

    I hope this helps you.

    Regards,
    Omkar

Reply via email to