|
30 | 30 | #ifndef MOZC_ENGINE_ENGINE_H_
|
31 | 31 | #define MOZC_ENGINE_ENGINE_H_
|
32 | 32 |
|
| 33 | +#include <memory> |
| 34 | + |
33 | 35 | #include "base/port.h"
|
34 |
| -#include "base/scoped_ptr.h" |
35 | 36 | #include "dictionary/dictionary_interface.h"
|
36 | 37 | #include "dictionary/pos_group.h"
|
37 | 38 | #include "dictionary/user_dictionary.h"
|
@@ -76,24 +77,24 @@ class Engine : public EngineInterface {
|
76 | 77 | }
|
77 | 78 |
|
78 | 79 | private:
|
79 |
| - scoped_ptr<dictionary::SuppressionDictionary> suppression_dictionary_; |
80 |
| - scoped_ptr<const Connector> connector_; |
81 |
| - scoped_ptr<const Segmenter> segmenter_; |
82 |
| - scoped_ptr<dictionary::UserDictionary> user_dictionary_; |
83 |
| - scoped_ptr<dictionary::DictionaryInterface> suffix_dictionary_; |
84 |
| - scoped_ptr<dictionary::DictionaryInterface> dictionary_; |
85 |
| - scoped_ptr<const dictionary::PosGroup> pos_group_; |
86 |
| - scoped_ptr<ImmutableConverterInterface> immutable_converter_; |
87 |
| - scoped_ptr<const SuggestionFilter> suggestion_filter_; |
| 80 | + std::unique_ptr<dictionary::SuppressionDictionary> suppression_dictionary_; |
| 81 | + std::unique_ptr<const Connector> connector_; |
| 82 | + std::unique_ptr<const Segmenter> segmenter_; |
| 83 | + std::unique_ptr<dictionary::UserDictionary> user_dictionary_; |
| 84 | + std::unique_ptr<dictionary::DictionaryInterface> suffix_dictionary_; |
| 85 | + std::unique_ptr<dictionary::DictionaryInterface> dictionary_; |
| 86 | + std::unique_ptr<const dictionary::PosGroup> pos_group_; |
| 87 | + std::unique_ptr<ImmutableConverterInterface> immutable_converter_; |
| 88 | + std::unique_ptr<const SuggestionFilter> suggestion_filter_; |
88 | 89 |
|
89 | 90 | // TODO(noriyukit): Currently predictor and rewriter are created by this class
|
90 | 91 | // but owned by converter_. Since this class creates these two, it'd be better
|
91 | 92 | // if Engine class owns these two instances.
|
92 | 93 | PredictorInterface *predictor_;
|
93 | 94 | RewriterInterface *rewriter_;
|
94 | 95 |
|
95 |
| - scoped_ptr<ConverterInterface> converter_; |
96 |
| - scoped_ptr<UserDataManagerInterface> user_data_manager_; |
| 96 | + std::unique_ptr<ConverterInterface> converter_; |
| 97 | + std::unique_ptr<UserDataManagerInterface> user_data_manager_; |
97 | 98 |
|
98 | 99 | DISALLOW_COPY_AND_ASSIGN(Engine);
|
99 | 100 | };
|
|
0 commit comments