OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2004, 2005, 2006, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * This library is free software; you can redistribute it and/or | 4 * This library is free software; you can redistribute it and/or |
5 * modify it under the terms of the GNU Library General Public | 5 * modify it under the terms of the GNU Library General Public |
6 * License as published by the Free Software Foundation; either | 6 * License as published by the Free Software Foundation; either |
7 * version 2 of the License, or (at your option) any later version. | 7 * version 2 of the License, or (at your option) any later version. |
8 * | 8 * |
9 * This library is distributed in the hope that it will be useful, | 9 * This library is distributed in the hope that it will be useful, |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | 10 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
(...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
145 | 145 |
146 static void remove(StringImpl*); | 146 static void remove(StringImpl*); |
147 | 147 |
148 #if USE(CF) | 148 #if USE(CF) |
149 AtomicString(CFStringRef s) : m_string(add(s)) { } | 149 AtomicString(CFStringRef s) : m_string(add(s)) { } |
150 #endif | 150 #endif |
151 #ifdef __OBJC__ | 151 #ifdef __OBJC__ |
152 AtomicString(NSString* s) : m_string(add((CFStringRef)s)) { } | 152 AtomicString(NSString* s) : m_string(add((CFStringRef)s)) { } |
153 operator NSString*() const { return m_string; } | 153 operator NSString*() const { return m_string; } |
154 #endif | 154 #endif |
155 #if PLATFORM(QT) | |
156 AtomicString(const QString& s) : m_string(add(String(s).impl())) { } | |
157 operator QString() const { return m_string; } | |
158 #endif | |
159 #if PLATFORM(BLACKBERRY) | |
160 AtomicString(const BlackBerry::Platform::String& s) : m_string(add(String(s)
.impl())) { } | |
161 operator BlackBerry::Platform::String() const { return m_string; } | |
162 #endif | |
163 | |
164 // AtomicString::fromUTF8 will return a null string if | 155 // AtomicString::fromUTF8 will return a null string if |
165 // the input data contains invalid UTF-8 sequences. | 156 // the input data contains invalid UTF-8 sequences. |
166 static AtomicString fromUTF8(const char*, size_t); | 157 static AtomicString fromUTF8(const char*, size_t); |
167 static AtomicString fromUTF8(const char*); | 158 static AtomicString fromUTF8(const char*); |
168 | 159 |
169 #ifndef NDEBUG | 160 #ifndef NDEBUG |
170 void show() const; | 161 void show() const; |
171 #endif | 162 #endif |
172 | 163 |
173 private: | 164 private: |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
271 using WTF::textAtom; | 262 using WTF::textAtom; |
272 using WTF::commentAtom; | 263 using WTF::commentAtom; |
273 using WTF::starAtom; | 264 using WTF::starAtom; |
274 using WTF::xmlAtom; | 265 using WTF::xmlAtom; |
275 using WTF::xmlnsAtom; | 266 using WTF::xmlnsAtom; |
276 using WTF::xlinkAtom; | 267 using WTF::xlinkAtom; |
277 #endif | 268 #endif |
278 | 269 |
279 #include <wtf/text/StringConcatenate.h> | 270 #include <wtf/text/StringConcatenate.h> |
280 #endif // AtomicString_h | 271 #endif // AtomicString_h |
OLD | NEW |