~ubuntu-branches/ubuntu/oneiric/mozc/oneiric

« back to all changes in this revision

Viewing changes to dictionary/system/system_dictionary.h

  • Committer: Bazaar Package Importer
  • Author(s): Nobuhiro Iwamatsu
  • Date: 2010-07-14 03:26:47 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100714032647-13qjisj6m8cm8jdx
Tags: 0.12.410.102-1
* New upstream release (Closes: #588971).
  - Add mozc-server, mozc-utils-gui and scim-mozc packages.
* Update debian/rules.
  Add --gypdir option to build_mozc.py.
* Update debian/control.
  - Bumped standards-version to 3.9.0.
  - Update description.
* Add mozc icon (Closes: #588972).
* Add patch which revises issue 18.
  ibus_mozc_issue18.patch
* kFreeBSD build support.
  support_kfreebsd.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
43
43
 
44
44
namespace mozc {
45
45
 
46
 
class ConverterData;
 
46
class NodeAllocatorInterface;
47
47
class DictionaryFile;
48
 
class Token;
 
48
struct Token;
49
49
 
50
50
class SystemDictionary : public DictionaryInterface {
51
51
 public:
 
52
  SystemDictionary();
52
53
  virtual ~SystemDictionary();
53
54
 
54
55
  virtual bool Open(const char *filename);
56
57
  virtual void Close();
57
58
 
58
59
  virtual Node *LookupPredictive(const char *str, int size,
59
 
                                 ConverterData *data) const;
 
60
                                 NodeAllocatorInterface *allocator) const;
60
61
  virtual Node *LookupExact(const char *str, int size,
61
 
                            ConverterData *data) const;
 
62
                            NodeAllocatorInterface *allocator) const;
62
63
  virtual Node *LookupPrefix(const char *str, int size,
63
 
                             ConverterData *data) const;
 
64
                             NodeAllocatorInterface *allocator) const;
64
65
  virtual Node *LookupReverse(const char *str, int size,
65
 
                              ConverterData *data) const;
 
66
                              NodeAllocatorInterface *allocator) const;
66
67
 
67
68
 
68
69
  // Most of key strings are Hiragana or Katakana, so we modify
139
140
  static const int HIRAGANA_OFFSET = 75;
140
141
  static const int KATAKANA_OFFSET = 159;
141
142
 
142
 
  // Test may call this constructor directly.
143
 
  SystemDictionary();
144
 
 
145
143
  bool OpenDictionaryFile(DictionaryFile *file);
146
144
  // Only populates token pointed by positition when it is specified.
147
145
  // Otherwise (position==NULL) it scans all the tokens for same reading.
153
151
  // Returns list of nodes.
154
152
  // This method updates max_nodes_size value if non NULL value is given.
155
153
  Node *LookupInternal(const char *str, int size,
156
 
                       ConverterData *data,
 
154
                       NodeAllocatorInterface *allocator,
157
155
                       bool is_predictive,
158
156
                       int *max_nodes_size) const;
159
 
  Node *CopyTokenToNode(ConverterData *data,
 
157
  Node *CopyTokenToNode(NodeAllocatorInterface *allocator,
160
158
                        const Token *token) const;
161
159
 
162
160
  // Rx stores a trie. rx_ stores key strings and token_rx_ stores