|
1 // Copyright (c) 2001-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 the License "Symbian Foundation License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.symbianfoundation.org/legal/sfl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // StringTableSupport.h |
|
15 // |
|
16 // This file contains defines needed by the auto-generated string table files. |
|
17 // There is no reason why a manualy written cpp file outsinde the string pool |
|
18 // implementation should include it. |
|
19 // |
|
20 |
|
21 #ifndef __STRINGTABLESUPPORT_H__ |
|
22 #define __STRINGTABLESUPPORT_H__ |
|
23 |
|
24 /** |
|
25 @internalComponent |
|
26 */ |
|
27 #define _STLIT8(name,s) const static TStLitC8<sizeof(s)> name={sizeof(s)-1,s} |
|
28 |
|
29 // A class that differs from TLitC only in that it does not have a |
|
30 // dereference operator defined |
|
31 //##ModelId=3B1E52AB0100 |
|
32 template <TInt S> |
|
33 class TStLitC8 |
|
34 /** |
|
35 @internalComponent |
|
36 */ |
|
37 { |
|
38 public: |
|
39 inline operator const TDesC8&() const; |
|
40 inline const TDesC8& operator()() const; |
|
41 inline operator const __TRefDesC8() const; |
|
42 public: |
|
43 //##ModelId=3B1E52AB0120 |
|
44 TUint iTypeLength; |
|
45 //##ModelId=3B1E52AB0117 |
|
46 TText8 iBuf[__Align8(S)]; |
|
47 }; |
|
48 |
|
49 template <TInt S> |
|
50 inline const TDesC8& TStLitC8<S>::operator()() const |
|
51 { |
|
52 return *REINTERPRET_CAST(const TDesC8*,this); |
|
53 } |
|
54 |
|
55 template <TInt S> |
|
56 inline TStLitC8<S>::operator const TDesC8&() const |
|
57 { |
|
58 return *REINTERPRET_CAST(const TDesC8*,this); |
|
59 } |
|
60 |
|
61 template <TInt S> |
|
62 inline TStLitC8<S>::operator const __TRefDesC8() const |
|
63 { |
|
64 return *REINTERPRET_CAST(const TDesC8*,this); |
|
65 } |
|
66 |
|
67 struct TStringTable; |
|
68 |
|
69 #endif // __STRINGTABLESUPPORT_H__ |