equal
deleted
inserted
replaced
|
1 // Copyright (c) 2008-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of the License "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #ifndef T_NEW_CLASSES |
|
17 #define T_NEW_CLASSES |
|
18 |
|
19 #include <e32cmn.h> |
|
20 |
|
21 /** |
|
22 A flag to record what part of lifecylce an object is in |
|
23 */ |
|
24 enum TObjState |
|
25 { |
|
26 ENull = 0, |
|
27 EConstructed = 1, |
|
28 EDeconstructed = 2 |
|
29 }; |
|
30 |
|
31 class XCtorAndDtor |
|
32 { |
|
33 public: |
|
34 XCtorAndDtor(); |
|
35 ~XCtorAndDtor(); |
|
36 TObjState iState; |
|
37 }; |
|
38 |
|
39 class XCtorOnly |
|
40 { |
|
41 public: |
|
42 XCtorOnly(); |
|
43 TObjState iState; |
|
44 }; |
|
45 |
|
46 class XDtorOnly |
|
47 { |
|
48 public: |
|
49 ~XDtorOnly(); |
|
50 TObjState iState; |
|
51 }; |
|
52 |
|
53 class XNoTors |
|
54 { |
|
55 public: |
|
56 TObjState iState; |
|
57 }; |
|
58 |
|
59 //A buffer length for an object so large that we always |
|
60 //expect allocation to fail. |
|
61 const TInt KOOMBufferLength=10000000; |
|
62 |
|
63 class XVeryLargeClassCtorAndDtor |
|
64 { |
|
65 public: |
|
66 XVeryLargeClassCtorAndDtor(); |
|
67 ~XVeryLargeClassCtorAndDtor(); |
|
68 TInt iBust[KOOMBufferLength]; |
|
69 }; |
|
70 |
|
71 class XVeryLargeClassCtorOnly |
|
72 { |
|
73 public: |
|
74 XVeryLargeClassCtorOnly(); |
|
75 TInt iBust[KOOMBufferLength]; |
|
76 }; |
|
77 |
|
78 class XVeryLargeClassDtorOnly |
|
79 { |
|
80 public: |
|
81 ~XVeryLargeClassDtorOnly(); |
|
82 TInt iBust[KOOMBufferLength]; |
|
83 }; |
|
84 |
|
85 class XVeryLargeClassNoTors |
|
86 { |
|
87 public: |
|
88 TInt iBust[KOOMBufferLength]; |
|
89 }; |
|
90 |
|
91 #endif //T_NEW_CLASSES |