| Author |
Message |
|
2008/03/12 18:57
|
|
|
orenshochat
Joined: 2007/03/06
Messages: 10
Offline
|
|
|
|
Hi there.
My company finally purchased VP, mainly due to a lot of pressure I've put to replace Visio. I've imported my C++ classes from code and Visio. It looks great and the current version + sp looks far more mature than the evaluation I've tried a year ago.
The first thing that troubles me is that I use a lot of Smart Pointers (mainly boost library Shared Pointer template).
A lot of Class's Data members that look like this:
-m_Member : boost.shared_ptr<Associated_Class>
Are actually associations to the class – regular pointers wrapped by mini-garbage collector. VP however doesn't recognize those members as associations to the Associated_Class, but as associations to boost.shared_ptr.
This is a reasonable behavior, but is there any way to bypass that?
boost.shared_ptr<Class X> is really the same (UML wise) as *X (A pointer to class X).
I want VP to interpret boost.shared_ptr<Class X> as a regular association type with my Class X.
|
|
|
|
 |
| |
|
2008/03/14 08:34
|
|
|
Jick
Joined: 2005/04/29
Messages: 2881
Offline
|
|
|
|
Hi orenshochat,
Thank you for choosing Visual Paradigm, and bringing your problem into our attention. I will ask our engineers if we can support your requirement. Will keep you informed.
Best regards,
Jick
|
Visual Paradigm International Ltd.
http://www.visual-paradigm.com
Build Quality Applications Faster, Better and Cheaper |
|
|
|
 |
| |
|
2008/03/14 18:47
|
|
|
Jick
Joined: 2005/04/29
Messages: 2881
Offline
|
|
|
|
Hi orenshochat,
Could you provide me with some sample code to reproduce the problem?
Best regards,
Jick
|
Visual Paradigm International Ltd.
http://www.visual-paradigm.com
Build Quality Applications Faster, Better and Cheaper |
|
|
|
 |
| |
|
2008/03/16 17:00
|
|
|
orenshochat
Joined: 2007/03/06
Messages: 10
Offline
|
|
|
|
This is not really a bug, it is a WAD - Worked As Designed.
But I'm looking for a way to bypass that.
Some background:
A smart pointer is a template for holding a simple pointer. It provides with automatic memory freeing once the pointer loses scope. It is very common practice in C++.
I'm using Boost free library smart pointers (also a common practice in c++)
Sample
Class A
{
};
Class B
{
boost::smart_ptr<A> m_pToType_A;
};
Class B has a smart pointer member that points to an A type object. This is really similar to :
Class B
{
A* m_pToType_A;
};
However visual paradigm doesn't see it that way and doesn't create the association between Class A and B. Instead it builds an association between B and smart_ptr.
I need a way to bypass that, a way to tell VP that "boost::smart_ptr<A> " is the same as "*A" regarding association
|
|
|
|
 |
| |
|
2008/03/16 17:01
|
|
|
orenshochat
Joined: 2007/03/06
Messages: 10
Offline
|
|
|
|
|
 |
| |
|
2008/03/18 10:27
|
|
|
Rain
Joined: 2005/04/29
Messages: 758
Offline
|
|
|
|
Hello orenshochat,
Thanks for the samples. I've forwarded the details to our engineers to follow-up. Once there are any feedbacks, I'll comeback to you immediately. If you need any help, please do not hesitate to contact me again.
Best regards,
Rain Wong
|
|
|
|
 |
| |
|
2008/03/18 15:49
|
|
|
Rain
Joined: 2005/04/29
Messages: 758
Offline
|
|
|
|
Hello orenshochat,
Our engineers had tested your issue but unable to repeat your problem. Attached is the sample we used and the generated project file. Can you have a look and see is the sample correct?
Best regards,
Rain Wong
| Description |
|
Download
|
| Filesize |
14 kb
|
| Downloaded: |
73 time(s) |
| Description |
|
Download
|
| Filesize |
71 bytes
|
| Downloaded: |
70 time(s) |
|
|
|
|
 |
| |
|
2008/03/18 17:15
|
|
|
orenshochat
Joined: 2007/03/06
Messages: 10
Offline
|
|
|
|
Take the sample you placed.
Delete the association arrow. Now we have class A and Class B on the Static (class) diagam.
Left Click on Class B Attribute - "-m_pToType_A : boost.smart_ptr<A>"
Right Click on it. The popup menu has only "Create association" not SHOW association.
It can only create association between B and boost.smart_ptr.
I wish to bypass that.
|
|
|
|
 |
| |
|
2008/03/28 15:43
|
|
|
LilianWong
Joined: 2008/02/22
Messages: 713
Offline
|
|
|
|
Hi orenshochat,
Thank you for your details. Our engineers have investigated and fixed the problem already. Please download and try the patch in the following link and see if it solves the problem.
http://files4.visual-paradigm.com/200803/Patch/sp1_20080311x/VP_Suite_Windows_3_2_sp1_20080311x.exe
To use the patch:
1. Exit any running instance of VP
2. Install by overwriting the current installation
3. Restart the product.
Note: This patch is made for VP Suite 3.2 SP1 (VP-UML 6.2 SP1). Please make sure you have a valid product license. Otherwise you won't be able to start up the product after the installation.
If there are any inquiries, please feel free to contact me.
Best regards,
Lilian Wong
|
|
|
|
 |
| |