sl@0
|
1 |
/*
|
sl@0
|
2 |
* Copyright (c) 2001-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
3 |
* All rights reserved.
|
sl@0
|
4 |
* This component and the accompanying materials are made available
|
sl@0
|
5 |
* under the terms of the License "Eclipse Public License v1.0"
|
sl@0
|
6 |
* which accompanies this distribution, and is available
|
sl@0
|
7 |
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
8 |
*
|
sl@0
|
9 |
* Initial Contributors:
|
sl@0
|
10 |
* Nokia Corporation - initial contribution.
|
sl@0
|
11 |
*
|
sl@0
|
12 |
* Contributors:
|
sl@0
|
13 |
*
|
sl@0
|
14 |
* Description:
|
sl@0
|
15 |
* Implementation for test object factory
|
sl@0
|
16 |
*
|
sl@0
|
17 |
*/
|
sl@0
|
18 |
|
sl@0
|
19 |
|
sl@0
|
20 |
#include "testfactory.h"
|
sl@0
|
21 |
#include "testnull.h"
|
sl@0
|
22 |
#include "testboolean.h"
|
sl@0
|
23 |
#include "testint.h"
|
sl@0
|
24 |
#include "testbigint.h"
|
sl@0
|
25 |
#include "testoctetstr.h"
|
sl@0
|
26 |
#include "testoid.h"
|
sl@0
|
27 |
#include "testgeneralizedtime.h"
|
sl@0
|
28 |
#include "testsequence.h"
|
sl@0
|
29 |
#include "testexplicittag.h"
|
sl@0
|
30 |
#include "testimplicittag.h"
|
sl@0
|
31 |
#include "testoutput.h"
|
sl@0
|
32 |
|
sl@0
|
33 |
|
sl@0
|
34 |
// Make different object for each index, else return 0
|
sl@0
|
35 |
CTestBase* TTestFactory::MakeTestLC(const TInt aIndex)
|
sl@0
|
36 |
{
|
sl@0
|
37 |
switch (aIndex)
|
sl@0
|
38 |
{
|
sl@0
|
39 |
case 0:
|
sl@0
|
40 |
return CTestNull::NewLC();
|
sl@0
|
41 |
case 1:
|
sl@0
|
42 |
return CTestBoolean::NewLC();
|
sl@0
|
43 |
case 2:
|
sl@0
|
44 |
return CTestInt::NewLC();
|
sl@0
|
45 |
case 3:
|
sl@0
|
46 |
return CTestBigInt::NewLC();
|
sl@0
|
47 |
case 4:
|
sl@0
|
48 |
return CTestOctetString::NewLC();
|
sl@0
|
49 |
case 5:
|
sl@0
|
50 |
return CTestOID::NewLC();
|
sl@0
|
51 |
case 6:
|
sl@0
|
52 |
return CTestGeneralizedTime::NewLC();
|
sl@0
|
53 |
case 7:
|
sl@0
|
54 |
return CTestSequence::NewLC();
|
sl@0
|
55 |
case 8:
|
sl@0
|
56 |
return CTestExplicitTag::NewLC();
|
sl@0
|
57 |
case 9:
|
sl@0
|
58 |
return CTestImplicitTag::NewLC();
|
sl@0
|
59 |
case 10:
|
sl@0
|
60 |
return CTestOutput::NewLC();
|
sl@0
|
61 |
default:
|
sl@0
|
62 |
return 0;
|
sl@0
|
63 |
}
|
sl@0
|
64 |
}
|