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 is really the same (UML wise) as *X (A pointer to class X).
I want VP to interpret boost.shared_ptr as a regular association type with my Class X.
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.
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++)
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.
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.
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?
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.