Main Page   Modules   Class Hierarchy   Compound List   File List   Compound Members   File Members  

delete.h File Reference

Include this file right after IObject.h (or instead of) to detect accidental uses of "delete" on an XPLC interface. More...

Go to the source code of this file.

Compounds

class  CheckIObjectOk
 class CheckIObject {}; More...

class  ConversionIObject
 class CheckIObjectOkVector {}; More...


Defines

#define xplcdelete   CheckIObjectOk() &&
 Macro used to indicate a valid use of the delete keyword with an XPLC interface.

#define delete   CheckIObject() &&
 Overriding the delete keyword.

#define deletev   CheckIObjectOkVector() &&
 Remplacement for delete[].


Functions

template<class T> void operator && (CheckIObject, const T *obj)
 struct XPLC_CTAssert<true> {};


Detailed Description

Include this file right after IObject.h (or instead of) to detect accidental uses of "delete" on an XPLC interface.

Use "xplcdelete" instead of "delete" when you know what you are doing.


Define Documentation

#define delete   CheckIObject() &&
 

Overriding the delete keyword.

This replaces the delete keyword with an invocation of the operator && using a specific marker class as the left operand, allowing it to be templated on the right operand.

#define deletev   CheckIObjectOkVector() &&
 

Remplacement for delete[].

Because we cannot capture usage of delete[] using macros, we have to add a replacement for it, unfortunately.

#define xplcdelete   CheckIObjectOk() &&
 

Macro used to indicate a valid use of the delete keyword with an XPLC interface.

In some cases, you really need to use delete on an object that derives from IObject. In those cases, use "xplcdelete" instead of "delete".


Generated on Sun Sep 26 04:01:25 2004 for XPLC by doxygen1.2.18