Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Namespace Members   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.

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 };

Constructor & Destructor Documentation

ACE_Copy_Disabled::ACE_Copy_Disabled void   

Default constructor.

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 Fri Apr 2 16:47:49 2004 for ACE by doxygen1.2.18