| 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/text/CString.h" | 27 #include "wtf/text/CString.h" |
| 28 #include "wtf/text/StringView.h" |
| 28 #include "wtf/text/WTFString.h" | 29 #include "wtf/text/WTFString.h" |
| 29 #include <cstring> | 30 #include <cstring> |
| 30 #include <iosfwd> | 31 #include <iosfwd> |
| 31 | 32 |
| 32 namespace WTF { | 33 namespace WTF { |
| 33 | 34 |
| 34 struct AtomicStringHash; | 35 struct AtomicStringHash; |
| 35 | 36 |
| 36 class WTF_EXPORT AtomicString { | 37 class WTF_EXPORT AtomicString { |
| 37 USING_FAST_MALLOC(AtomicString); | 38 USING_FAST_MALLOC(AtomicString); |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 199 // AtomicStringHash is the default hash for AtomicString | 200 // AtomicStringHash is the default hash for AtomicString |
| 200 template<typename T> struct DefaultHash; | 201 template<typename T> struct DefaultHash; |
| 201 template<> struct DefaultHash<AtomicString> { | 202 template<> struct DefaultHash<AtomicString> { |
| 202 typedef AtomicStringHash Hash; | 203 typedef AtomicStringHash Hash; |
| 203 }; | 204 }; |
| 204 | 205 |
| 205 // Pretty printer for gtest and base/logging.*. It prepends and appends | 206 // Pretty printer for gtest and base/logging.*. It prepends and appends |
| 206 // double-quotes, and escapes chracters other than ASCII printables. | 207 // double-quotes, and escapes chracters other than ASCII printables. |
| 207 WTF_EXPORT std::ostream& operator<<(std::ostream&, const AtomicString&); | 208 WTF_EXPORT std::ostream& operator<<(std::ostream&, const AtomicString&); |
| 208 | 209 |
| 210 inline StringView::StringView(const AtomicString& string, unsigned offset, unsig
ned length) |
| 211 : StringView(string.impl(), offset, length) {} |
| 212 inline StringView::StringView(const AtomicString& string, unsigned offset) |
| 213 : StringView(string.impl(), offset) {} |
| 214 inline StringView::StringView(const AtomicString& string) |
| 215 : StringView(string.impl()) {} |
| 216 |
| 209 } // namespace WTF | 217 } // namespace WTF |
| 210 | 218 |
| 211 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(AtomicString); | 219 WTF_ALLOW_MOVE_INIT_AND_COMPARE_WITH_MEM_FUNCTIONS(AtomicString); |
| 212 | 220 |
| 213 using WTF::AtomicString; | 221 using WTF::AtomicString; |
| 214 using WTF::nullAtom; | 222 using WTF::nullAtom; |
| 215 using WTF::emptyAtom; | 223 using WTF::emptyAtom; |
| 216 using WTF::starAtom; | 224 using WTF::starAtom; |
| 217 using WTF::xmlAtom; | 225 using WTF::xmlAtom; |
| 218 using WTF::xmlnsAtom; | 226 using WTF::xmlnsAtom; |
| 219 using WTF::xlinkAtom; | 227 using WTF::xlinkAtom; |
| 220 | 228 |
| 221 #include "wtf/text/StringConcatenate.h" | 229 #include "wtf/text/StringConcatenate.h" |
| 222 #endif // AtomicString_h | 230 #endif // AtomicString_h |
| OLD | NEW |