OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 #ifndef TerminatedArray_h | 4 #ifndef TerminatedArray_h |
5 #define TerminatedArray_h | 5 #define TerminatedArray_h |
6 | 6 |
7 #include "wtf/Allocator.h" | 7 #include "wtf/Allocator.h" |
8 #include "wtf/OwnPtr.h" | 8 #include "wtf/OwnPtr.h" |
9 #include "wtf/Partitions.h" | 9 #include "wtf/allocator/Partitions.h" |
10 | 10 |
11 namespace WTF { | 11 namespace WTF { |
12 | 12 |
13 // TerminatedArray<T> represents a sequence of elements of type T in which each | 13 // TerminatedArray<T> represents a sequence of elements of type T in which each |
14 // element knows whether it is the last element in the sequence or not. For this | 14 // element knows whether it is the last element in the sequence or not. For this |
15 // check type T must provide isLastInArray method. | 15 // check type T must provide isLastInArray method. |
16 // TerminatedArray<T> can only be constructed by TerminatedArrayBuilder<T>. | 16 // TerminatedArray<T> can only be constructed by TerminatedArrayBuilder<T>. |
17 template<typename T> | 17 template<typename T> |
18 class TerminatedArray { | 18 class TerminatedArray { |
19 DISALLOW_NEW(); | 19 DISALLOW_NEW(); |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 TerminatedArray(); | 93 TerminatedArray(); |
94 | 94 |
95 template<typename, template <typename> class> friend class TerminatedArrayBu
ilder; | 95 template<typename, template <typename> class> friend class TerminatedArrayBu
ilder; |
96 }; | 96 }; |
97 | 97 |
98 } // namespace WTF | 98 } // namespace WTF |
99 | 99 |
100 using WTF::TerminatedArray; | 100 using WTF::TerminatedArray; |
101 | 101 |
102 #endif // TerminatedArray_h | 102 #endif // TerminatedArray_h |
OLD | NEW |