IBM Support

I need to declare a copy constructor but not define it.

Technote (FAQ)


Question

I need to declare a copy constructor but not define it.

Answer

C++ allows a user to declare a copy constructor but not define it to prevent other classes from doing a copy of the object. Rhapsody forces the user to create a dummy implementation or leave the implementation empty, but either way Rhapsody still generates a definition of the constructor in either the header file or the implementation file.
 
You can do this currently by using the property CG::Class::StandardOperations, along with its supporting properties (see the Properties Reference Guide).
1483AnswerProduct versionPartner ContentInternal ContentCategoryReference IDAuthor

Historical Number

10430

Document information

More support for: Rational Rhapsody
General Information

Software version: Version Independent

Operating system(s): Platform Independent

Reference #: 1323721

Modified date: 27 October 2010