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