|
1 /* |
|
2 * Copyright (c) 2007-2008 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: text attribute model |
|
15 * |
|
16 */ |
|
17 |
|
18 |
|
19 #include "hnattributetext.h" |
|
20 |
|
21 |
|
22 // ============================ MEMBER FUNCTIONS ============================= |
|
23 |
|
24 |
|
25 // --------------------------------------------------------------------------- |
|
26 // |
|
27 // --------------------------------------------------------------------------- |
|
28 // |
|
29 CHnAttributeText::CHnAttributeText() |
|
30 { |
|
31 iAttributeType = ETextAttribute; |
|
32 } |
|
33 |
|
34 // --------------------------------------------------------------------------- |
|
35 // |
|
36 // --------------------------------------------------------------------------- |
|
37 // |
|
38 CHnAttributeText::~CHnAttributeText() |
|
39 { |
|
40 iValue.Close(); |
|
41 } |
|
42 |
|
43 // --------------------------------------------------------------------------- |
|
44 // |
|
45 // --------------------------------------------------------------------------- |
|
46 // |
|
47 EXPORT_C CHnAttributeText* CHnAttributeText::NewL() |
|
48 { |
|
49 CHnAttributeText* self = NewLC(); |
|
50 CleanupStack::Pop( self ); |
|
51 return self; |
|
52 } |
|
53 |
|
54 // --------------------------------------------------------------------------- |
|
55 // |
|
56 // --------------------------------------------------------------------------- |
|
57 // |
|
58 EXPORT_C CHnAttributeText* CHnAttributeText::NewLC() |
|
59 { |
|
60 CHnAttributeText* self = new ( ELeave ) CHnAttributeText; |
|
61 CleanupStack::PushL( self ); |
|
62 self->ConstructL(); |
|
63 return self; |
|
64 } |
|
65 |
|
66 // --------------------------------------------------------------------------- |
|
67 // |
|
68 // --------------------------------------------------------------------------- |
|
69 // |
|
70 void CHnAttributeText::ConstructL() |
|
71 { |
|
72 } |
|
73 |
|
74 // --------------------------------------------------------------------------- |
|
75 // |
|
76 // --------------------------------------------------------------------------- |
|
77 // |
|
78 EXPORT_C void CHnAttributeText::SetValueL ( const TDesC8& aValue ) |
|
79 { |
|
80 iValue.Close(); |
|
81 iValue.CreateL( aValue.Length() + 1 ); |
|
82 iValue.Copy( aValue ); |
|
83 } |
|
84 |
|
85 // --------------------------------------------------------------------------- |
|
86 // |
|
87 // --------------------------------------------------------------------------- |
|
88 // |
|
89 const TDesC8& CHnAttributeText::Value( ) |
|
90 { |
|
91 return iValue; |
|
92 } |
|
93 |