2df2eb3e9d4dad60730e31e722cef5bc81aac0fd
[platform/upstream/aspell.git] / common / tokenizer.cpp
1 // This file is part of The New Aspell
2 // Copyright (C) 2002 by Kevin Atkinson under the GNU LGPL license
3 // version 2.0 or 2.1.  You should have received a copy of the LGPL
4 // license along with this library if you did not you can find
5 // it at http://www.gnu.org/.
6
7 #include "tokenizer.hpp"
8 #include "convert.hpp"
9
10 namespace acommon
11 {
12
13   Tokenizer::Tokenizer() 
14     : word_begin(0), word_end(0), end(0), 
15       begin_pos(0), end_pos(0),
16       conv_(0) 
17   {}
18
19   Tokenizer::~Tokenizer()
20   {}
21
22   void Tokenizer::reset (FilterChar * begin, FilterChar * end) 
23   {
24     bool can_encode = conv_->encode(begin, end, buf_);
25     assert(can_encode);
26     end_pos = 0;
27     word_end = begin;
28     end = end;
29   }
30
31 }