|
1 /* |
|
2 * Copyright (c) 2002-2004 Nokia Corporation and/or its subsidiary(-ies). |
|
3 * All rights reserved. |
|
4 * This component and the accompanying materials are made available |
|
5 * under the terms of "Eclipse Public License v1.0" |
|
6 * which accompanies this distribution, and is available |
|
7 * at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
8 * |
|
9 * Initial Contributors: |
|
10 * Nokia Corporation - initial contribution. |
|
11 * |
|
12 * Contributors: |
|
13 * |
|
14 * Description: Type object used for RTTI. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 // INCLUDE FILES |
|
21 #include "xntype.h" |
|
22 |
|
23 // EXTERNAL DATA STRUCTURES |
|
24 //extern ?external_data; |
|
25 |
|
26 // EXTERNAL FUNCTION PROTOTYPES |
|
27 //extern ?external_function( ?arg_type,?arg_type ); |
|
28 |
|
29 // CONSTANTS |
|
30 //const ?type ?constant_var = ?constant; |
|
31 |
|
32 // MACROS |
|
33 //#define ?macro ?macro_def |
|
34 |
|
35 // LOCAL CONSTANTS AND MACROS |
|
36 //const ?type ?constant_var = ?constant; |
|
37 //#define ?macro_name ?macro_def |
|
38 |
|
39 // MODULE DATA STRUCTURES |
|
40 //enum ?declaration |
|
41 //typedef ?declaration |
|
42 |
|
43 // LOCAL FUNCTION PROTOTYPES |
|
44 //?type ?function_name( ?arg_type, ?arg_type ); |
|
45 |
|
46 // FORWARD DECLARATIONS |
|
47 //class ?FORWARD_CLASSNAME; |
|
48 |
|
49 // ============================= LOCAL FUNCTIONS =============================== |
|
50 |
|
51 // ----------------------------------------------------------------------------- |
|
52 // ?function_name ?description. |
|
53 // ?description |
|
54 // Returns: ?value_1: ?description |
|
55 // ?value_n: ?description_line1 |
|
56 // ?description_line2 |
|
57 // ----------------------------------------------------------------------------- |
|
58 // |
|
59 //?type ?function_name( |
|
60 // ?arg_type arg, // ?description |
|
61 // ?arg_type arg) // ?description |
|
62 // { |
|
63 |
|
64 // ?code // ?comment |
|
65 |
|
66 // ?comment |
|
67 // ?code |
|
68 // } |
|
69 |
|
70 |
|
71 // ============================ MEMBER FUNCTIONS =============================== |
|
72 |
|
73 // ----------------------------------------------------------------------------- |
|
74 // CXnType::CXnType |
|
75 // C++ default constructor can NOT contain any code, that |
|
76 // might leave. |
|
77 // ----------------------------------------------------------------------------- |
|
78 // |
|
79 EXPORT_C CXnType::CXnType() |
|
80 { |
|
81 } |
|
82 |
|
83 // ----------------------------------------------------------------------------- |
|
84 // CXnType::ConstructL |
|
85 // Symbian 2nd phase constructor can leave. |
|
86 // ----------------------------------------------------------------------------- |
|
87 // |
|
88 EXPORT_C void CXnType::ConstructL(const TDesC8& aType) |
|
89 { |
|
90 iType = &aType; |
|
91 } |
|
92 |
|
93 // ----------------------------------------------------------------------------- |
|
94 // CXnType::NewL |
|
95 // Two-phased constructor. |
|
96 // ----------------------------------------------------------------------------- |
|
97 // |
|
98 EXPORT_C CXnType* CXnType::NewL(const TDesC8& aType) |
|
99 { |
|
100 CXnType* self = new( ELeave ) CXnType; |
|
101 |
|
102 CleanupStack::PushL( self ); |
|
103 self->ConstructL(aType); |
|
104 CleanupStack::Pop(); |
|
105 |
|
106 return self; |
|
107 } |
|
108 |
|
109 |
|
110 // Destructor |
|
111 EXPORT_C CXnType::~CXnType() |
|
112 { |
|
113 // delete iType; |
|
114 } |
|
115 |
|
116 // ----------------------------------------------------------------------------- |
|
117 // CXnType::Type |
|
118 // Get the type identifier |
|
119 // ----------------------------------------------------------------------------- |
|
120 EXPORT_C const TDesC8& CXnType::Type() |
|
121 { |
|
122 return *iType; |
|
123 } |
|
124 |
|
125 |
|
126 // ========================== OTHER EXPORTED FUNCTIONS ========================= |
|
127 |
|
128 // ----------------------------------------------------------------------------- |
|
129 // ?function_name implements... |
|
130 // ?implementation_description. |
|
131 // Returns: ?value_1: ?description |
|
132 // ?value_n: ?description |
|
133 // ?description |
|
134 // ----------------------------------------------------------------------------- |
|
135 // |
|
136 //?type ?function_name( |
|
137 // ?arg_type arg, // ?description |
|
138 // ?arg_type arg ) // ?description |
|
139 // { |
|
140 |
|
141 // ?code |
|
142 |
|
143 // } |
|
144 |
|
145 |
|
146 // End of File |