|
1 /** |
|
2 * Copyright (c) 2003-2009 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: |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 |
|
20 /** |
|
21 @file |
|
22 */ |
|
23 |
|
24 #ifndef __CMTF_TEST_PARAMETER_H__ |
|
25 #define __CMTF_TEST_PARAMETER_H__ |
|
26 |
|
27 #include <e32base.h> |
|
28 #include "TMtfTestParameterType.h" |
|
29 |
|
30 /** Represents a parameter stored by the test case. Test case manipulates a set of |
|
31 parameters which can be used by test actions of the test case. Each parameter is stored |
|
32 as a pointer to TAny. Type information is also sored in the form of a generic type id and |
|
33 a specific type id. Parameter is identified by its name. */ |
|
34 class CMtfTestParameter: public CBase |
|
35 { |
|
36 public: |
|
37 |
|
38 /** Creates a new parameter instance and takes ownership of the TAny pointer. Ownership |
|
39 is taken at the END of the function. aParameter must be on the cleanup stack. */ |
|
40 static CMtfTestParameter* NewL(const TDesC& aName, TMtfTestParameterGeneralType aGeneralTypeId, |
|
41 TMtfTestParameterSpecificType aSpecificTypeId, TAny* aParameter); |
|
42 |
|
43 TMtfTestParameterGeneralType GeneralTypeId() const; |
|
44 TMtfTestParameterSpecificType SpecificTypeId() const; |
|
45 TAny* Parameter() const; |
|
46 const TDesC& Name() const; |
|
47 virtual ~CMtfTestParameter(); |
|
48 |
|
49 private: |
|
50 CMtfTestParameter(TMtfTestParameterGeneralType aGeneralTypeId, |
|
51 TMtfTestParameterSpecificType aSpecificTypeId); |
|
52 void ConstructL(const TDesC& aName); |
|
53 |
|
54 private: |
|
55 TAny* iParameter; |
|
56 TMtfTestParameterGeneralType iGeneralTypeId; |
|
57 TMtfTestParameterSpecificType iSpecificTypeId; |
|
58 HBufC* iName; |
|
59 }; |
|
60 |
|
61 #endif |