Macro to declare funtions required in a container.
Macro to declare funtions required in a container. This macro is used to declare all the functions that should be implemented for a working container class. It will also define some inline code for some standard function behaviour.This may be used when multiple inheritance requires a special class declaration. Normally, the PDECLARE_CONTAINER macro would be used, which includes this macro in it.
The default implementation for contructors, destructor, the assignment operator and the MakeUnique() function is as follows:
cls(const cls & c) : par(c) { CopyContents(c); } cls & operator=(const cls & c) { par::operator=(c); return *this; } cls(int dummy, const cls * c) : par(dummy, c) { CloneContents(c); } virtual ~cls() { Destruct(); } BOOL MakeUnique() { if (par::MakeUnique()) return TRUE; CloneContents(c); return FALSE; }Then the DestroyContents(), CloneContents() and CopyContents() functions are declared and must be implemented by the programmer. See the PContainer class for more information on these functions.
Alphabetic index HTML hierarchy of classes or Java