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

Side by Side Diff: tools/gn/deps_iterator.h

Issue 2554863002: Cleanup remaining class/struct fwd declarations (Closed)
Patch Set: Style fixes Created 4 years 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
« no previous file with comments | « tools/gn/config_values_generator.h ('k') | tools/gn/filesystem_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 4
5 #ifndef TOOLS_GN_DEPS_ITERATOR_H_ 5 #ifndef TOOLS_GN_DEPS_ITERATOR_H_
6 #define TOOLS_GN_DEPS_ITERATOR_H_ 6 #define TOOLS_GN_DEPS_ITERATOR_H_
7 7
8 #include <stddef.h> 8 #include <stddef.h>
9 9
10 #include "tools/gn/label_ptr.h" 10 #include "tools/gn/label_ptr.h"
11 11
12 class Target;
13
14 // Provides an iterator for iterating over multiple LabelTargetVectors to 12 // Provides an iterator for iterating over multiple LabelTargetVectors to
15 // make it convenient to iterate over all deps of a target. 13 // make it convenient to iterate over all deps of a target.
16 // 14 //
17 // This works by maintaining a simple stack of vectors (since we have a fixed 15 // This works by maintaining a simple stack of vectors (since we have a fixed
18 // number of deps types). When the stack is empty, we've reached the end. This 16 // number of deps types). When the stack is empty, we've reached the end. This
19 // means that the default-constructed iterator == end() for any sequence. 17 // means that the default-constructed iterator == end() for any sequence.
20 class DepsIterator { 18 class DepsIterator {
21 public: 19 public:
22 // Creates an empty iterator. 20 // Creates an empty iterator.
23 DepsIterator(); 21 DepsIterator();
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 63
66 const DepsIterator& begin() const { return begin_; } 64 const DepsIterator& begin() const { return begin_; }
67 const DepsIterator& end() const { return end_; } 65 const DepsIterator& end() const { return end_; }
68 66
69 private: 67 private:
70 DepsIterator begin_; 68 DepsIterator begin_;
71 DepsIterator end_; 69 DepsIterator end_;
72 }; 70 };
73 71
74 #endif // TOOLS_GN_DEPS_ITERATOR_H_ 72 #endif // TOOLS_GN_DEPS_ITERATOR_H_
OLDNEW
« no previous file with comments | « tools/gn/config_values_generator.h ('k') | tools/gn/filesystem_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698