Nuspell
spellchecker
Public Types | Public Member Functions | Static Public Member Functions | List of all members
nuspell::v2::Finder Class Reference

Public Types

using const_iterator = Dict_List::const_iterator
 

Public Member Functions

auto add_default_dir_paths () -> void
 Adds the default directory paths which may containt dictionaries.
 
auto add_mozilla_dir_paths () -> void
 Adds the Mozilla directory paths which may containt dictionaries.
 
auto add_libreoffice_dir_paths () -> void
 Adds the LibreOffice directory paths which may containt dictionaries.
 
auto add_openoffice_dir_paths () -> void
 Adds the OpenOffice directory paths which may containt dictionaries.
 
auto search_for_dictionaries () -> void
 Searches the added directories for dictionaries.
 
auto & get_dir_paths () const
 
auto & get_dictionaries () const
 
auto begin () const
 
auto end () const
 
auto find (const std::string &dict) const -> const_iterator
 
auto equal_range (const std::string &dict) const -> std::pair< const_iterator, const_iterator >
 
auto get_dictionary_path (const std::string &dict) const -> std::string
 Gets the dictionary path. More...
 

Static Public Member Functions

static auto search_all_dirs_for_dicts () -> Finder
 Creates Finder object with all possible dictionaries found. More...
 

Member Function Documentation

◆ get_dictionary_path()

auto nuspell::Finder::get_dictionary_path ( const std::string &  dict) const -> std::string

Gets the dictionary path.

If path is given (contains slash) it returns the input argument, otherwise searches the found dictionaries by their name and returns their path.

Parameters
dictname or path of dictionary without the trailing .aff/.dic.
Returns
the path to dictionary or empty if does not exists.

◆ search_all_dirs_for_dicts()

auto nuspell::Finder::search_all_dirs_for_dicts ( ) -> Finder
static

Creates Finder object with all possible dictionaries found.

Returns
Finder object

The documentation for this class was generated from the following files: