sftemplateswizard/com.nokia.s60tools.symbianfoundationtemplates/templates/c_class_header_template.h
author dpodwall
Tue, 12 Jan 2010 13:17:53 -0600
changeset 0 61163b28edca
permissions -rw-r--r--
initial EPL conversion
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
0
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     1
/*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     2
* ============================================================================
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     3
*  Name        : ?filename.h
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     4
*  Part of     : ?Subsystem_name / ?Module_name
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     5
*  Description : ?Description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     6
*  Version     : %version: %
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     7
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     8
*  Copyright © ?year-?year ?Company_copyright.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
     9
*  All rights reserved.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    10
*  This component and the accompanying materials are made available
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    11
*  under the terms of the License "?License"
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    12
*  which accompanies this distribution, and is available
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    13
*  at the URL "?LicenseUrl".
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    14
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    15
*  Initial Contributors:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    16
*  ?Company_name - initial contribution.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    17
*
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    18
*  Contributors:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    19
*  ?Company_name
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    20
* ============================================================================
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    21
* Template version: 4.2
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    22
*/
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    23
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    24
*** INSTRUCTIONS TO THE TEMPLATE USER:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    25
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    26
*** This template follows the Symbian Foundation coding conventions.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    27
*** Remove all unneeded declarations and definitions before checking 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    28
*** the file in!  Also remove the template's usage instructions, that is, 
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    29
*** everything that begins with "***".
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    30
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    31
*** The copyright years should be < the year of the file's creation >
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    32
*** - < the year of the file's latest update >.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    33
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    34
*** Words that begin with "?" are for you to replace with your own
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    35
*** identifiers, filenames, or comments.  ?IMPORT_C means either the
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    36
*** IMPORT_C visibility directive, or nothing, depending on whether
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    37
*** the function is to be exported or not.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    38
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    39
*** To support building on Linux, use only forward slashes in include
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    40
*** directives.  Also, all filenames and pathnames must be completely
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    41
*** in lowercase.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    42
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    43
*** Indent four spaces per step, using spaces, not tabs, to display
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    44
*** the code consistently across different editors.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    45
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    46
*** A C class (except for CBase) will derive from exactly one C class, and
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    47
*** from zero or more M classes.  A C class owns heap-allocated (dynamic)
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    48
*** memory, and thus needs an explicit destructor.  A C class may be
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    49
*** instantiated only on the heap.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    50
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    51
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    52
#ifndef ?C_CLASSNAME_H
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    53
#define ?C_CLASSNAME_H
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    54
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    55
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    56
*** system include files go here:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    57
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    58
#include <?include_file>
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    59
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    60
*** user include files go here:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    61
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    62
#include "?include_file"
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    63
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    64
*** forward declarations go here:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    65
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    66
class ?forward_classname;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    67
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    68
*** external data types go here:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    69
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    70
/**  ?description */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    71
extern ?data_type;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    72
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    73
*** global function prototypes (which should be very rare) go here:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    74
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    75
/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    76
 * ?description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    77
 *
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    78
 * @since S60 ?S60_version
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    79
 * @param ?arg1 ?description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    80
 * @return ?description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    81
 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    82
?type ?function_name( ?arg_list );
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    83
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    84
*** constants go here:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    85
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    86
/**  ?description */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    87
const ?type ?constant_var = ?constant;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    88
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    89
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    90
*** the class declaration goes here:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    91
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    92
/**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    93
 *  ?one_line_short_description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    94
 *  ?more_complete_description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    95
 *
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    96
 *  @code
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    97
 *   ?good_class_usage_example(s)
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    98
 *  @endcode
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
    99
 *
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   100
 *  @lib ?library
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   101
 *  @since S60 ?S60_version *** for example, S60 v3.0
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   102
 */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   103
class ?classname : public ?base_class_list
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   104
    {
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   105
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   106
*** friend classes go here:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   107
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   108
    friend class ?class1;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   109
    friend class ?class2;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   110
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   111
public:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   112
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   113
*** data types go here:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   114
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   115
    /**  ?description */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   116
    enum ?declaration
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   117
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   118
    /**  ?description */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   119
    typedef ?declaration
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   120
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   121
*** non-derived functions go here, starting with the Symbian
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   122
*** constructors and the C++ destructor:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   123
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   124
    ?IMPORT_C static ?classname* NewL();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   125
    ?IMPORT_C static ?classname* NewLC();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   126
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   127
    /**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   128
     * Two-phased constructor.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   129
     * @param ?arg1 ?description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   130
     * @param ?arg2 ?description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   131
     */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   132
    ?IMPORT_C static ?classname* NewL(?type1 ?arg1, ?type2 ?arg2);
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   133
    
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   134
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   135
    /**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   136
    * Destructor.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   137
    */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   138
    virtual ~?classname();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   139
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   140
    /**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   141
     * ?description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   142
     *
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   143
     * @since S60 ?S60_version
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   144
     * @param ?arg1 ?description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   145
     * @param ?arg2 ?description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   146
     * @return ?description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   147
     */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   148
    ?IMPORT_C ?type ?member_function( ?type1 ?arg1, ?type2 ?arg2 );
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   149
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   150
// from base class ?base_class1
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   151
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   152
*** declarations of functions derived from base_class1 are grouped
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   153
*** together here:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   154
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   155
    /**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   156
     * From ?base_class1.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   157
     * ?description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   158
     *
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   159
     * @since S60 ?S60_version
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   160
     * @param ?arg1 ?description
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   161
     */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   162
    ?IMPORT_C ?type ?member_function( ?type ?arg1 );
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   163
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   164
// from base class ?base_class2
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   165
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   166
*** function declarations as above
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   167
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   168
protected:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   169
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   170
*** function declarations as above
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   171
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   172
// from base class ?base_class2
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   173
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   174
*** function declarations as above
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   175
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   176
// from base class ?base_class3
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   177
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   178
*** function declarations as above
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   179
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   180
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   181
private:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   182
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   183
*** private, non-derived functions go here, starting with the C++
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   184
*** constructor and the Symbian second-phase constructor
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   185
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   186
    ?classname();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   187
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   188
    void ConstructL();
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   189
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   190
*** other function declarations as above
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   191
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   192
*** avoid the use of public or protected data; data should nearly
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   193
*** always be accessed through getter and setter functions
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   194
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   195
private: // data
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   196
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   197
    /**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   198
     * ?description_of_member
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   199
     */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   200
    ?type ?member_name;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   201
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   202
    /**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   203
     * ?description_of_pointer_member
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   204
     * Own.  *** Write "Own" if this class owns the object pointed to; in
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   205
                 other words, if this class is responsible for deleting it.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   206
     */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   207
    ?type* ?member_name;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   208
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   209
    /**
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   210
     * ?description_of_pointer_member
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   211
     * Not own.  *** Write "Not own" if some other class owns this object.
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   212
     */
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   213
    ?type* ?member_name;
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   214
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   215
    };
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   216
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   217
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   218
*** put the inline functions, if any, in a file included here:
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   219
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   220
#include "?include_file.inl"
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   221
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   222
61163b28edca initial EPL conversion
dpodwall
parents:
diff changeset
   223
#endif // ?C_CLASSNAME_H