Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Side by Side Diff: cc/base/scoped_ptr_deque.h

Issue 12472028: Part 1 of cc/ directory shuffles: base (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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 4
5 #ifndef CC_SCOPED_PTR_DEQUE_H_ 5 #ifndef CC_BASE_SCOPED_PTR_DEQUE_H_
6 #define CC_SCOPED_PTR_DEQUE_H_ 6 #define CC_BASE_SCOPED_PTR_DEQUE_H_
7 7
8 #include <deque>
8 #include "base/basictypes.h" 9 #include "base/basictypes.h"
9 #include "base/logging.h" 10 #include "base/logging.h"
10 #include "base/memory/scoped_ptr.h" 11 #include "base/memory/scoped_ptr.h"
11 #include "base/stl_util.h" 12 #include "base/stl_util.h"
12 #include <deque>
13 13
14 namespace cc { 14 namespace cc {
15 15
16 // This type acts like a deque<scoped_ptr> based on top of std::deque. The 16 // This type acts like a deque<scoped_ptr> based on top of std::deque. The
17 // ScopedPtrDeque has ownership of all elements in the deque. 17 // ScopedPtrDeque has ownership of all elements in the deque.
18 template <typename T> 18 template <typename T>
19 class ScopedPtrDeque { 19 class ScopedPtrDeque {
20 public: 20 public:
21 typedef typename std::deque<T*>::const_iterator const_iterator; 21 typedef typename std::deque<T*>::const_iterator const_iterator;
22 typedef typename std::deque<T*>::reverse_iterator reverse_iterator; 22 typedef typename std::deque<T*>::reverse_iterator reverse_iterator;
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 const_reverse_iterator rend() const { return data_.rend(); } 125 const_reverse_iterator rend() const { return data_.rend(); }
126 126
127 private: 127 private:
128 std::deque<T*> data_; 128 std::deque<T*> data_;
129 129
130 DISALLOW_COPY_AND_ASSIGN(ScopedPtrDeque); 130 DISALLOW_COPY_AND_ASSIGN(ScopedPtrDeque);
131 }; 131 };
132 132
133 } // namespace cc 133 } // namespace cc
134 134
135 #endif // CC_SCOPED_PTR_DEQUE_H_ 135 #endif // CC_BASE_SCOPED_PTR_DEQUE_H_
OLDNEW
« no previous file with comments | « cc/base/scoped_ptr_algorithm.h ('k') | cc/base/scoped_ptr_hash_map.h » ('j') | cc/cc.gyp » ('J')

Powered by Google App Engine
This is Rietveld 408576698