Blame view

morfeusz/Morfeusz.cpp 1.12 KB
Michał Lenart authored
1
Michał Lenart authored
2
#include <string>
Michał Lenart authored
3
#include "morfeusz2.h"
Michał Lenart authored
4
#include "MorfeuszImpl.hpp"
Michał Lenart authored
5
Michał Lenart authored
6
7
namespace morfeusz {
Michał Lenart authored
8
9
    using namespace std;
Michał Lenart authored
10
    string Morfeusz::getVersion() {
Michał Lenart authored
11
        return string(MORFEUSZ2_VERSION);
Michał Lenart authored
12
    }
Michał Lenart authored
13
Michał Lenart authored
14
    string Morfeusz::getDefaultDictName() {
Michał Lenart authored
15
        return string(MORFEUSZ_DEFAULT_DICT_NAME);
Michał Lenart authored
16
    }
Michał Lenart authored
17
Michał Lenart authored
18
    Morfeusz* Morfeusz::createInstance(MorfeuszUsage usage) {
Michał Lenart authored
19
20
        return new MorfeuszImpl(Morfeusz::getDefaultDictName(), usage);
    }
Michał Lenart authored
21
Michał Lenart authored
22
23
    Morfeusz* Morfeusz::createInstance(const std::string& dictName, MorfeuszUsage usage) {
        return new MorfeuszImpl(dictName, usage);
Michał Lenart authored
24
25
26
27
    }

    Morfeusz::~Morfeusz() {
    }
Michał Lenart authored
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

    static list<string> initializeDictionarySearchPaths() {
        list<string> res;
#ifdef MORFEUSZ_DICTIONARY_SEARCH_PATH1
        res.push_back(MORFEUSZ_DICTIONARY_SEARCH_PATH1);
#endif
#ifdef MORFEUSZ_DICTIONARY_SEARCH_PATH2
        res.push_back(MORFEUSZ_DICTIONARY_SEARCH_PATH2);
#endif
#ifdef MORFEUSZ_DICTIONARY_SEARCH_PATH3
        res.push_back(MORFEUSZ_DICTIONARY_SEARCH_PATH3);
#endif
        return res;
    }

    list<string> Morfeusz::dictionarySearchPaths(initializeDictionarySearchPaths());
Michał Lenart authored
44
Michał Lenart authored
45
}