Vector<string>

Hello,

I am evaluating SDE for VC++ (VP_Suite_Windows_2_3_sp3_20061111.exe) and I could not figure out how to create the model of an interface which would generate me the following C++ code:


#pragma once

#include <vector>
#include <string>

class ITest
{
public:
	virtual void op1(std::vector<std::string> p1) = 0;
};
 

What it does is it replaces my std.vector<std.string> to vector, in the tree view it shows std.vector but the generated code is std::vector only:

 
#pragma once

class ITest
{
public:
	virtual void op1(std::vector p1) = 0;

};
 

-update-
I have tried it from VP-UML, I could see std.vector<std.string> after I have turned on Fully-Qualified Types, however the generated code from VP-UML is not what I expected either:

 
#include <string>
#include <vector>
#include <exception>
using namespace std;

#ifndef __ITest_h__
#define __ITest_h__

class ITest
{

	public virtual void op1(std_vector aP1) = 0;
};

#endif

After I have opened the same project in SDE and then in VP-UML the std. specification has disappeared altogether.

My other question would be is there a way to keep VP-UML and SDE in synch while both are running ? I could only synch them by saving the file and closing the applications. Why is saving the file not enough?

Thank you.

Joe

Hi joe-kuzlovsky,

Thank you for your post. I have passed this issue on to our engineers. Once I have received a reply from them, I will post here.

Best regards,
Jick

Please note that we will consider the purchase of your products based the quality of your support as well. Our projects have tight schedules and cannot afford slips due to blocking issues from 3rd parties.

I consider my question relatively simple and easy to answer. You either fully support templates and namespaces or you don’t.

Hi joe-kuzlovsky,

I am very sorry for the delay. We are still checking the problem. I will come back to you as soon as I can.

Once again, sorry for any inconvenience this problem may cause you.

Best regards,
Jick

I am evaluating Borland Together 2006 Release 2 now, it is quite capable. It has a lot of useful features which is missing from VisualParadigm products but the opposite is true as well. I have posted a question on their forum today, I wonder what will be their response time be, for a similar simple question.

Hi Joe,

The problem is fixed. Please download the patch at:
http://files4.visual-paradigm.com/200611/Hotfix/5-3-3_sp3_20061117/vpplatform.jar

The following page shows you how to install the patch:
http://resource.visual-paradigm.com/tips_and_tricks/general/replacing_hot_fix.html

Please feel free to let me know if there are any questions.

Have a nice weekend!

Best regards,
Jick

Jick,

Well done! It has been fixed, I wish you have had posted a reply: problem identified and we are working on the bugfix, I would not have started looking for something else then.

  1. It works much better now, although I think it seems that it wasn’t fixed in VP-UML. I also didnt understand how VP Suite 2.3\resources\instantgenerator\cplusplus\header\CPlusPlusClass.vm is used, it includes string, vector and exception in every header ?

  2. One issue is still remaining however, I forgot to specify the namespace in the model at design and I figured this out at the generation/compilation stage, so if I update the model it does not regenerate the code with the namespace (it does it from the code to the model). (steps: I had string in the model, generated the code, replaced string to std.string, generated the code, it generated string not std::string.

  3. Also I didn’t get a reply whether it is possible to have VP-UML and SDE open at the same time using the same project files and have them synchronized.

  4. An other bug is that if you delete the generated file from the project and click to “Update to code”, nothing happens because it cant find the file (it was deleted). I wanted to delete a file after the generator becomes confused and I would want a fresh generation, but this is apparently not the way to get around the problem, but still it is still a bug.

Joe

Hi Joe,

Thank you for your reply. You are right, I should keep posting the status here. Sorry about this.

1, 2. I will ask our engineers to look into this two issues again.

  1. Sorry but they cannot be synchronized. I suggest you try the project export/import feature to bring to changes from one instance of project to another one. To export, select File > Export > VP-UML Project from the main menu.

  2. Please try the ‘Force Update’ option. This will recreate the deleted file for you. You should see this option next to the “Update to Code” option.

Best regards,
Jick

Hi Joe,

The problem in VP-UML, about Instant Generator, is fixed. I will send you a patch as soon as possible.

Best regards,
Jick

Jick,

Thank you for the answer.

  1. Your suggestion seems to work but it is a bit old fashioned solution, Windows has a file notification feature for many years now; UNIX has had it for even longer, most programs usually use it to notify you that the file being edited has changed and offer you an option to reload it or ignore. Could you schedule it with a low priority task please?

  2. a) I tried the ‘Force Update’ option, first I thought that the program locked up but then eventually after about 5 minutes it finished generating a project with 5 classes. It is unfortunately dependent on the number of classes because after I have added more classes it locked up for a longer time, in fact I am still waiting for it after an hour. I am not sure what causes this but after a successful force update issuing a force update second time it regenerates instantly. If your engineers cannot reproduce it I could investigate more what causes it and give you an update.

  3. b) Second, I could not find the ‘Force Update’ option for a single class in the pop-up menu, only found it for the whole project in the toolbar. It will not acceptable for us to regenerate the whole project with hundreds of classes when we want to fix a problem with 1 class. Is it possible to invoke this function for a specific class only ?

  4. c) And last, Force Update looses the namespace. I have a “str op(std::map<std::string, std::int> m);” in the code and Force Update does not replace this method but adds a new one “str op(map<string, int> &m);”.

Having fixed these problems your tool will be much more useful as a round-trip engineering tool - one which we are looking for. Thank you.

Joe

Hi Joe,

The patch for the problem occurred in VP-UML is ready. Please download at:
http://files4.visual-paradigm.com/200611/Patch/5-3-3_sp3_20061117b/vpplatform.jar

Please follow the page below for the steps for installing the patch:
http://resource.visual-paradigm.com/tips_and_tricks/general/replacing_hot_fix.html

I will post again once a complete release is ready.

Please try it first. I will come back to you as soon as I can for the new suggestions and comments.

Best regards,
Jick

Hi Joe,

  1. No problem. I already asked our developers to review your need.

4a. Sorry about this. Is it possible to send me your solution (the one with a project with 5 classes) and the .vpp project so that we can repeat this problem? Second, have you installed any other addons to your VS?

4b. I will let you know as soon as I can.

4c. I have asked our engineers to take a look at this problem. If they can repeat this, they will fix it and I will send you the patch. If not, I hope that you could provide me with some steps. Thanks a lot.

Finally, if you will send me something, please send to my email address:
jick@visual-paradigm.com

instead of posting in forum, especially for your project file. Thank you in advance!

Best regards,
Jick