File: suggest.hpp

package info (click to toggle)
aspell 0.60.8.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 15,336 kB
  • sloc: cpp: 24,378; sh: 12,340; perl: 1,924; ansic: 1,661; makefile: 852; sed: 16
file content (46 lines) | stat: -rw-r--r-- 1,119 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
// Copyright 2000 by Kevin Atkinson under the terms of the LGPL

#ifndef ASPELLER_SUGGEST__HPP
#define ASPELLER_SUGGEST__HPP

#include "word_list.hpp"
#include "enumeration.hpp"
#include "parm_string.hpp"
#include "suggestions.hpp"

using namespace acommon;

namespace aspeller {

  class SpellerImpl;

  class SuggestionList : public WordList {
  public:
    typedef StringEnumeration            VirEmul;
    typedef Enumeration<VirEmul>         Emul;
    typedef const char *               Value;
    typedef unsigned int               Size;

    //virtual SuggestionList * clone() const = 0;
    //virtual void assign(const SuggestionList *) = 0;
    
    virtual bool empty() const = 0;
    virtual Size size() const = 0;
    virtual VirEmul * elements() const = 0;
    virtual ~SuggestionList() {}
  };

  class Suggest {
  public:
    virtual PosibErr<void> set_mode(ParmString) = 0;
    virtual SuggestionList & suggest(const char * word) = 0;
    virtual SuggestionsData & suggestions(const char * word) = 0;
    virtual ~Suggest() {}
  };

  PosibErr<Suggest *> new_default_suggest(SpellerImpl *);

}


#endif