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" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __STRINGPOOL_INL__
17 #define __STRINGPOOL_INL__
21 inline RStringTokenBase::RStringTokenBase()
23 /** Default constructor. */
28 inline RStringTokenBase RStringTokenBase::operator=(RStringBase aVal)
29 /** Assignment operator, which makes a string token from a string.
31 @param aVal The value of the string to copy.
32 @return The string token base. */
39 inline TBool RStringTokenBase::IsNull() const
40 /** Tests if the string is null or not.
42 @return ETrue if the string is null, otherwise EFalse. */
48 inline TBool RStringToken::operator==(RStringToken aVal) const
49 /** Equality operator.
51 @param aVal The string to compare.
52 @return ETrue if the strings are the same, otherwise EFalse. */
54 return iVal == aVal.iVal;
58 inline TBool RStringToken::operator!=(RStringToken aVal) const
59 /** Inequality operator.
61 @param aVal The string to compare.
62 @return ETrue if the strings are different, else EFalse */
64 return iVal != aVal.iVal;
68 inline RStringToken RStringToken::operator=(RString aVal)
69 /** Assignment operator, which makes a string token from a string.
71 @param aVal The string to copy.
72 @return The string token. */
79 inline TBool RStringTokenF::operator==(RStringTokenF aVal) const
80 /** Equality operator.
82 @param aVal The string to compare.
83 @return ETrue if the strings are the same, otherwise EFalse. */
85 return iVal == aVal.iVal;
89 inline TBool RStringTokenF::operator!=(RStringTokenF aVal) const
90 /** Inequality operator.
92 @param aVal The string to compare.
93 @return ETrue if any strings are different, else EFalse */
95 return iVal != aVal.iVal;
99 inline RStringTokenF RStringTokenF::operator=(RStringF aVal)
100 /** Assignment operator that makes a string token from a string.
102 @param aVal The string to compare.
103 @return The string token. */
110 inline RStringBase::RStringBase()
112 /** Default constructor. */
116 /** Returns a compact string equivalent to the string */
117 inline RStringBase::operator RStringTokenBase() const
124 inline RString RString::Copy()
127 Both the original and the copy must be separately closed.
129 @return The string to copy. */
135 /** Returns a compact string equivalent to the string (for case-sensitive strings) */
136 inline RString::operator RStringToken() const
143 inline RStringF RStringF::Copy()
146 Both the original and the copy must be separately closed.
148 @return The string to copy. */
155 inline TBool RStringF::operator==(const RStringF& aVal) const
156 /** Equality operator.
158 @param aVal The string to compare.
159 @return ETrue if the strings are equal, else EFalse */
161 __ASSERT_DEBUG(iPool.iImplementation==aVal.iPool.iImplementation || aVal.iVal==0 || iVal==0, StringPoolPanic::Panic(StringPoolPanic::EComparisonBetweenTwoStringPoolsNotAllowed));
162 return (iVal == aVal.iVal);
166 inline TBool RStringF::operator!=(const RStringF& aVal) const
167 /** Inequality operator.
169 @param aVal The string to compare.
170 @return ETrue if the strings are not equal, else EFalse */
172 __ASSERT_DEBUG(iPool.iImplementation==aVal.iPool.iImplementation || aVal.iVal==0 || iVal==0, StringPoolPanic::Panic(StringPoolPanic::EComparisonBetweenTwoStringPoolsNotAllowed));
173 return (iVal != aVal.iVal);
177 inline RStringF::operator RStringTokenF() const
185 inline RStringPool RStringBase::Pool() const
186 /** Gets the string pool.
188 @return The string pool. */
194 inline TBool RString::operator==(const RString& aVal) const
195 /** Equality operator.
197 @param aVal The string to compare.
198 @return ETrue if the strings are equal, else EFalse */
200 __ASSERT_DEBUG(iPool.iImplementation==aVal.iPool.iImplementation || aVal.iVal==0 || iVal==0, StringPoolPanic::Panic(StringPoolPanic::EComparisonBetweenTwoStringPoolsNotAllowed));
201 return (iVal == aVal.iVal);
205 inline TBool RString::operator!=(const RString& aVal) const
206 /** Inequality operator.
208 @param aVal The string to compare.
209 @return ETrue if the strings are not equal, else EFalse */
211 __ASSERT_DEBUG(iPool.iImplementation==aVal.iPool.iImplementation || aVal.iVal==0 || iVal==0, StringPoolPanic::Panic(StringPoolPanic::EComparisonBetweenTwoStringPoolsNotAllowed));
212 return (iVal != aVal.iVal);
215 inline RStringPool::RStringPool()
217 /** Default constructor. */
222 #endif // __STRINGPOOL_INL__