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 "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".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
16 #ifndef __STRINGPOOL_INL__
17 #define __STRINGPOOL_INL__
20 #include <stringpoolerr.h>
22 inline RStringTokenBase::RStringTokenBase()
24 /** Default constructor. */
29 inline RStringTokenBase RStringTokenBase::operator=(RStringBase aVal)
30 /** Assignment operator, which makes a string token from a string.
32 @param aVal The value of the string to copy.
33 @return The string token base. */
40 inline TBool RStringTokenBase::IsNull() const
41 /** Tests if the string is null or not.
43 @return ETrue if the string is null, otherwise EFalse. */
49 inline TBool RStringToken::operator==(RStringToken aVal) const
50 /** Equality operator.
52 @param aVal The string to compare.
53 @return ETrue if the strings are the same, otherwise EFalse. */
55 return iVal == aVal.iVal;
59 inline TBool RStringToken::operator!=(RStringToken aVal) const
60 /** Inequality operator.
62 @param aVal The string to compare.
63 @return ETrue if the strings are different, else EFalse */
65 return iVal != aVal.iVal;
69 inline RStringToken RStringToken::operator=(RString aVal)
70 /** Assignment operator, which makes a string token from a string.
72 @param aVal The string to copy.
73 @return The string token. */
80 inline TBool RStringTokenF::operator==(RStringTokenF aVal) const
81 /** Equality operator.
83 @param aVal The string to compare.
84 @return ETrue if the strings are the same, otherwise EFalse. */
86 return iVal == aVal.iVal;
90 inline TBool RStringTokenF::operator!=(RStringTokenF aVal) const
91 /** Inequality operator.
93 @param aVal The string to compare.
94 @return ETrue if any strings are different, else EFalse */
96 return iVal != aVal.iVal;
100 inline RStringTokenF RStringTokenF::operator=(RStringF aVal)
101 /** Assignment operator that makes a string token from a string.
103 @param aVal The string to compare.
104 @return The string token. */
111 inline RStringBase::RStringBase()
113 /** Default constructor. */
117 /** Returns a compact string equivalent to the string */
118 inline RStringBase::operator RStringTokenBase() const
125 inline RString RString::Copy()
128 Both the original and the copy must be separately closed.
130 @return The string to copy. */
136 /** Returns a compact string equivalent to the string (for case-sensitive strings) */
137 inline RString::operator RStringToken() const
144 inline RStringF RStringF::Copy()
147 Both the original and the copy must be separately closed.
149 @return The string to copy. */
156 inline TBool RStringF::operator==(const RStringF& aVal) const
157 /** Equality operator.
159 @param aVal The string to compare.
160 @return ETrue if the strings are equal, else EFalse */
162 __ASSERT_DEBUG(iPool.iImplementation==aVal.iPool.iImplementation || aVal.iVal==0 || iVal==0, StringPoolPanic::Panic(StringPoolPanic::EComparisonBetweenTwoStringPoolsNotAllowed));
163 return (iVal == aVal.iVal);
167 inline TBool RStringF::operator!=(const RStringF& aVal) const
168 /** Inequality operator.
170 @param aVal The string to compare.
171 @return ETrue if the strings are not equal, else EFalse */
173 __ASSERT_DEBUG(iPool.iImplementation==aVal.iPool.iImplementation || aVal.iVal==0 || iVal==0, StringPoolPanic::Panic(StringPoolPanic::EComparisonBetweenTwoStringPoolsNotAllowed));
174 return (iVal != aVal.iVal);
178 inline RStringF::operator RStringTokenF() const
186 inline RStringPool RStringBase::Pool() const
187 /** Gets the string pool.
189 @return The string pool. */
195 inline TBool RString::operator==(const RString& aVal) const
196 /** Equality operator.
198 @param aVal The string to compare.
199 @return ETrue if the strings are equal, else EFalse */
201 __ASSERT_DEBUG(iPool.iImplementation==aVal.iPool.iImplementation || aVal.iVal==0 || iVal==0, StringPoolPanic::Panic(StringPoolPanic::EComparisonBetweenTwoStringPoolsNotAllowed));
202 return (iVal == aVal.iVal);
206 inline TBool RString::operator!=(const RString& aVal) const
207 /** Inequality operator.
209 @param aVal The string to compare.
210 @return ETrue if the strings are not equal, else EFalse */
212 __ASSERT_DEBUG(iPool.iImplementation==aVal.iPool.iImplementation || aVal.iVal==0 || iVal==0, StringPoolPanic::Panic(StringPoolPanic::EComparisonBetweenTwoStringPoolsNotAllowed));
213 return (iVal != aVal.iVal);
216 inline RStringPool::RStringPool()
218 /** Default constructor. */
223 #endif // __STRINGPOOL_INL__