UIQ Technology
Symbian OS Library

UIQ 3.1 SDK        UIQ developer portal

[Index] [Spacer] [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
    }