equal
deleted
inserted
replaced
|
1 // Copyright (c) 2003-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 "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 /** |
|
17 @file |
|
18 */ |
|
19 |
|
20 #include "CMtfTestCaseNamePair.h" |
|
21 |
|
22 CMtfTestCaseNamePair* CMtfTestCaseNamePair::NewL(const TDesC& aName, |
|
23 TestCaseNewL aFunctionPointer) |
|
24 { |
|
25 CMtfTestCaseNamePair* self = new (ELeave) CMtfTestCaseNamePair(); |
|
26 CleanupStack::PushL(self); |
|
27 self->ConstructL(aName,aFunctionPointer); |
|
28 CleanupStack::Pop(self); |
|
29 return self; |
|
30 } |
|
31 |
|
32 CMtfTestCaseNamePair::~CMtfTestCaseNamePair() |
|
33 { |
|
34 delete iName; |
|
35 } |
|
36 |
|
37 CMtfTestCase* CMtfTestCaseNamePair::CreateTestCaseL(const CMtfTestServer& aTestServer) const |
|
38 { |
|
39 return (*iFunctionPointer)(aTestServer); |
|
40 } |
|
41 |
|
42 void CMtfTestCaseNamePair::ConstructL(const TDesC& aName, |
|
43 TestCaseNewL aFunctionPointer) |
|
44 { |
|
45 iName = aName.AllocL(); |
|
46 iFunctionPointer = aFunctionPointer; |
|
47 } |
|
48 |
|
49 const TDesC& CMtfTestCaseNamePair::Name() const |
|
50 { |
|
51 // iName is guaranteed not to be NULL |
|
52 return *iName; |
|
53 } |