| OLD | NEW |
| 1 // Copyright 2008 Google Inc. All Rights Reserved. | 1 // Copyright 2008 Google Inc. All Rights Reserved. |
| 2 | 2 |
| 3 #include "chrome/third_party/hunspell/google/bdict_reader.h" | 3 #include "third_party/hunspell/google/bdict_reader.h" |
| 4 | 4 |
| 5 #include "base/logging.h" | 5 #include "base/logging.h" |
| 6 #include "chrome/third_party/hunspell/google/bdict.h" | |
| 7 | 6 |
| 8 namespace hunspell { | 7 namespace hunspell { |
| 9 | 8 |
| 10 // Like the "Visitor" design pattern, this lightweight object provides an | 9 // Like the "Visitor" design pattern, this lightweight object provides an |
| 11 // interface around a serialized trie node at the given address in the memory. | 10 // interface around a serialized trie node at the given address in the memory. |
| 12 class NodeReader { | 11 class NodeReader { |
| 13 public: | 12 public: |
| 14 // Return values for GetChildAt. | 13 // Return values for GetChildAt. |
| 15 enum FindResult { | 14 enum FindResult { |
| 16 // A node is found. | 15 // A node is found. |
| (...skipping 698 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 715 aff_header_->rep_offset); | 714 aff_header_->rep_offset); |
| 716 } | 715 } |
| 717 | 716 |
| 718 | 717 |
| 719 WordIterator BDictReader::GetAllWordIterator() const { | 718 WordIterator BDictReader::GetAllWordIterator() const { |
| 720 NodeReader reader(bdict_data_, bdict_length_, header_->dic_offset, 0); | 719 NodeReader reader(bdict_data_, bdict_length_, header_->dic_offset, 0); |
| 721 return WordIterator(reader); | 720 return WordIterator(reader); |
| 722 } | 721 } |
| 723 | 722 |
| 724 } // namespace hunspell | 723 } // namespace hunspell |
| OLD | NEW |