simulator.h
Go to the documentation of this file.
/******************************************************
* Presage, an extensible predictive text entry system
* ---------------------------------------------------
*
* Copyright (C) 2008 Matteo Vescovi <matteo.vescovi@yahoo.co.uk>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*
**********(*)*/
#ifndef PRESAGE_SIMULATOR
#define PRESAGE_SIMULATOR
#include "presage.h"
#include <sstream>
class Simulator {
public:
Simulator(PresageCallback* callback,
std::stringstream& sstream,
const std::string = "");
~Simulator();
void simulate(std::string);
// void reset();
void results() const;
int getKi() const;
int getKs() const;
int getKn() const;
double getKSR() const;
bool getAutoSpace() const;
void setAutoSpace( bool );
void setKs(int);
void silentMode(bool);
private:
Presage* presagePtr;
bool find( const std::vector<std::string>&, const std::string& ) const;
bool autoSpace; // determines whether predictive system is able to insert a space at the end of the word
int ki;
int ks;
int kn;
bool silent_mode;
std::stringstream& m_sstream;
};
#endif // PRESAGE_SIMULATOR
PresageCallback
Definition: presageCallback.h:66
Simulator::~Simulator
~Simulator()
Definition: simulator.cpp:46
Simulator::find
bool find(const std::vector< std::string > &, const std::string &) const
Definition: simulator.cpp:216
Simulator::presagePtr
Presage * presagePtr
Definition: simulator.h:75
Simulator::getKs
int getKs() const
Definition: simulator.cpp:191
Simulator::autoSpace
bool autoSpace
Definition: simulator.h:79
Simulator::setAutoSpace
void setAutoSpace(bool)
Definition: simulator.cpp:241
Simulator
Definition: simulator.h:52
Simulator::getKn
int getKn() const
Definition: simulator.cpp:197
presage.h
Simulator::m_sstream
std::stringstream & m_sstream
Definition: simulator.h:87
Simulator::getKSR
double getKSR() const
Definition: simulator.cpp:203
Simulator::simulate
void simulate(std::string)
Definition: simulator.cpp:52
Simulator::setKs
void setKs(int)
Definition: simulator.cpp:209
Simulator::ki
int ki
Definition: simulator.h:81
Simulator::getAutoSpace
bool getAutoSpace() const
Definition: simulator.cpp:236
Simulator::ks
int ks
Definition: simulator.h:82
Presage
Presage, the intelligent predictive text entry platform.
Definition: presage.h:116
Simulator::getKi
int getKi() const
Definition: simulator.cpp:185
Simulator::silent_mode
bool silent_mode
Definition: simulator.h:85
Simulator::Simulator
Simulator(PresageCallback *callback, std::stringstream &sstream, const std::string="")
Definition: simulator.cpp:29
Simulator::results
void results() const
Definition: simulator.cpp:164
Simulator::kn
int kn
Definition: simulator.h:83
Simulator::silentMode
void silentMode(bool)
Definition: simulator.cpp:246