mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-06 11:23:45 +00:00
8d640dc776
Two better ways of making a class non-copyable in C++11: * Store the p. impl. in a unique_ptr (for the cases of classes with p. impl.), or: * Define publicly the copy constructor and assignment as deleted Lots of other classes could be cleaned up in this way.
46 lines
736 B
C++
46 lines
736 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"
|
|
|
|
#include <memory>
|
|
|
|
namespace lyx {
|
|
|
|
class WordList {
|
|
public:
|
|
///
|
|
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;
|
|
std::unique_ptr<Impl> d;
|
|
};
|
|
|
|
WordList * theWordList(std::string const & lang);
|
|
|
|
} // namespace lyx
|
|
|
|
#endif // WORDLIST_H
|