am 4801fd66: Cleanup decoder wrapper

* commit '4801fd66d63a26c76344f304c5179e4aec88a347':
  Cleanup decoder wrapper
main
Satoshi Kataoka 2012-12-20 00:59:07 -08:00 committed by Android Git Automerger
commit efb420ae6a
2 changed files with 10 additions and 10 deletions

View File

@ -14,13 +14,13 @@
* limitations under the License. * limitations under the License.
*/ */
#include "incremental_decoder_wrapper.h" #include "typing_decoder_wrapper.h"
namespace latinime { namespace latinime {
IncrementalDecoderInterface * IncrementalDecoderInterface *
(*IncrementalDecoderWrapper::sIncrementalDecoderFactoryMethod)(int, int) = 0; (*TypingDecoderWrapper::sIncrementalDecoderFactoryMethod)(int, int) = 0;
IncrementalDecoderWrapper::~IncrementalDecoderWrapper() { TypingDecoderWrapper::~TypingDecoderWrapper() {
delete mIncrementalDecoderInterface; delete mIncrementalDecoderInterface;
} }
} // namespace latinime } // namespace latinime

View File

@ -14,8 +14,8 @@
* limitations under the License. * limitations under the License.
*/ */
#ifndef LATINIME_INCREMENTAL_DECODER_WRAPPER_H #ifndef LATINIME_TYPING_DECODER_WRAPPER_H
#define LATINIME_INCREMENTAL_DECODER_WRAPPER_H #define LATINIME_TYPING_DECODER_WRAPPER_H
#include "defines.h" #include "defines.h"
#include "incremental_decoder_interface.h" #include "incremental_decoder_interface.h"
@ -26,13 +26,13 @@ class UnigramDictionary;
class BigramDictionary; class BigramDictionary;
class ProximityInfo; class ProximityInfo;
class IncrementalDecoderWrapper : public IncrementalDecoderInterface { class TypingDecoderWrapper : public IncrementalDecoderInterface {
public: public:
IncrementalDecoderWrapper(const int maxWordLength, const int maxWords) TypingDecoderWrapper(const int maxWordLength, const int maxWords)
: mIncrementalDecoderInterface(getIncrementalDecoderInstance(maxWordLength, maxWords)) { : mIncrementalDecoderInterface(getIncrementalDecoderInstance(maxWordLength, maxWords)) {
} }
virtual ~IncrementalDecoderWrapper(); virtual ~TypingDecoderWrapper();
int getSuggestions(ProximityInfo *pInfo, void *traverseSession, int *inputXs, int *inputYs, int getSuggestions(ProximityInfo *pInfo, void *traverseSession, int *inputXs, int *inputYs,
int *times, int *pointerIds, int *codes, int inputSize, int commitPoint, int *outWords, int *times, int *pointerIds, int *codes, int inputSize, int commitPoint, int *outWords,
@ -51,7 +51,7 @@ class IncrementalDecoderWrapper : public IncrementalDecoderInterface {
} }
private: private:
DISALLOW_IMPLICIT_CONSTRUCTORS(IncrementalDecoderWrapper); DISALLOW_IMPLICIT_CONSTRUCTORS(TypingDecoderWrapper);
static IncrementalDecoderInterface *getIncrementalDecoderInstance(int maxWordLength, static IncrementalDecoderInterface *getIncrementalDecoderInstance(int maxWordLength,
int maxWords) { int maxWords) {
if (sIncrementalDecoderFactoryMethod) { if (sIncrementalDecoderFactoryMethod) {
@ -64,4 +64,4 @@ class IncrementalDecoderWrapper : public IncrementalDecoderInterface {
IncrementalDecoderInterface *mIncrementalDecoderInterface; IncrementalDecoderInterface *mIncrementalDecoderInterface;
}; };
} // namespace latinime } // namespace latinime
#endif // LATINIME_INCREMENTAL_DECODER_WRAPPER_H #endif // LATINIME_TYPING_DECODER_WRAPPER_H