Symbian code is laid out in a standard way. Symbian developers and organisations usually have existing preferences for these issues. This information is provided to help you to read Symbian code, even if you do not choose to adopt the same layout yourself.
the number of headers included is minimised, forward references being preferred where possible.
the standard anti-nesting method is used to avoid multiple inclusion of headers: for example,
Symbian code uses the following conventions for laying out class declarations:
access control specifiers are always given for readability
class members are declared in the following order: public member functions, protected member functions, private member functions, protected data, private data, public data. The appropriate access specifier is given at the start of each group.
for readability, function arguments are named in the function declaration as well as the definition
virtual functions that replace inherited behaviour are grouped together in the header, with a comment documenting from which class the behaviour is inherited
the virtual keyword is not given for these functions
virtual functions are not made inline, as it is difficult to know exactly how a compiler treats these. The exception to this are virtual inline destructors, which are allowed.
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License v1.0.