diff -r 000000000000 -r e4d67989cc36 lowlevellibsandfws/apputils/inc/StringTableSupport.h --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lowlevellibsandfws/apputils/inc/StringTableSupport.h Tue Feb 02 02:01:42 2010 +0200 @@ -0,0 +1,67 @@ +/* +* Copyright (c) 2001 Nokia Corporation and/or its subsidiary(-ies). +* All rights reserved. +* This component and the accompanying materials are made available +* under the terms of "Eclipse Public License v1.0" +* which accompanies this distribution, and is available +* at the URL "http://www.eclipse.org/legal/epl-v10.html". +* +* Initial Contributors: +* Nokia Corporation - initial contribution. +* +* Contributors: +* +* Description: +* +*/ + + +#ifndef __STRINGTABLESUPPORT_H__ +#define __STRINGTABLESUPPORT_H__ + +/** +@internalComponent +*/ +#define _STLIT8(name,s) const static TStLitC8 name={sizeof(s)-1,s} + +// A class that differs from TLitC only in that it does not have a +// dereference operator defined +//##ModelId=3B1E52AB0100 +template +class TStLitC8 +/** +@internalComponent +*/ + { +public: + inline operator const TDesC8&() const; + inline const TDesC8& operator()() const; + inline operator const __TRefDesC8() const; +public: + //##ModelId=3B1E52AB0120 + TUint iTypeLength; + //##ModelId=3B1E52AB0117 + TText8 iBuf[__Align8(S)]; + }; + +template +inline const TDesC8& TStLitC8::operator()() const + { + return *REINTERPRET_CAST(const TDesC8*,this); + } + +template +inline TStLitC8::operator const TDesC8&() const + { + return *REINTERPRET_CAST(const TDesC8*,this); + } + +template +inline TStLitC8::operator const __TRefDesC8() const + { + return *REINTERPRET_CAST(const TDesC8*,this); + } + +struct TStringTable; + +#endif // __STRINGTABLESUPPORT_H__