Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

[Index] [Glossary] [Previous] [Next]



How to write a derived class with two-phase construction

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

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

class CCompoundDerived::ConstructL()
 {
 CCompound::ConstructL();
 // own construction
 }