|
1 // Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // |
|
15 |
|
16 #include "Filename.h" |
|
17 |
|
18 /** |
|
19 * |
|
20 * CFileName static constructor. |
|
21 * |
|
22 * @xxxx |
|
23 * |
|
24 */ |
|
25 CFileName* CFileName::NewL() |
|
26 { |
|
27 CFileName* s = CFileName::NewLC(); |
|
28 CleanupStack::Pop(); |
|
29 return s; |
|
30 } |
|
31 |
|
32 /** |
|
33 * |
|
34 * CFileName static constructor. |
|
35 * |
|
36 * @xxxx |
|
37 * |
|
38 */ |
|
39 CFileName* CFileName::NewLC() |
|
40 { |
|
41 CFileName* s = new(ELeave) CFileName; |
|
42 CleanupStack::PushL(s); |
|
43 return s; |
|
44 } |
|
45 |
|
46 /** |
|
47 * |
|
48 * CFileName assignment operator. |
|
49 * |
|
50 * @xxxx |
|
51 * |
|
52 */ |
|
53 TFileName& CFileName::operator=(const TText* aString) |
|
54 { |
|
55 iBuf = aString; |
|
56 return iBuf; |
|
57 } |
|
58 |
|
59 /** |
|
60 * |
|
61 * CFileName assignment operator. |
|
62 * |
|
63 * @xxxx |
|
64 * |
|
65 */ |
|
66 TFileName& CFileName::operator=(const TDesC& aDes) |
|
67 { |
|
68 iBuf = aDes; |
|
69 return iBuf; |
|
70 } |
|
71 |
|
72 /** |
|
73 * |
|
74 * CFileName assignment operator. |
|
75 * |
|
76 * @xxxx |
|
77 * |
|
78 */ |
|
79 TFileName& CFileName::operator=(const TPtrC16& aPtr) |
|
80 { |
|
81 iBuf = aPtr; |
|
82 return iBuf; |
|
83 } |
|
84 |
|
85 /** |
|
86 * |
|
87 * CFileName assignment operator. |
|
88 * |
|
89 * @xxxx |
|
90 * |
|
91 */ |
|
92 TFileName& CFileName::operator=(const TFileName& aBuf) |
|
93 { |
|
94 iBuf = aBuf; |
|
95 return iBuf; |
|
96 } |
|
97 |
|
98 /** |
|
99 * |
|
100 * CFileName assignment operator. |
|
101 * |
|
102 * @xxxx |
|
103 * |
|
104 */ |
|
105 TFileName& CFileName::operator=(const CFileName& aFilename) |
|
106 { |
|
107 iBuf = aFilename.FileName(); |
|
108 return iBuf; |
|
109 } |
|
110 |
|
111 /** |
|
112 * |
|
113 * CFileName copy function wrapper |
|
114 * |
|
115 * @xxxx |
|
116 * |
|
117 */ |
|
118 void CFileName::Copy(const TDesC8 &aDes) |
|
119 { |
|
120 iBuf.Copy(aDes); |
|
121 } |
|
122 |
|
123 /** |
|
124 * |
|
125 * CFileName copy function wrapper |
|
126 * |
|
127 * @xxxx |
|
128 * |
|
129 */ |
|
130 void CFileName::Copy(const TDesC16 &aDes) |
|
131 { |
|
132 iBuf.Copy(aDes); |
|
133 } |
|
134 |
|
135 /** |
|
136 * |
|
137 * CFileName copy function wrapper |
|
138 * |
|
139 * @xxxx |
|
140 * |
|
141 */ |
|
142 void CFileName::Copy(const TUint16 *aBuf,TInt aLength) |
|
143 { |
|
144 iBuf.Copy(aBuf,aLength); |
|
145 } |
|
146 |
|
147 /** |
|
148 * |
|
149 * CFileName copy function wrapper |
|
150 * |
|
151 * @xxxx |
|
152 * |
|
153 */ |
|
154 void CFileName::Copy(const TUint16 *aString) |
|
155 { |
|
156 iBuf.Copy(aString); |
|
157 } |
|
158 |
|
159 /** |
|
160 * |
|
161 * CFileName location function wrapper |
|
162 * |
|
163 * @xxxx |
|
164 * |
|
165 */ |
|
166 TInt CFileName::Locate(TChar aChar) const |
|
167 { |
|
168 return iBuf.Locate(aChar); |
|
169 } |
|
170 |
|
171 /** |
|
172 * |
|
173 * CFileName left function wrapper |
|
174 * |
|
175 * @xxxx |
|
176 * |
|
177 */ |
|
178 TPtrC16 CFileName::Left(TInt aLength) const |
|
179 { |
|
180 return iBuf.Left(aLength); |
|
181 } |
|
182 |
|
183 /** |
|
184 * |
|
185 * CFileName accessor : file name |
|
186 * |
|
187 * @xxxx |
|
188 * |
|
189 */ |
|
190 TFileName CFileName::FileName() const |
|
191 { |
|
192 return iBuf; |
|
193 } |
|
194 |
|
195 |