How to write a derived class with two-phase construction

This document illustrates how to implement two-phase construction in a derived class with example code.

When writing a derived class, you must use the derived class ConstructL() to call the correct base class ConstructL().

Call the base class ConstructL() before the derived-class specific construction starts. This mirrors the action of C++ constructors.

class CCompoundDerived : public CCompound
    {
public:
    ...
protected:
    ...
    void ConstructL();
private:
    ...
    };
void CCompoundDerived::ConstructL()
    {
    this->CCompound::ConstructL();
    // own construction
    }