オープンソース・ソフトウェアの開発とダウンロード

Subversion リポジトリの参照

Contents of /aquaskk/trunk/src/engine/dictionary/SKKDictionaryKeeper.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 151 - (show annotations) (download) (as text)
Thu Dec 10 15:37:49 2009 UTC (14 years, 4 months ago) by t-suwa
File MIME type: text/x-chdr
File size: 1922 byte(s)
 r232@milonga-2:  t_suwa | 2009-12-11 00:29:05 +0900
 - SKKDictionaryLoader.h: 新規追加(SKKDictionaryKeeper から分離)
 
 r233@milonga-2:  t_suwa | 2009-12-11 00:29:34 +0900
 - SKKDictionaryKeeper.h: SKKDictionaryLoader の記述を分離
 
 r234@milonga-2:  t_suwa | 2009-12-11 00:30:46 +0900
 - SKKAutoUpdateDictionaryLoader, SKKCommonDictionaryLoader: SKKDictionaryLoader の変更に対応
 
 r235@milonga-2:  t_suwa | 2009-12-11 00:31:04 +0900
 - SKKDictionaryKeeper_TEST: 壊れたテストを修正
 
 r236@milonga-2:  t_suwa | 2009-12-11 00:31:17 +0900
 - プロジェクトを更新
 
 r237@milonga-2:  t_suwa | 2009-12-11 00:37:02 +0900
 - Preferences.xib: 辞書の種類が完全に表示されるように修正
 

1 /* -*- C++ -*-
2
3 MacOS X implementation of the SKK input method.
4
5 Copyright (C) 2008 Tomotaka SUWA <t.suwa@mac.com>
6
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 2 of the License, or
10 any later version.
11
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software
19 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20
21 */
22
23 #ifndef SKKDictionaryKeeper_h
24 #define SKKDictionaryKeeper_h
25
26 #include "SKKDictionaryFile.h"
27 #include "SKKDictionaryLoader.h"
28 #include "pthreadutil.h"
29 #include <vector>
30 #include <memory>
31
32 class SKKDictionaryKeeper : public SKKDictionaryLoaderObserver {
33 std::auto_ptr<pthread::timer> timer_;
34 pthread::condition condition_;
35 SKKDictionaryFile file_;
36 bool loaded_;
37 int timeout_;
38
39 virtual void SKKDictionaryLoaderUpdate(const SKKDictionaryFile& file);
40
41 std::string fetch(const std::string& query, SKKDictionaryEntryContainer& container);
42 bool ready();
43
44 public:
45 SKKDictionaryKeeper();
46
47 void Initialize(SKKDictionaryLoader* loader, int interval, int timeout);
48
49 // ���������������
50 std::string FindOkuriAri(const std::string& query);
51 std::string FindOkuriNasi(const std::string& query);
52
53 // ���������
54 std::string FindEntry(const std::string& candidate);
55
56 // ������������������
57 bool FindCompletions(const std::string& entry,
58 std::vector<std::string>& result,
59 unsigned minimumCompletionLength = 0);
60 };
61
62 #endif

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26