Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Copy_Disabled Class Reference

Helper class to disable copy construction and assignment. More...

#include <Copy_Disabled.h>

List of all members.

Public Methods

 ACE_Copy_Disabled (void)
 Default constructor. More...

Private Methods

 ACE_Copy_Disabled (const ACE_Copy_Disabled &)
ACE_Copy_Disabled & operator= (const ACE_Copy_Disabled &)

Detailed Description

Helper class to disable copy construction and assignment.

Classes used to control OS and other resources are not "canonical", i.e. they have their copy constructor and assignment operators disabled. This is often done by making the copy constructor and assignment operators private, effectively disallowing copying by clients of the class (including derived classes). If the copy constructor and assingment operators are left unimplemented then the class itself cannot make any copies of its instances, because it would result in link errors.

To use this class simply use private inheritance:

class Foo : private ACE_Copy_Disabled { // code here };

Definition at line 47 of file Copy_Disabled.h.

Constructor & Destructor Documentation

ACE_Copy_Disabled::ACE_Copy_Disabled void   

Default constructor.

Definition at line 19 of file Copy_Disabled.cpp.

00020 {
00021 }

ACE_Copy_Disabled::ACE_Copy_Disabled const ACE_Copy_Disabled &    [private]

Member Function Documentation

ACE_Copy_Disabled& ACE_Copy_Disabled::operator= const ACE_Copy_Disabled &    [private]

The documentation for this class was generated from the following files:
Generated on Mon Jun 16 12:46:57 2003 for ACE by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002