|
It is currently Wed Feb 08, 2012 11:54 pm
|
View unanswered posts | View active topics
| Welcome |
|
Welcome to RHAPSODY4YOU
You are currently viewing our boards as a guest, which gives you limited access to view most discussions and access our other features. By joining our free community, you will have access to post topics, respond to polls, upload and download content, and access many other special features. Registration is fast, simple, and absolutely free, so please, register to join our community today. |
 |
|
 |
|
|
shanz
|
Post subject: Re: GOF Design Pattern Profile Posted: Tue Nov 10, 2009 11:43 am |
Joined: Wed May 07, 2008 3:50 pm Posts: 148 Location: Horsham, W Sussex, England
|
|
Mickey,
I thought I'd wait 2 years to reply!
I can see that you use "CG::Class::StandardOperations" but what does that mean exactly? I guess you added the new properties to your prp file when you generated the stereotype but a user doesn't need that same prp file. Is that true?
What does the word you type in StandardOperations mean/do? It doesn't appear in any generated code does it? You chose the word 'singleton' but I suppose you could equally have called it 'anythingILike'?
I know it all works nicely but my lack of understanding is bothering me!
Another thing - How can I see what property changes are related to a stereotype from the PredefinedTypes? For instance, <<Mutex>> - what property changes were made when this stereotype was constructed?
Thanks.
|
|
|
|
 |
|
Farquad
|
Post subject: Re: GOF Design Pattern Profile Posted: Tue Nov 10, 2009 8:10 pm |
Joined: Thu Sep 13, 2007 7:34 pm Posts: 397 Location: London
|
|
The standard operations are explained very well in Rhapsody help. Just do a search.
Personally I don't like the GoF singleton pattern and, in addition, standard ops don't animate which can cause havoc. Try animating and using the GoF singleton and you'll see what I mean.
|
|
|
|
 |
|
shanz
|
Post subject: Re: GOF Design Pattern Profile Posted: Tue Nov 24, 2009 2:48 pm |
Joined: Wed May 07, 2008 3:50 pm Posts: 148 Location: Horsham, W Sussex, England
|
|
Farquad,
You say standard operations don't animate. Do you think it would matter for auto-generating private (undefined) copy constructors and copy assignment operators? Our coding standard says," Always define or disable copying for classes with reference semantics. A class has reference semantics if bitwise copying is not appropriate. For example, classes that own resources such as dynamically allocated memory, file handles, mutexes and so on, should not be bitwise copied. To define copying behaviour a class must define both a copy constructor and a copy assignment operator. To disable copying declare both a private and undefined copy constructor and copy assignment operator; or, preferably, inherited privately from boost::noncopyable as this expresses the class’ copy semantics declaratively. For example: class Widget : private boost::noncopyable { … }; or
class Widget { … private: Widget(const Widget&); // declared but not defined Widget& operator= (const Widget&); // declared but not defined };
Alexandrescu & Sutter Item 52 & 53 Myers Item 14 "
|
|
|
|
 |
|
|
 |
|
 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|