testdev/ite/test/com.nokia.testfw.cmdtool.test/test.resource/unittest/several.mmp.in.one.path/SysLibs/ECom/InterfaceImplementation/CImplementationClassTwo.cpp
equal
deleted
inserted
replaced
|
1 // |
|
2 // CImplementationClassTwo.cpp |
|
3 // Copyright © 1997-2001 Symbian Ltd. All rights reserved. |
|
4 // |
|
5 |
|
6 #include "CImplementationClassTwo.h" |
|
7 |
|
8 // Construction and destruction functions |
|
9 |
|
10 CImplementationClassTwo* CImplementationClassTwo::NewL(TAny* aParams) |
|
11 { |
|
12 CImplementationClassTwo* self=new(ELeave) CImplementationClassTwo(aParams); |
|
13 CleanupStack::PushL(self); |
|
14 self->ConstructL(); |
|
15 CleanupStack::Pop(); |
|
16 return self; |
|
17 } |
|
18 |
|
19 CImplementationClassTwo::~CImplementationClassTwo() |
|
20 { |
|
21 delete iDescriptor; |
|
22 } |
|
23 |
|
24 CImplementationClassTwo::CImplementationClassTwo(TAny* aInitParams) |
|
25 : iInitParams((CExampleInterface::TExampleInterfaceInitParams*)aInitParams) |
|
26 { |
|
27 // See ConstructL() for initialisation completion. |
|
28 } |
|
29 |
|
30 void CImplementationClassTwo::ConstructL() |
|
31 // Safely complete the initialization of the constructed object |
|
32 { |
|
33 // Set up the data to pass back |
|
34 _LIT(KDescriptor, "Using Implementation Two\n"); |
|
35 iDescriptor = KDescriptor().AllocL(); |
|
36 } |
|
37 |
|
38 |
|
39 // Implementation of CExampleInterface |
|
40 |
|
41 void CImplementationClassTwo::DoMethodL(TDes& aString) |
|
42 { |
|
43 aString = *iDescriptor; |
|
44 |
|
45 if (iInitParams) |
|
46 iInitParams->integer=2; |
|
47 } |
|
48 |