24 #ifndef NUSPELL_FINDER_HXX
25 #define NUSPELL_FINDER_HXX
27 #include "defines.hxx"
28 #include "nuspell_export.h"
36 #define NUSPELL_MSVC_PRAGMA_WARNING(x) __pragma(warning(x))
38 #define NUSPELL_MSVC_PRAGMA_WARNING(x)
40 NUSPELL_MSVC_PRAGMA_WARNING(push)
41 NUSPELL_MSVC_PRAGMA_WARNING(disable : 4251)
44 NUSPELL_BEGIN_INLINE_NAMESPACE
52 const std::filesystem::path& dict_name_stem)
53 -> std::filesystem::path;
56 std::vector<std::filesystem::path>& dict_list) -> void;
58 -> std::vector<std::filesystem::path>;
60 NUSPELL_DEPRECATED_EXPORT
63 NUSPELL_DEPRECATED_EXPORT
auto
66 NUSPELL_DEPRECATED_EXPORT
auto search_dir_for_dicts(
67 const std::string& dir_path,
68 std::vector<std::pair<std::string, std::string>>& dict_list) -> void;
71 const std::vector<std::string>& dir_paths,
72 std::vector<std::pair<std::string, std::string>>& dict_list) -> void;
75 std::vector<std::pair<std::string, std::string>>& dict_list) -> void;
77 NUSPELL_DEPRECATED_EXPORT
auto find_dictionary(
78 const std::vector<std::pair<std::string, std::string>>& dict_list,
79 const std::string& dict_name)
80 -> std::vector<std::pair<std::string, std::string>>::const_iterator;
88 std::vector<std::string> dir_paths;
89 std::vector<std::pair<std::string, std::string>> dict_multimap;
93 auto& get_dir_paths()
const {
return dir_paths; }
94 auto& get_dictionaries()
const {
return dict_multimap; }
95 auto get_dictionary_path(
const std::string& dict)
const -> std::string;
104 using fs_path = std::filesystem::path;
105 std::vector<fs_path> dir_paths;
109 auto& get_dir_paths()
const {
return dir_paths; }
110 auto get_dictionary_path(
const fs_path& dict)
const -> fs_path;
113 NUSPELL_END_INLINE_NAMESPACE
115 NUSPELL_MSVC_PRAGMA_WARNING(pop)
Library main namespace.
Definition: aff_data.cxx:33
auto append_default_dir_paths(vector< fs::path > &paths) -> void
Append the paths of the default directories to be searched for dictionaries.
Definition: finder.cxx:63
auto search_dirs_for_dicts(const vector< fs::path > &dir_paths, vector< fs::path > &dict_list) -> void
Search the directories for dictionaries.
Definition: finder.cxx:312
auto append_libreoffice_dir_paths(vector< fs::path > &paths) -> void
Append the paths of the LibreOffice's directories to be searched for dictionaries.
Definition: finder.cxx:164
auto search_default_dirs_for_dicts() -> vector< fs::path >
Search the default directories for dictionaries.
Definition: finder.cxx:327
auto search_dirs_for_one_dict(const vector< fs::path > &dir_paths, const fs::path &dict_name_stem) -> fs::path
Serach the directories for only one dictionary.
Definition: finder.cxx:261