Private destruction ? and lose parameter's name in function?

in SDE (VS2008) C++ Instant Reverse (to UML) is OK, the C++ class construction, destruction and function parameters are all parsed right. But when executing “Force update code” from the just generated UML, destruction function’s access attribution be private, and function parameters name be blank?

this hapened in case that the parameter’s type is a user class, not imbeded stereotype like int, float, char etc.

When c++ class destruction’s access attribute becomes private, we cannot instantiate the class’s object any more, and no parameter name, the function will failed to compile. I didn’t find this problem in Visual Paradigm UML, so … is my step wrong or setting have some problem?

Hi Manuel,

Sorry for my late reply. I’ve passed this issue to our engineers to follow-up, if there is any feedback, I’ll come back to you immediately.

Best regards,
Lilian Wong

many thanks. I am waiting for your test feedback.

my problem:

class b;
class a {
public:
a();
~a();

void func(B* _bparam);
};

first convert to UML class model, this step is OK, the construction and destruction function are recognized, their properties are parsed correctly.

however when use force update code, the generated class code became:

class b;
class a{
public:
a();
private:
~a();

public:
void func(B*);
};

I think there exists two unexpected code generation bugs.

Hi Manuel,

Thanks for replying. I tried to repeat your problem but not successful, below are the steps I’ve taken:

  1. copy your code and save as .h file
  2. start Visual Studio 2008 and create a new project for C++
  3. open SDE-VS and select Modeling > Instant Reverse…
  4. select C++ Source and locate the .h file created in step1
  5. after reverse successfully, I select the class “a” in Instant Reverse Form Diagram dialog box to create the class diagram
  6. switch to the Class Repository, right-click on class “a” and select Force Update to Code in the popup menu
  7. the result I got is shown in my attached image

Could you tell if there is any difference between your steps and mine? If yours are different, could you please provide detailed steps which can reproduce the problem?
Also, could you send me the vp.log file inside the VPSuite/visualstudio_2008 folder?

BTW, I would like to clarify that Instant Reverse and code synchronization (Update to Code / Update to Model) are 2 different features and it’s not recommended to mixed use them.
Instant Reverse only translate the code to model, while code sync provide complete trace between code and models. If you are evaluating our product, you can simply using code sync for both reverse engineering and code generation for C++.

  • Instant Reverse is supported in Standard Edition or above while code sync is in Professional Edition or above.

Looking forward to hearing your reply.

Best regards,
Lilian Wong

parameter_name.png

I don’t know why, and try to explain the code generation results, maybe the destruction function put in private section is a smart parser’s result, but it seems this is not right for I tested in other uml tool, they all got correct result.

the parameter’s name in ordinary function erased by your ‘force update code’ command, I cannot understand why this should happen.

I tested last night, still the same problem. so attached is my sample projection, written in C++, visual studio.net 2008, vp suite sde 4.3 (20080901) evaluation edition.
Ex02_01.rar

Hi Manuel,

Thanks for the project file. With the same steps I mentioned in my previous message, I can reproduce the problem of missing parameter name but, unfortunately, I still cannot reproduce your problem of changing from public to private after Force Update to Code.

I’ve forwarded that problem of missing parameter name to our engineers to investigate. If there is any feedback, I’ll come back to your immediately.

BTW, can you tell me which build of SDE-VS are you using? You can check through Help > About SDE-VS…

Best regards,
Lilian Wong

Hi Manuel,

For both the problems you experienced, could you please try the latest build of SDE-VS and see if the problems are solved?
http://files2.visual-paradigm.com/200810/Patch/sp1_20080920e/VP_Suite_Windows_3_3_sp1_20080920e.exe

Looking forward to your response.

Best regards,
Lilian Wong

Thanks, I’m very glad to see your efficiently feed back. :smiley:

I’m definitely sure you have solved the problems in VP_Suite…20080920e.exe. However, can I ask you a new question, since you have released vp suite 3.4 on October 20, 2008, and sde included is update to 4.4, I’m wondering if these two problems are solved in that edition? (for vpsuite3.4 release is 4 days before this newly patch of 3.3)

Hi Manuel,

Thanks for replying and your another post about this issue at http://forums.visual-paradigm.com/posts/list/6481.html
I checked the latest version of SDE-VS (SDE 4.4 build 20081023) and the problem is resolved in this build as well. Could you please have another try with the latest version? Thanks!

If the problem still exists, please provide step-by-step procedure so that I can repeat the problem and report to our engineers. Thanks in advance!

Best regards,
Lilian Wong

I’m very glad to test the latest version of SDE-VS.
However I don’t know what problem is it, the download speed is too slow…

I spend more than 5 hours to download it, it still not finish, only progress 23%…Maybe the server is overloaded, too many people like your product.

Hi Manuel,

Thanks for replying. Could you please try the ftp link below and see if it’s faster?
http://files4.visual-paradigm.com/200810/Patch/sp1_20080920g/VP_Suite_Windows_3_3_sp1_20080920g.exe

Best regards,
Lilian Wong

I test the last version of 3.3 (20080920g.exe)

but still not solve the private constructor and lose parameter name.


You need to ask your engineer test more.
besides these two, I find the class diagrom not depict true class’s structure, the constructor and destructor not paint correctly.

I think it should be:

┌------------┐
│-attribute │ data member
├------------┤
│+constructor
│+~destructor
│+function1 member function
│+function2
│+…

however in this version constructor and destructor are not two lines, they write into the same row, and when use mouse drag ‘member function’ item, it switched show one of them.

I don’t know that’s why, maybe you design this, but I think it is strange.

Hi Manuel,

Thanks for replying. I apologize that I sent you the wrong build in my previous post (I should send you the build SDE 4.4 20081023). But the build 20080920g covers fixes in 20080920e, if you tried with 20080920e without problem, it should be no problem with 20080920g as well.

Anyway, I’ll forward to our engineers to investigate again for the private constructor and parameter name issues.

For the issue of not showing constructor and destructor in two lines, would you mind sending another sample project and tell me the detailed steps you have taken?
Alternatively, you can capture a flash movie of the problem so that we can take a look at the actual steps and problem. You can capture the flash movie with Wink and upload the flash movie to http://files2.visual-paradigm.com/UserUpload/?&&path=Manuel_6470/
Wink can be downloaded from http://www.debugmode.com/wink/download.php

Thanks in advance!

Best regards,
Lilian Wong

Hi Manuel,

I would like to let you know that we deployed a new build which contains fixes related to reverse C++ code, could you please have a try with the patch (this is newer that the build 20081023) below and see how it works?
http://files2.visual-paradigm.com/200810/Patch/20081026c/VP_Suite_Windows_3_4_20081026c.exe

If the problems still exist, please kindly send me some source (as mentioned in my previous post) for investigation. Thanks in advance!

Best regards,
Lilian Wong

20081026c.exe still not solve these two problems.

please see my upload file at:

http://files2.visual-paradigm.com/UserUpload/?&&path=Manuel_6470/

Hi Manuel,

Sorry for my late response. Your flash movie does help! I can repeat both the problems of missed parameter name and attribute is made to be private!
I’ve forwarded the problems to our engineers to investigate, and I’ll come back to you with news ASAP.

Best regards,
Lilian Wong

Hi Manuel,

Sorry for the delay. We fixed the problem of code synchronization on C++ already, please download the patch from the following link:
http://files2.visual-paradigm.com/200811/Patch/20081026p/VP_Suite_Windows_3_4_20081026p.exe

If there is any inquiry, please feel free to contact me.

Best regards,
Lilian Wong