1 /* |
|
2 * Copyright (c) 2007 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: Implemenation file for enumValue for variants. |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include <osn/osnnew.h> |
|
20 #include "alfenumvalue.h" |
|
21 |
|
22 namespace Alf |
|
23 { |
|
24 |
|
25 // ======== MEMBER FUNCTIONS ======== |
|
26 |
|
27 // --------------------------------------------------------------------------- |
|
28 // Constructor. |
|
29 // --------------------------------------------------------------------------- |
|
30 // |
|
31 AlfEnumValue::AlfEnumValue(int aValue, TAlfUnit aUnit) |
|
32 { |
|
33 mEnum = aValue; |
|
34 mUnit = aUnit; |
|
35 } |
|
36 |
|
37 // --------------------------------------------------------------------------- |
|
38 // Destructor. |
|
39 // --------------------------------------------------------------------------- |
|
40 // |
|
41 AlfEnumValue::~AlfEnumValue() |
|
42 { |
|
43 |
|
44 } |
|
45 |
|
46 // --------------------------------------------------------------------------- |
|
47 // Gets the enum value. |
|
48 // --------------------------------------------------------------------------- |
|
49 // |
|
50 int AlfEnumValue::enumValue() const |
|
51 { |
|
52 return mEnum; |
|
53 } |
|
54 |
|
55 // --------------------------------------------------------------------------- |
|
56 // Gets the type of the atrribute value. |
|
57 // --------------------------------------------------------------------------- |
|
58 // |
|
59 AlfAttributeValueType::Type AlfEnumValue::type() const |
|
60 { |
|
61 return EInt; |
|
62 } |
|
63 |
|
64 // --------------------------------------------------------------------------- |
|
65 // Gets the unit. |
|
66 // --------------------------------------------------------------------------- |
|
67 // |
|
68 TAlfUnit AlfEnumValue::unit() const |
|
69 { |
|
70 return mUnit; |
|
71 } |
|
72 |
|
73 } // Alf |
|