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 |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
12 * Library General Public License for more details. | 12 * Library General Public License for more details. |
13 * | 13 * |
14 * You should have received a copy of the GNU Library General Public License | 14 * You should have received a copy of the GNU Library General Public License |
15 * along with this library; see the file COPYING.LIB. If not, write to | 15 * along with this library; see the file COPYING.LIB. If not, write to |
16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, | 16 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, |
17 * Boston, MA 02110-1301, USA. | 17 * Boston, MA 02110-1301, USA. |
18 * | 18 * |
19 */ | 19 */ |
20 | 20 |
21 #ifndef AtomicString_h | 21 #ifndef AtomicString_h |
22 #define AtomicString_h | 22 #define AtomicString_h |
23 | 23 |
24 #include "wtf/Allocator.h" | 24 #include "wtf/Allocator.h" |
25 #include "wtf/HashTableDeletedValueType.h" | 25 #include "wtf/HashTableDeletedValueType.h" |
26 #include "wtf/WTFExport.h" | 26 #include "wtf/WTFExport.h" |
27 #include "wtf/testing/WTFUnitTestHelpersExport.h" | |
28 #include "wtf/text/CString.h" | 27 #include "wtf/text/CString.h" |
29 #include "wtf/text/WTFString.h" | 28 #include "wtf/text/WTFString.h" |
30 #include <iosfwd> | 29 #include <iosfwd> |
31 | 30 |
32 namespace WTF { | 31 namespace WTF { |
33 | 32 |
34 struct AtomicStringHash; | 33 struct AtomicStringHash; |
35 | 34 |
36 class WTF_EXPORT AtomicString { | 35 class WTF_EXPORT AtomicString { |
37 USING_FAST_MALLOC(AtomicString); | 36 USING_FAST_MALLOC(AtomicString); |
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
242 return emptyAtom; | 241 return emptyAtom; |
243 return fromUTF8Internal(characters, 0); | 242 return fromUTF8Internal(characters, 0); |
244 } | 243 } |
245 | 244 |
246 // AtomicStringHash is the default hash for AtomicString | 245 // AtomicStringHash is the default hash for AtomicString |
247 template<typename T> struct DefaultHash; | 246 template<typename T> struct DefaultHash; |
248 template<> struct DefaultHash<AtomicString> { | 247 template<> struct DefaultHash<AtomicString> { |
249 typedef AtomicStringHash Hash; | 248 typedef AtomicStringHash Hash; |
250 }; | 249 }; |
251 | 250 |
252 // Pretty printer for gtest. | 251 // Pretty printer for gtest and base/logging.*. |
253 WTF_UNITTEST_HELPERS_EXPORT std::ostream& operator<<(std::ostream&, const Atomic
String&); | 252 WTF_EXPORT std::ostream& operator<<(std::ostream&, const AtomicString&); |
254 | 253 |
255 } // namespace WTF | 254 } // namespace WTF |
256 | 255 |
257 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(AtomicString); | 256 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(AtomicString); |
258 | 257 |
259 using WTF::AtomicString; | 258 using WTF::AtomicString; |
260 using WTF::nullAtom; | 259 using WTF::nullAtom; |
261 using WTF::emptyAtom; | 260 using WTF::emptyAtom; |
262 using WTF::starAtom; | 261 using WTF::starAtom; |
263 using WTF::xmlAtom; | 262 using WTF::xmlAtom; |
264 using WTF::xmlnsAtom; | 263 using WTF::xmlnsAtom; |
265 using WTF::xlinkAtom; | 264 using WTF::xlinkAtom; |
266 | 265 |
267 #include "wtf/text/StringConcatenate.h" | 266 #include "wtf/text/StringConcatenate.h" |
268 #endif // AtomicString_h | 267 #endif // AtomicString_h |
OLD | NEW |