PM Library classes

class PMNonCopyable

? ^ 
Prohibit copy construction and copy assignment.

Class noncopyable is a base class. Derive your own class from noncopyable when you want to prohibit copy construction and copy assignment.

Some objects, particularly those which hold complex resources like files or network connections, have no sensible copy semantics. Sometimes there are possible copy semantics, but these would be of very limited usefulness and be very difficult to implement correctly. Sometimes you're implementing a class that doesn't need to be copied just yet and you don't want to take the time to write the appropriate functions. Deriving from noncopyable will prevent the otherwise implicitly-generated functions (which don't have the proper semantics) from becoming a trap for other programmers.

The traditional way to deal with these is to declare a private copy constructor and copy assignment, and then document why this is done. But deriving from noncopyable is simpler and clearer, and doesn't require additional documentation.

Source:
pm_noncopyable.h:40
Author:
Dmitry A.Steklenev
Version:
$Revision: 1.2 $

Contents

^ 
EntityTypeScopeShort Description
PMNonCopyableconstructor publicConstructs the noncopyable object.

constructor PMNonCopyable

? ^ 
Constructs the noncopyable object.
Source:
pm_noncopyable.h:43
Code:
public PMNonCopyable ( )

Created Fri Aug 3 09:13:16 2012.
This documentation was generated automatically by
ccdoc v08r39 2003/02/27 bin_opt_emx_os2-2.30.
Click here to submit a bug report or feature request for ccdoc.
Click here to return to the top of the page.