Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


How to write a derived class with two-phase construction

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
    }