OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #ifndef BIN_DIRECTORY_H_ | 5 #ifndef BIN_DIRECTORY_H_ |
6 #define BIN_DIRECTORY_H_ | 6 #define BIN_DIRECTORY_H_ |
7 | 7 |
8 #include "bin/builtin.h" | 8 #include "bin/builtin.h" |
9 #include "bin/dartutils.h" | 9 #include "bin/dartutils.h" |
10 #include "platform/globals.h" | 10 #include "platform/globals.h" |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
58 // later on. | 58 // later on. |
59 // | 59 // |
60 // The stack is managed by the DirectoryListing's PathBuffer. Each | 60 // The stack is managed by the DirectoryListing's PathBuffer. Each |
61 // DirectoryListingEntry stored a entry-length, that it'll reset the PathBuffer | 61 // DirectoryListingEntry stored a entry-length, that it'll reset the PathBuffer |
62 // to on each call to Next. | 62 // to on each call to Next. |
63 class DirectoryListingEntry { | 63 class DirectoryListingEntry { |
64 public: | 64 public: |
65 explicit DirectoryListingEntry(DirectoryListingEntry* parent) | 65 explicit DirectoryListingEntry(DirectoryListingEntry* parent) |
66 : parent_(parent), lister_(0), done_(false), link_(NULL) {} | 66 : parent_(parent), lister_(0), done_(false), link_(NULL) {} |
67 | 67 |
68 ~DirectoryListingEntry() { | 68 ~DirectoryListingEntry(); |
69 ResetLink(); | |
70 } | |
71 | 69 |
72 ListType Next(DirectoryListing* listing); | 70 ListType Next(DirectoryListing* listing); |
73 | 71 |
74 DirectoryListingEntry* parent() const { | 72 DirectoryListingEntry* parent() const { |
75 return parent_; | 73 return parent_; |
76 } | 74 } |
77 | 75 |
78 LinkList* link() { | 76 LinkList* link() { |
79 return link_; | 77 return link_; |
80 } | 78 } |
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
274 | 272 |
275 private: | 273 private: |
276 DISALLOW_ALLOCATION(); | 274 DISALLOW_ALLOCATION(); |
277 DISALLOW_IMPLICIT_CONSTRUCTORS(Directory); | 275 DISALLOW_IMPLICIT_CONSTRUCTORS(Directory); |
278 }; | 276 }; |
279 | 277 |
280 } // namespace bin | 278 } // namespace bin |
281 } // namespace dart | 279 } // namespace dart |
282 | 280 |
283 #endif // BIN_DIRECTORY_H_ | 281 #endif // BIN_DIRECTORY_H_ |
OLD | NEW |