File: hunspell.hh

package info (click to toggle)
goldendict 1.5.0~rc2%2Bgit20221126%2Bds-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 17,376 kB
  • sloc: cpp: 60,569; ansic: 11,511; xml: 529; makefile: 74; sh: 42
file content (41 lines) | stat: -rw-r--r-- 1,168 bytes parent folder | download | duplicates (3)
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
/* This file is (c) 2008-2012 Konstantin Isakov <ikm@goldendict.org>
 * Part of GoldenDict. Licensed under GPLv3 or later, see the LICENSE file */

#ifndef __HUNSPELL_HH_INCLUDED__
#define __HUNSPELL_HH_INCLUDED__

#ifdef _MSC_VER
#define HUNSPELL_STATIC
#endif

#include "dictionary.hh"
#include "config.hh"

/// Support for Hunspell-based morphology.
namespace HunspellMorpho {

using std::vector;
using std::string;

struct DataFiles
{
  QString affFileName, dicFileName; // Absolute, with Qt separators
  QString dictId; // Dictionary id, e.g. "en_US"
  QString dictName; // Localized dictionary name to be displayed, e.g. "English(US) Morphology"

  DataFiles( QString const & affFileName_, QString const & dicFileName_,
             QString const & dictId_, QString const & dictName_ ):
    affFileName( affFileName_ ), dicFileName( dicFileName_ ),
    dictId( dictId_ ), dictName( dictName_ )
  {}
};

/// Finds all the DataFiles it can at the given path (with Qt separators).
vector< DataFiles > findDataFiles( QString const & path );

vector< sptr< Dictionary::Class > > makeDictionaries( Config::Hunspell const & )
  THROW_SPEC( std::exception );

}

#endif