nuspell 5.1.7 Nuspell spellchecking library

Loading...
Searching...
No Matches
nuspell Namespace Reference

Library main namespace. More...

## Classes
class | Dictionary_Loading_Error
| The only important public exception. More...
class | Dictionary
| The only important public class. More...

## Functions
auto | append_default_dir_paths (vector< fs_path > &paths) -> void
| Append the paths of the default directories to be searched for dictionaries.
auto | append_libreoffice_dir_paths (vector< fs_path > &paths) -> void
| Append the paths of the LibreOffice's directories to be searched for dictionaries.
auto | search_dirs_for_one_dict (const vector< fs_path > &dir_paths, const fs_path &dict_name_stem) -> fs_path
| Search the directories for only one dictionary.
auto | search_dirs_for_dicts (const vector< fs_path > &dir_paths, vector< fs_path > &dict_list) -> void
| Search the directories for dictionaries.
auto | search_default_dirs_for_dicts () -> vector< fs_path >
| Search the default directories for dictionaries.

## Detailed Description

Library main namespace.

## Function Documentation

## ◆ append_default_dir_paths()

auto nuspell::append_default_dir_paths | ( | vector< fs_path > & | paths | ) | -> void

Append the paths of the default directories to be searched for dictionaries.

Parameters

  [out] | paths | vector that receives the directory paths

## ◆ append_libreoffice_dir_paths()

auto nuspell::append_libreoffice_dir_paths | ( | vector< fs_path > & | paths | ) | -> void

Append the paths of the LibreOffice's directories to be searched for dictionaries.

Warning
  This function shall not be called from LibreOffice or modules that may end up being used by LibreOffice. It is mainly intended to be used by the CLI tool.

Parameters

  [out] | paths | vector that receives the directory paths

## ◆ search_default_dirs_for_dicts()

auto nuspell::search_default_dirs_for_dicts | ( |  | ) | -> vector< fs_path >

Search the default directories for dictionaries.

This is just a convenience that call two other functions.

See also
  append_default_dir_paths()
  search_dirs_for_dicts()

Returns
  vector with the paths of the .aff files of the found dictionaries

## ◆ search_dirs_for_dicts()

auto nuspell::search_dirs_for_dicts | ( | const vector< fs_path > & | dir_paths,
|  | vector< fs_path > & | dict_list ) -> void

Search the directories for dictionaries.

This function searches the directories for files that represent dictionaries and for each found dictionary it appends the path of the .aff file to `dict_list`. One dictionary consts of two files, .aff and .dic, and both need to exist, but only the .aff is added.

Parameters

  [in] | dir_paths | list of paths to directories
  [out] | dict_list | vector that receives the paths of the found dictionaries

## ◆ search_dirs_for_one_dict()

auto nuspell::search_dirs_for_one_dict | ( | const vector< fs_path > & | dir_paths,
|  | const fs_path & | dict_name_stem ) -> fs_path

Search the directories for only one dictionary.

This function is more efficient than search_dirs_for_dicts() because it does not iterate whole directories, it only checks the existence of .dic and .aff files. Useful for some CLI tools. GUI apps generally need a list of all dictionaries.

Parameters

  [in] | dir_paths | list of directories
  [in] | dict_name_stem | dictionary name, filename without extension (stem)

Returns
  path to the .aff file of the dictionary or empty object if not found