mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-20 20:51:40 +00:00
7baaeb3fd2
To avoid unwanted double deletion of d.
50 lines
825 B
C++
50 lines
825 B
C++
// -*- C++ -*-
|
|
/**
|
|
* \file WordList.h
|
|
* This file is part of LyX, the document processor.
|
|
* Licence details can be found in the file COPYING.
|
|
*
|
|
* \author Stefan Schimanski
|
|
*
|
|
* Full author contact details are available in file CREDITS.
|
|
*/
|
|
|
|
#ifndef WORDLIST_H
|
|
#define WORDLIST_H
|
|
|
|
#include "support/docstring.h"
|
|
|
|
namespace lyx {
|
|
|
|
class WordList {
|
|
// noncopyable because of pimpl
|
|
WordList(WordList const &);
|
|
WordList & operator=(WordList const &);
|
|
public:
|
|
///
|
|
WordList();
|
|
///
|
|
~WordList();
|
|
|
|
///
|
|
docstring const & word(size_t idx) const;
|
|
///
|
|
size_t size() const;
|
|
///
|
|
void insert(docstring const & w);
|
|
///
|
|
void remove(docstring const & w);
|
|
///
|
|
static void cleanupWordLists();
|
|
|
|
private:
|
|
struct Impl;
|
|
Impl * d;
|
|
};
|
|
|
|
WordList * theWordList(std::string const & lang);
|
|
|
|
} // namespace lyx
|
|
|
|
#endif // WORDLIST_H
|